Skip to content

Commit

Permalink
Alow service namespace override
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis committed Aug 22, 2024
1 parent 1ba3a3e commit 1fa79bf
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,7 @@ spec:
clientConfig:
service:
name: {{ .Values.webhook.serviceName }}
namespace: {{ .Release.Namespace }}
namespace: {{ if .Values.webhook.serviceNamespace }} {{ .Values.webhook.serviceNamespace }} {{ else }} {{ .Release.Namespace }} {{ end }}
port: {{ .Values.webhook.port }}
{{- end }}

Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ spec:
clientConfig:
service:
name: {{ .Values.webhook.serviceName }}
namespace: {{ .Release.Namespace }}
namespace: {{ if .Values.webhook.serviceNamespace }} {{ .Values.webhook.serviceNamespace }} {{ else }} {{ .Release.Namespace }} {{ end }}
port: {{ .Values.webhook.port }}
{{- end }}

2 changes: 1 addition & 1 deletion charts/karpenter-crd/templates/karpenter.sh_nodepools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ spec:
clientConfig:
service:
name: {{ .Values.webhook.serviceName }}
namespace: {{ .Release.Namespace }}
namespace: {{ if .Values.webhook.serviceNamespace }} {{ .Values.webhook.serviceNamespace }} {{ else }} {{ .Release.Namespace }} {{ end }}
port: {{ .Values.webhook.port }}
{{- end }}

1 change: 1 addition & 0 deletions charts/karpenter-crd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ webhook:
# -- Whether to enable the webhooks.
enabled: true
serviceName: karpenter
serviceNamespace: ""
# -- The container port to use for the webhook.
port: 8443
6 changes: 3 additions & 3 deletions hack/mutation/conversion_webhooks_injection.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ echo "{{- if .Values.webhook.enabled }}
clientConfig:
service:
name: {{ .Values.webhook.serviceName }}
namespace: {{ .Release.Namespace }}
namespace: {{ if .Values.webhook.serviceNamespace }} {{ .Values.webhook.serviceNamespace }} {{ else }} {{ .Release.Namespace }} {{ end }}
port: {{ .Values.webhook.port }}
{{- end }}
" >> charts/karpenter-crd/templates/karpenter.sh_nodepools.yaml
Expand All @@ -33,7 +33,7 @@ echo "{{- if .Values.webhook.enabled }}
clientConfig:
service:
name: {{ .Values.webhook.serviceName }}
namespace: {{ .Release.Namespace }}
namespace: {{ if .Values.webhook.serviceNamespace }} {{ .Values.webhook.serviceNamespace }} {{ else }} {{ .Release.Namespace }} {{ end }}
port: {{ .Values.webhook.port }}
{{- end }}
" >> charts/karpenter-crd/templates/karpenter.sh_nodeclaims.yaml
Expand All @@ -48,7 +48,7 @@ echo "{{- if .Values.webhook.enabled }}
clientConfig:
service:
name: {{ .Values.webhook.serviceName }}
namespace: {{ .Release.Namespace }}
namespace: {{ if .Values.webhook.serviceNamespace }} {{ .Values.webhook.serviceNamespace }} {{ else }} {{ .Release.Namespace }} {{ end }}
port: {{ .Values.webhook.port }}
{{- end }}
" >> charts/karpenter-crd/templates/karpenter.k8s.aws_ec2nodeclasses.yaml

0 comments on commit 1fa79bf

Please sign in to comment.