Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing pod fails #9108

Open
AndreasBergmeier6176 opened this issue Oct 2, 2023 · 3 comments
Open

Testing pod fails #9108

AndreasBergmeier6176 opened this issue Oct 2, 2023 · 3 comments

Comments

@AndreasBergmeier6176
Copy link
Contributor

Expected behavior

Testing should just succeed

Actual behavior

Testing fails

Information

  • Skaffold version: 2.7.0
  • Operating system: Ubuntu 22.04
  • Installed via: skaffold run
  • Contents of skaffold.yaml:
apiVersion: skaffold/v4beta6
kind: Config
metadata:
  name: grafana
manifests:
  helm:
    releases:
      - name: grafana
        remoteChart: grafana
        namespace: monitoring
        version: 6.60.1
deploy:
  kubectl:
    defaultNamespace: monitoring

Grafana has a test pod. The pod succeeds but is then not marked as ready once successful.
Thus Skaffold prints:

pods: pods not ready: [grafana-test]

Steps to reproduce the behavior

  1. skaffold run
@pydolan
Copy link

pydolan commented Oct 7, 2023

As noted by #8515 (comment), remote chart releases should be in deploy instead of manifests. With this, you can also remove the kubctl section; for example:

apiVersion: skaffold/v4beta7
kind: Config
metadata:
  name: grafana
deploy:
  helm:
    releases:
      - name: grafana
        repo: https://grafana.github.io/helm-charts
        remoteChart: grafana
        version: 6.60.1
        namespace: monitoring
        createNamespace: true

Side note to skaffold team: please add a note about this to https://skaffold.dev/docs/references/yaml/ (I also struggled with this for far too long!)

@AndreasBergmeier6176
Copy link
Contributor Author

As noted by #8515 (comment), remote chart releases should be in deploy instead of manifests. With this, you can also remove the kubctl section; for example:

Only if you REALLY want to deploy with helm - there are enough reasons not to.
That being said - if it is supported to have Helm in manifests, then it would be good to have some kind of "compat" behavior.

@pydolan
Copy link

pydolan commented Oct 9, 2023

I think the issue is that some Charts require Helm for installing because of features like Helm Tests and Hooks. In the case of Grafana in your original config, we're probably seeing something like this:

  1. skaffold runs helm template to collect all k8s manifests
  2. skaffold applies these without any ordering
  3. the grafana-test pod runs and fails because the main graphana pods/etc were still building/deploying

When using the deploy section, helm install is used by skaffold, and we see the grafana-test pod waits until everything is finished deploying

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants