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

Extend DRY support into trust-manager official Helm chart #496

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion deploy/charts/trust-manager/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,9 @@ This gets around an problem within helm discussed here
https://github.com/helm/helm/issues/5358
*/}}
{{- define "trust-manager.namespace" -}}
{{ .Values.namespace | default .Release.Namespace }}
{{- if .Values.app.webhook.tls.approverPolicy.certManagerNamespace -}}
{{ tpl .Values.app.webhook.tls.approverPolicy.certManagerNamespace . }}
{{- else -}}
{{ .Release.Namespace }}
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion deploy/charts/trust-manager/templates/webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,4 @@ webhooks:
service:
name: {{ include "trust-manager.name" . }}
namespace: {{ include "trust-manager.namespace" . }}
path: /validate-trust-cert-manager-io-v1alpha1-bundle
path: /validate-trust-cert-manager-io-v1alpha1-bundle
8 changes: 3 additions & 5 deletions deploy/charts/trust-manager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ app:
trust:
# The namespace used as the trust source. Note that the namespace _must_ exist
# before installing trust-manager.
namespace: cert-manager
namespace: "{{ .Release.Namespace }}" # Add a TPL default

securityContext:
# If false, disables the default seccomp profile, which might be required to run on certain platforms.
Expand Down Expand Up @@ -230,7 +230,6 @@ app:
ipFamilyPolicy: ""
# Sets the families that should be supported and the order in which they should be applied to ClusterIP as well. Can be IPv4 and/or IPv6.
ipFamilies: []

# The nodePort set on the Service used by the webhook.
# +docs:property
# nodePort: 8080
Expand All @@ -247,7 +246,7 @@ app:
enabled: false

# The namespace in which cert-manager was installed. Only used if `app.webhook.tls.approverPolicy.enabled` is true.
certManagerNamespace: "cert-manager"
certManagerNamespace: "{{ .Release.Namespace }}" # Add a TPL default

# The name of cert-manager's Service Account. Only used if `app.webhook.tls.approverPolicy.enabled` is true.
certManagerServiceAccount: "cert-manager"
Expand Down Expand Up @@ -302,7 +301,6 @@ podDisruptionBudget:
# if it is used on the Node where the only remaining trust-manager
# Pod is currently running.
enabled: false

# This configures the minimum available pods for disruptions. It can either be set to
# an integer (e.g. 1) or a percentage value (e.g. 25%).
# It cannot be used if `maxUnavailable` is set.
Expand All @@ -317,5 +315,5 @@ podDisruptionBudget:
# +docs:property
# maxUnavailable: 1

# Labels to apply to all resources
# Labels to apply to all resources
commonLabels: {}