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

Add helm hooks for admission controller deplolyment #30

Merged
merged 17 commits into from
Oct 15, 2024
Merged
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
24 changes: 24 additions & 0 deletions chart/kubedns-shepherd/templates/dnsclass-configuration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: config.kubedns-shepherd.io/v1alpha1
eminaktas marked this conversation as resolved.
Show resolved Hide resolved
kind: DNSClass
metadata:
name: {{ include "chart.fullname" . }}-dnsclass-config
annotations:
helm.sh/hook: post-install,post-upgrade
helm.sh/hook-weight: "6"
labels:
{{- include "chart.labels" . | nindent 4 }}
spec:
allowedNamespaces:
{{- toYaml .Values.dnsclass.allowedNamespaces | nindent 4 }}
disabledNamespaces:
{{- toYaml .Values.dnsclass.disabledNamespaces | nindent 4 }}
allowedDNSPolicies:
{{- toYaml .Values.dnsclass.allowedDNSPolicies | nindent 4 }}
dnsPolicy: {{ .Values.dnsclass.dnsPolicy }}
dnsConfig:
nameservers:
{{- toYaml .Values.dnsclass.dnsConfig.nameservers | nindent 6 }}
searches:
{{- toYaml .Values.dnsclass.dnsConfig.searches | nindent 6 }}
options:
{{- toYaml .Values.dnsclass.dnsConfig.options | nindent 6 }}
eminaktas marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: MutatingWebhookConfiguration
metadata:
name: {{ include "chart.fullname" . }}-mutating-webhook-configuration
annotations:
helm.sh/hook: post-install,post-upgrade
helm.sh/hook-weight: "5"
cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "chart.fullname" . }}-serving-cert
labels:
{{- include "chart.labels" . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: ValidatingWebhookConfiguration
metadata:
name: {{ include "chart.fullname" . }}-validating-webhook-configuration
annotations:
helm.sh/hook: post-install,post-upgrade
helm.sh/hook-weight: "5"
cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "chart.fullname" . }}-serving-cert
labels:
{{- include "chart.labels" . | nindent 4 }}
Expand Down
21 changes: 21 additions & 0 deletions chart/kubedns-shepherd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,24 @@ certmanager:
crds:
enabled: true
keep: true

dnsclass:
disabledNamespaces:
eminaktas marked this conversation as resolved.
Show resolved Hide resolved
- kube-system
allowedNamespaces:
- default
eminaktas marked this conversation as resolved.
Show resolved Hide resolved
allowedDNSPolicies:
- None
- ClusterFirst
- ClusterFirstWithHostNet
dnsPolicy: None
dnsConfig:
nameservers:
- 10.96.0.10
searches:
- "svc.{{ .clusterDomain }}"
- "{{ .podNamespace }}.svc.{{ .clusterDomain }}"
eminaktas marked this conversation as resolved.
Show resolved Hide resolved
options:
- name: ndots
value: "2"
- name: edns0
eminaktas marked this conversation as resolved.
Show resolved Hide resolved