Add option to conditionally create Service resource #159
Open
bwdmr wants to merge 2 commits intotwuni:mainfrom
Open
Add option to conditionally create Service resource #159bwdmr wants to merge 2 commits intotwuni:mainfrom
bwdmr wants to merge 2 commits intotwuni:mainfrom
Conversation
bwdmr
commented
Mar 15, 2025
- Create a reusable helper template "docker-registry.namespace" in _helpers.tpl
- Replace all instances of "{{ .Values.namespace | default .Release.Namespace }}"
with "{{ include "docker-registry.namespace" . }}" for consistency
- Apply this change across all resource templates (deployment, service,
configmap, secret, cronjob, pvc, etc.)
This refactoring improves maintainability and ensures consistent namespace
handling throughout the chart, particularly for multi-namespace deployments
in combined charts.
- Add new parameter `service.create` (default: false) to control Service creation - Wrap Service template in conditional to respect the new parameter - Update documentation and default values to reflect this change This allows users who don't need the Service resource (e.g., when using Ingress directly or external service management) to skip its creation. Signed-off-by: bwdmr <pbwo@protonmail.ch>
4ba0d13 to
6ec0776
Compare
Collaborator
|
Hi @bwdmr, could you please split this PR into two? I see two changes here - the optional creation of the service & creating the Also, please make sure to sign your commits! Otherwise we cannot merge changes in. EDIT: I see that you opened a PR with the docker registry namespace template here: #158, it looks like those commits made it into this branch as well |
|
This also goes hand-in-hand with my PR to switch from using ServiceMonitor to PodMonitor as disabling creation of Service will prevent metrics gathering when using ServiceMonitor. This problem won't exist with PodMonitor though. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.