Skip to content

Conversation

bwdmr
Copy link

@bwdmr bwdmr commented Mar 15, 2025

- 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.

bwdmr added 2 commits March 15, 2025 09:17
- 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 <[email protected]>
@bwdmr bwdmr force-pushed the conditionalservice branch from 4ba0d13 to 6ec0776 Compare March 15, 2025 09:00
@joshsizer
Copy link
Collaborator

joshsizer commented Mar 27, 2025

Hi @bwdmr, could you please split this PR into two? I see two changes here - the optional creation of the service & creating the docker-registry.namespace template.

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

@joshsizer joshsizer self-requested a review March 27, 2025 00:49
@paulfantom
Copy link

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.

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

Successfully merging this pull request may close these issues.

3 participants