-
Notifications
You must be signed in to change notification settings - Fork 557
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
fix: add namespace for applicable helm chart resources #2040
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi , thank you for the PR,
What problem does adding the namespace solve? We used to have some namespace definitions, but then we removed them because they are redundant, implied by helm -n anyway.
Also, the ServiceMonitoring needs the current setup. Please see my comment on that inline.
regards, krajo
{{- with .namespace }} | ||
namespace: {{ . }} | ||
{{- end }} | ||
namespace: {{ .Release.Namespace | quote }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually here we may want to place this custom resource into the namespace of prometheus operator , and not into the release namespace, hence we used .Values.serviceMonitor.namespace, instead of the Release namespace. I actually have it running with my Mimir being in dev
and Prom monitoring in the monitoring
namespace:
serviceMonitor:
enabled: true
namespace: monitoring
namespaceSelector:
matchNames:
- dev
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, that does make sense. I'll fix this in my next iteration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it might still make sense to default to the .Release.Namespace
Hey @krajorama, there was some prior discussion in the community slack: thread. And I created an issue #2045 to give slightly more context. Basically, not having an explicit namespace makes applying via
@rasmusdencker not sure if we should worry about this. It seems like the behaviour was mostly consistent, but I don't think it was consistent enough to work without additional tweaks. And I don't think these tweaks will be broken by this change. |
I think you need to rebase this PR to make the CI pass. A fix was merged in #2051 |
Got it @dimitarvdimitrov - I'll rebase it in my next iteration. |
Sorry for the long delay, was busy with other things. I see your point. I'll re-review when rebased. Note: we now have more people working on the chart, so there are rapid changes going on. In particular I think you'll need to run |
Hi, I've got an updated version of this fix going in #2123 . @rasmusdencker indicated as co-author. |
Oh, thanks @krajorama. I'll close this one. Sorry for not following up earlier. |
What this PR does
Adds namespace to all Helm resources.
Note: I also removed parts with
with .namespace
to normalize namespace declarations.This is probably considered a breaking change, so let me know if I should reintroduce them and fall back to .Release.Namespace instead. It's noteworthy that this convention was also very inconsistent, so I'm finding it hard to believe that it's used 'in the wild'.
Which issue(s) this PR fixes or relates to
Fixes #2045
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]