-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(t8s-cluster/management-cluster): automatically roll cluster if c…
…erts are going to expire (#722)
- Loading branch information
Showing
4 changed files
with
78 additions
and
76 deletions.
There are no files selected for viewing
File renamed without changes.
77 changes: 77 additions & 0 deletions
77
...nt-cluster/clusterClass/kubeadmControlPlaneTemplate/_kubeadmControlPlaneTemplateSpec.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{{/* | ||
KubeadmControlPlaneTemplate is immutable. We need to create new versions during upgrades. | ||
Here we are generating a hash suffix. | ||
This function needs the whole `$` context to be able to use `.Files.Get` | ||
*/}} | ||
{{- define "t8s-cluster.clusterClass.kubeadmControlPlaneTemplate.spec" -}} | ||
rolloutBefore: | ||
certificatesExpiryDays: 60 | ||
kubeadmConfigSpec: | ||
clusterConfiguration: | ||
apiServer: | ||
extraArgs: | ||
admission-control-config-file: &admissionControlConfigFilePath /etc/kubernetes/admission-control-config.yaml | ||
cloud-provider: external | ||
enable-admission-plugins: AlwaysPullImages,EventRateLimit,NodeRestriction | ||
profiling: 'false' | ||
tls-cipher-suites: {{ include "t8s-cluster.clusterClass.tlsCipherSuites" (dict) }} | ||
event-ttl: 4h | ||
extraVolumes: | ||
- hostPath: *admissionControlConfigFilePath | ||
mountPath: *admissionControlConfigFilePath | ||
name: admission-control-config | ||
readOnly: true | ||
- hostPath: &eventRateLimitConfigFilePath /etc/kubernetes/event-rate-limit-config.yaml | ||
mountPath: *eventRateLimitConfigFilePath | ||
name: event-rate-limit-config | ||
readOnly: true | ||
controllerManager: | ||
extraArgs: | ||
authorization-always-allow-paths: /healthz,/readyz,/livez,/metrics | ||
bind-address: 0.0.0.0 | ||
cloud-provider: external | ||
profiling: 'false' | ||
terminated-pod-gc-threshold: '100' | ||
etcd: | ||
local: | ||
extraArgs: | ||
listen-metrics-urls: http://0.0.0.0:2381 | ||
scheduler: | ||
extraArgs: | ||
authorization-always-allow-paths: /healthz,/readyz,/livez,/metrics | ||
bind-address: 0.0.0.0 | ||
profiling: 'false' | ||
files: {{- include "t8s-cluster.patches.kubelet.patches" (dict "context" $) | nindent 4 }} | ||
- content: |- {{- .Files.Get "files/admission-control-config.yaml" | nindent 8 }} | ||
path: *admissionControlConfigFilePath | ||
- content: |- {{- .Files.Get "files/event-rate-limit-config.yaml" | nindent 8 }} | ||
path: *eventRateLimitConfigFilePath | ||
- content: |- {{- .Files.Get "files/kube-proxy.patch.sh" | nindent 8 }} | ||
path: /etc/kube-proxy-patch.sh | ||
permissions: "0700" | ||
- content: |- {{- .Files.Get "files/kube-proxy.config.yaml" | nindent 8 }} | ||
path: /etc/kube-proxy-config.yaml | ||
{{- if .Values.containerRegistryMirror.mirrorEndpoint }} | ||
{{- include "t8s-cluster.clusterClass.containerdConfig.containerRegistryMirrorConfigs" (dict "context" $) | nindent 4 }} | ||
{{- end }} | ||
- content: |- {{- include "t8s-cluster.clusterClass.containerdConfig.plugins" (dict "context" $ "gpu" false) | nindent 8 }} | ||
path: /etc/containerd/conf.d/plugins.toml | ||
{{- if .Values.global.injectedCertificateAuthorities }} | ||
- content: |- {{- .Values.global.injectedCertificateAuthorities | nindent 8 }} | ||
path: /usr/local/share/ca-certificates/injected-ca-certs.crt | ||
{{- end }} | ||
initConfiguration: | ||
nodeRegistration: | ||
kubeletExtraArgs: {{- include "t8s-cluster.clusterClass.kubeletExtraArgs" (dict) | nindent 8 }} | ||
name: '{{ `{{ local_hostname }}` }}' | ||
patches: | ||
directory: {{ include "t8s-cluster.patches.directory" (dict) }} | ||
joinConfiguration: | ||
nodeRegistration: | ||
kubeletExtraArgs: {{- include "t8s-cluster.clusterClass.kubeletExtraArgs" (dict) | nindent 8 }} | ||
name: '{{ `{{ local_hostname }}` }}' | ||
patches: | ||
directory: {{ include "t8s-cluster.patches.directory" (dict) }} | ||
preKubeadmCommands: {{- include "t8s-cluster.clusterClass.preKubeadmCommands" (dict "context" $) | nindent 4 }} | ||
postKubeadmCommands: {{- include "t8s-cluster.clusterClass.postKubeadmCommands" (dict) | nindent 4 }} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 0 additions & 74 deletions
74
...t-cluster/clusterClass/kubeadmnControlPlaneTemplate/_kubeadmControlPlaneTemplateSpec.yaml
This file was deleted.
Oops, something went wrong.