Skip to content

Commit

Permalink
chore: Alow service namespace override (#6849)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis authored and engedaam committed Aug 22, 2024
1 parent db6ed57 commit 6e9d95f
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 @@ -1341,7 +1341,7 @@ spec:
clientConfig:
service:
name: {{ .Values.webhook.serviceName }}
namespace: {{ .Release.Namespace }}
namespace: {{ .Values.webhook.serviceNamespace | default .Release.Namespace }}
port: {{ .Values.webhook.port }}
{{- end }}

Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ spec:
clientConfig:
service:
name: {{ .Values.webhook.serviceName }}
namespace: {{ .Release.Namespace }}
namespace: {{ .Values.webhook.serviceNamespace | default .Release.Namespace }}
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 @@ -1029,7 +1029,7 @@ spec:
clientConfig:
service:
name: {{ .Values.webhook.serviceName }}
namespace: {{ .Release.Namespace }}
namespace: {{ .Values.webhook.serviceNamespace | default .Release.Namespace }}
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: false
serviceName: karpenter
serviceNamespace: ""
# -- The container port to use for the webhook.
port: 8443
6 changes: 3 additions & 3 deletions hack/mutation/conversion_webhook_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: {{ .Values.webhook.serviceNamespace | default .Release.Namespace }}
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: {{ .Values.webhook.serviceNamespace | default .Release.Namespace }}
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: {{ .Values.webhook.serviceNamespace | default .Release.Namespace }}
port: {{ .Values.webhook.port }}
{{- end }}
" >> charts/karpenter-crd/templates/karpenter.k8s.aws_ec2nodeclasses.yaml

0 comments on commit 6e9d95f

Please sign in to comment.