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

Version: 0.139.0 Please add a selector like "--selector name=ingress-nginx", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies #1831

Closed
jseiser opened this issue May 6, 2021 · 9 comments
Labels

Comments

@jseiser
Copy link

jseiser commented May 6, 2021

After upgrading to the latest release, our pipelines are failing.


helmfile -e qa3 --selector name=app diff

in ./helmfile.yaml: release "qa3-app/app" depends on "kube-system/ingress-nginx" which does not match the selectors. Please add a selector like "--selector name=ingress-nginx", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies
- name: app
  chart: chartmuseum/app
  version: {{.Values.app.version}}
  needs:
  - kube-system/ingress-nginx
  - kube-system/high-priority
  namespace: "{{ .Environment.Name }}-app"
  condition: app.enabled
  labels:
    tier: backend
  values:
  - helm_vars/{{ .Environment.Name }}/values.yaml
  - helm_vars/{{ .Environment.Name }}/{{`{{ .Release.Name }}`}}/values.yaml
  secrets:
  - helm_vars/apps/{{`{{ .Release.Name }}`}}/secrets.ssocredentials.yaml
  - helm_vars/{{ .Environment.Name }}/{{`{{ .Release.Name }}`}}/secrets.yaml
❯ helm list -A --all-namespaces | grep ingress-nginx
ingress-nginx                 	kube-system      	19      	2021-04-05 15:11:17.764532 -0400 EDT   	deployed	ingress-nginx-3.26.0               	0.44.0
@mumoshu
Copy link
Collaborator

mumoshu commented May 6, 2021

@jseiser I consider that's a due to a fixed bug. The error message says everything- do you want kube-system/ingress-nginx installed along with the selected release? I guess not- so just add --skip-needs to the helmfile command, so that you can specifically say "I do want kube-system/ingress-nginx to be excluded even though the selected name=app requires it"

@mumoshu
Copy link
Collaborator

mumoshu commented May 6, 2021

Added a link to this issue to the release note :) Let me close this as answered but please feel free to reopen if you have other issues, like you think this is regression. But I intentionally made this a breaking change so that everyone can notice potentially incorrect configurations.

@mumoshu mumoshu closed this as completed May 6, 2021
@jseiser
Copy link
Author

jseiser commented May 7, 2021

@mumoshu

I dont understand, "The error message says everything- do you want kube-system/ingress-nginx installed along with the selected release? "

The release kube-system/ingress-nginx is already there, it exists. I showed it in the log.

The dependency is already fulfilled.

@dudicoco
Copy link
Contributor

@mumoshu this change breaks our CI.
Would --skip-needs preserve the previous behaviour (sync releases with the specified selectors according to the needs dependency graph) or would it ignore needs altogether?

@mumoshu
Copy link
Collaborator

mumoshu commented Jun 13, 2021

@dudicoco Yeah. Try 0.139.2+. Since then -skip-needs=true is the default setting #1835

@dudicoco
Copy link
Contributor

@mumoshu i've just tried v0.139.9 and it seems that the needs dependencies behaviour is broken.

With the following example:

- name: amazing-app-test-1
  chart: my-repo/amazing-app
  version: 2.0.14
  installed: true
  timeout: 300
  needs:
  - devops/amazing-app-test-3
  values: []
- name: amazing-app-test-2
  chart: my-repo/amazing-app
  version: 2.0.14
  installed: true
  timeout: 300
  needs:
  - devops/amazing-app-test-1
  values: []
- name: amazing-app-test-3
  chart: my-repo/amazing-app
  version: 2.0.14
  installed: true
  timeout: 300
  needs: []
  values: []

Previous behaviour (correct):

Upgrading release=amazing-app-test-3, chart=my-repo/amazing-app
Release "amazing-app-test-3" does not exist. Installing it now.
NAME: amazing-app-test-3
LAST DEPLOYED: Mon Jun 14 10:55:29 2021
NAMESPACE: devops
STATUS: deployed
REVISION: 1
TEST SUITE: None

Listing releases matching ^amazing-app-test-3$
amazing-app-test-3	devops   	1       	2021-06-14 10:55:29.884771 +0300 IDT	deployed	amazing-app-2.0.14	1.0

Upgrading release=amazing-app-test-1, chart=my-repo/amazing-app
Release "amazing-app-test-1" does not exist. Installing it now.
NAME: amazing-app-test-1
LAST DEPLOYED: Mon Jun 14 10:56:28 2021
NAMESPACE: devops
STATUS: deployed
REVISION: 1
TEST SUITE: None

Listing releases matching ^amazing-app-test-1$
amazing-app-test-1	devops   	1       	2021-06-14 10:56:28.275669 +0300 IDT	deployed	amazing-app-2.0.14	1.0

Upgrading release=amazing-app-test-2, chart=my-repo/amazing-app
Release "amazing-app-test-2" does not exist. Installing it now.
NAME: amazing-app-test-2
LAST DEPLOYED: Mon Jun 14 10:57:09 2021
NAMESPACE: devops
STATUS: deployed
REVISION: 1
TEST SUITE: None

Listing releases matching ^amazing-app-test-2$
amazing-app-test-2	devops   	1       	2021-06-14 10:57:09.207185 +0300 IDT	deployed	amazing-app-2.0.14	1.0

New behaviour (incorrect - releases 1 & 2 are installed in parallel):

Upgrading release=amazing-app-test-3, chart=my-repo/amazing-app
Release "amazing-app-test-3" does not exist. Installing it now.
NAME: amazing-app-test-3
LAST DEPLOYED: Mon Jun 14 11:01:38 2021
NAMESPACE: devops
STATUS: deployed
REVISION: 1
TEST SUITE: None

Listing releases matching ^amazing-app-test-3$
amazing-app-test-3	devops   	1       	2021-06-14 11:01:38.096974 +0300 IDT	deployed	amazing-app-2.0.14	1.0

Upgrading release=amazing-app-test-2, chart=my-repo/amazing-app
Upgrading release=amazing-app-test-1, chart=my-repo/amazing-app
Release "amazing-app-test-1" does not exist. Installing it now.
NAME: amazing-app-test-1
LAST DEPLOYED: Mon Jun 14 11:02:16 2021
NAMESPACE: devops
STATUS: deployed
REVISION: 1
TEST SUITE: None

Listing releases matching ^amazing-app-test-1$
Release "amazing-app-test-2" does not exist. Installing it now.
NAME: amazing-app-test-2
LAST DEPLOYED: Mon Jun 14 11:02:16 2021
NAMESPACE: devops
STATUS: deployed
REVISION: 1
TEST SUITE: None

Listing releases matching ^amazing-app-test-2$
amazing-app-test-1	devops   	1       	2021-06-14 11:02:16.553073 +0300 IDT	deployed	amazing-app-2.0.14	1.0

amazing-app-test-2	devops   	1       	2021-06-14 11:02:16.419325 +0300 IDT	deployed	amazing-app-2.0.14	1.0

@mumoshu
Copy link
Collaborator

mumoshu commented Jun 14, 2021

@dudicoco What's shown in AFFECTED RELEASES log that is printed when you run apply? Also, what happens if you remove devops/ from needs entries like devops/amazing-app-test-1?

@mumoshu
Copy link
Collaborator

mumoshu commented Jun 14, 2021

@dudicoco Probably you'd better open another issue. This is getting out of the scope of the original issue 🙏

@dudicoco
Copy link
Contributor

@mumoshu i've opened #1881

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

No branches or pull requests

3 participants