KubeZero/charts/kubeadm/templates/ClusterConfiguration.yaml

96 lines
3.9 KiB
YAML
Raw Normal View History

2022-04-08 15:09:40 +00:00
apiVersion: kubeadm.k8s.io/v1beta3
2021-01-03 15:33:13 +00:00
kind: ClusterConfiguration
2021-05-28 15:16:36 +00:00
kubernetesVersion: {{ .Chart.Version }}
clusterName: {{ .Values.global.clusterName }}
2022-10-27 12:27:42 +00:00
#featureGates:
# NonGracefulFailover: true
2021-05-28 15:16:36 +00:00
controlPlaneEndpoint: {{ .Values.api.endpoint }}
2021-01-03 15:33:13 +00:00
networking:
podSubnet: 10.244.0.0/16
etcd:
local:
2024-03-21 13:00:50 +00:00
# imageTag: 3.5.12-0
2021-01-03 15:33:13 +00:00
extraArgs:
2021-05-28 15:16:36 +00:00
### DNS discovery
#discovery-srv: {{ .Values.domain }}
#discovery-srv-name: {{ .Values.global.clusterName }}
advertise-client-urls: https://{{ .Values.etcd.nodeName }}:2379
initial-advertise-peer-urls: https://{{ .Values.etcd.nodeName }}:2380
initial-cluster: {{ include "kubeadm.etcd.initialCluster" .Values.etcd | quote }}
initial-cluster-state: {{ .Values.etcd.state }}
initial-cluster-token: etcd-{{ .Values.global.clusterName }}
name: {{ .Values.etcd.nodeName }}
listen-peer-urls: https://{{ .Values.listenAddress }}:2380
listen-client-urls: https://{{ .Values.listenAddress }}:2379
listen-metrics-urls: http://0.0.0.0:2381
logger: zap
# log-level: "warn"
2021-05-28 15:16:36 +00:00
{{- with .Values.etcd.extraArgs }}
2021-01-03 15:33:13 +00:00
{{- toYaml . | nindent 6 }}
{{- end }}
2021-05-28 15:16:36 +00:00
serverCertSANs:
- "{{ .Values.etcd.nodeName }}"
- "{{ .Values.etcd.nodeName }}.{{ .Values.domain }}"
- "{{ .Values.domain }}"
peerCertSANs:
- "{{ .Values.etcd.nodeName }}"
- "{{ .Values.etcd.nodeName }}.{{ .Values.domain }}"
- "{{ .Values.domain }}"
2021-01-03 15:33:13 +00:00
controllerManager:
extraArgs:
profiling: "false"
terminated-pod-gc-threshold: "300"
leader-elect: {{ .Values.global.highAvailable | quote }}
logging-format: json
2021-12-01 12:33:11 +00:00
feature-gates: {{ include "kubeadm.featuregates" ( dict "return" "csv" ) | trimSuffix "," | quote }}
2021-01-03 15:33:13 +00:00
scheduler:
extraArgs:
profiling: "false"
leader-elect: {{ .Values.global.highAvailable | quote }}
logging-format: json
2021-12-01 12:33:11 +00:00
feature-gates: {{ include "kubeadm.featuregates" ( dict "return" "csv" ) | trimSuffix "," | quote }}
2021-01-03 15:33:13 +00:00
apiServer:
certSANs:
2021-05-28 15:16:36 +00:00
- {{ regexSplit ":" .Values.api.endpoint -1 | first }}
2021-01-03 15:33:13 +00:00
extraArgs:
etcd-servers: {{ .Values.api.etcdServers }}
2021-01-03 15:33:13 +00:00
profiling: "false"
audit-log-path: "/var/log/kubernetes/audit.log"
audit-policy-file: /etc/kubernetes/apiserver/audit-policy.yaml
audit-log-maxage: "7"
audit-log-maxsize: "100"
2023-08-16 10:17:39 +00:00
audit-log-maxbackup: "1"
audit-log-compress: "true"
2023-08-16 10:17:39 +00:00
{{- if .Values.api.falco.enabled }}
audit-webhook-config-file: /etc/kubernetes/apiserver/audit-webhook.yaml
{{- end }}
2021-01-03 15:33:13 +00:00
tls-cipher-suites: "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"
admission-control-config-file: /etc/kubernetes/apiserver/admission-configuration.yaml
2021-10-21 15:08:40 +00:00
api-audiences: {{ .Values.api.apiAudiences }}
{{- if .Values.api.serviceAccountIssuer }}
service-account-issuer: "{{ .Values.api.serviceAccountIssuer }}"
service-account-jwks-uri: "{{ .Values.api.serviceAccountIssuer }}/openid/v1/jwks"
{{- end }}
2021-12-01 12:33:11 +00:00
{{- if .Values.api.awsIamAuth.enabled }}
2021-01-04 14:56:41 +00:00
authentication-token-webhook-config-file: /etc/kubernetes/apiserver/aws-iam-authenticator.yaml
{{- end }}
2021-12-01 12:33:11 +00:00
feature-gates: {{ include "kubeadm.featuregates" ( dict "return" "csv" ) | trimSuffix "," | quote }}
enable-admission-plugins: DenyServiceExternalIPs,NodeRestriction,EventRateLimit,ExtendedResourceToleration
2023-08-29 16:30:43 +00:00
{{- if .Values.global.highAvailable }}
goaway-chance: ".001"
{{- end }}
logging-format: json
2021-05-28 15:16:36 +00:00
{{- with .Values.api.extraArgs }}
2021-01-03 15:33:13 +00:00
{{- toYaml . | nindent 4 }}
{{- end }}
extraVolumes:
- name: kubezero-apiserver
hostPath: /etc/kubernetes/apiserver
mountPath: /etc/kubernetes/apiserver
readOnly: true
pathType: DirectoryOrCreate
- name: audit-log
hostPath: /var/log/kubernetes
mountPath: /var/log/kubernetes
pathType: DirectoryOrCreate