2021-09-02 17:08:08 +00:00
|
|
|
{{- define "addons-values" }}
|
2021-12-19 22:18:01 +00:00
|
|
|
clusterBackup:
|
2023-11-24 16:43:30 +00:00
|
|
|
enabled: {{ ternary "true" "false" (or (hasKey .Values.global.aws "region") .Values.addons.clusterBackup.enabled) }}
|
2022-09-20 11:50:19 +00:00
|
|
|
|
|
|
|
{{- with omit .Values.addons.clusterBackup "enabled" }}
|
2021-12-19 22:18:01 +00:00
|
|
|
{{- toYaml . | nindent 2 }}
|
2022-09-20 11:50:19 +00:00
|
|
|
{{- end }}
|
|
|
|
|
2024-12-04 18:40:10 +00:00
|
|
|
{{- if eq .Values.global.platform "aws" }}
|
2022-09-20 12:54:33 +00:00
|
|
|
# AWS
|
2022-09-20 11:50:19 +00:00
|
|
|
extraEnv:
|
|
|
|
- name: AWS_DEFAULT_REGION
|
|
|
|
value: {{ .Values.global.aws.region }}
|
|
|
|
{{- end }}
|
2021-12-19 22:18:01 +00:00
|
|
|
|
2022-05-10 16:43:06 +00:00
|
|
|
forseti:
|
2023-11-24 16:43:30 +00:00
|
|
|
enabled: {{ ternary "true" "false" (or (hasKey .Values.global.aws "region") .Values.addons.forseti.enabled) }}
|
2022-09-20 11:50:19 +00:00
|
|
|
|
|
|
|
{{- with omit .Values.addons.forseti "enabled" }}
|
2022-05-10 16:43:06 +00:00
|
|
|
{{- toYaml . | nindent 2 }}
|
2022-09-20 11:50:19 +00:00
|
|
|
{{- end }}
|
|
|
|
|
2024-12-04 18:40:10 +00:00
|
|
|
{{- if eq .Values.global.platform "aws" }}
|
2022-09-20 12:54:33 +00:00
|
|
|
# AWS
|
2022-09-20 11:50:19 +00:00
|
|
|
aws:
|
|
|
|
region: {{ $.Values.global.aws.region }}
|
|
|
|
iamRoleArn: "arn:aws:iam::{{ .Values.global.aws.accountId }}:role/{{ .Values.global.aws.region }}.{{ .Values.global.clusterName }}.kubezeroForseti"
|
|
|
|
{{- end }}
|
2022-05-10 16:43:06 +00:00
|
|
|
|
2022-09-20 11:50:19 +00:00
|
|
|
external-dns:
|
2023-11-24 16:43:30 +00:00
|
|
|
enabled: {{ ternary "true" "false" (or (hasKey .Values.global.aws "region") (index .Values "addons" "external-dns" "enabled")) }}
|
2022-05-10 16:43:06 +00:00
|
|
|
|
2022-09-20 11:50:19 +00:00
|
|
|
{{- with omit (index .Values "addons" "external-dns") "enabled" }}
|
2022-09-14 17:08:14 +00:00
|
|
|
{{- toYaml . | nindent 2 }}
|
2022-09-20 11:50:19 +00:00
|
|
|
{{- end }}
|
|
|
|
|
2024-12-04 18:40:10 +00:00
|
|
|
{{- if eq .Values.global.platform "aws" }}
|
2022-09-20 11:50:19 +00:00
|
|
|
# AWS
|
|
|
|
txtOwnerId: {{ .Values.global.clusterName }}
|
|
|
|
provider: aws
|
|
|
|
extraArgs:
|
|
|
|
- "--aws-zone-type=public"
|
|
|
|
- "--aws-zones-cache-duration=1h"
|
|
|
|
env:
|
|
|
|
- name: AWS_ROLE_ARN
|
|
|
|
value: "arn:aws:iam::{{ .Values.global.aws.accountId }}:role/{{ .Values.global.aws.region }}.{{ .Values.global.clusterName }}.externalDNS"
|
|
|
|
- name: AWS_WEB_IDENTITY_TOKEN_FILE
|
|
|
|
value: "/var/run/secrets/sts.amazonaws.com/serviceaccount/token"
|
|
|
|
- name: AWS_STS_REGIONAL_ENDPOINTS
|
|
|
|
value: "regional"
|
|
|
|
- name: METADATA_TRIES
|
|
|
|
value: "0"
|
2022-12-06 15:56:25 +00:00
|
|
|
extraVolumes:
|
|
|
|
- name: aws-token
|
|
|
|
projected:
|
|
|
|
sources:
|
|
|
|
- serviceAccountToken:
|
|
|
|
path: token
|
|
|
|
expirationSeconds: 86400
|
|
|
|
audience: "sts.amazonaws.com"
|
|
|
|
extraVolumeMounts:
|
|
|
|
- name: aws-token
|
|
|
|
mountPath: "/var/run/secrets/sts.amazonaws.com/serviceaccount/"
|
|
|
|
readOnly: true
|
2022-09-20 11:50:19 +00:00
|
|
|
{{- end }}
|
2022-09-14 17:08:14 +00:00
|
|
|
|
2022-09-11 11:54:56 +00:00
|
|
|
cluster-autoscaler:
|
2023-11-24 16:43:30 +00:00
|
|
|
enabled: {{ ternary "true" "false" (or (hasKey .Values.global.aws "region") (index .Values "addons" "cluster-autoscaler" "enabled")) }}
|
2022-09-23 10:54:27 +00:00
|
|
|
|
2024-12-04 18:40:10 +00:00
|
|
|
autoDiscovery:
|
|
|
|
clusterName: {{ .Values.global.clusterName }}
|
|
|
|
|
|
|
|
{{- if not .Values.global.highAvailable }}
|
|
|
|
extraArgs:
|
|
|
|
leader-elect: false
|
|
|
|
{{- end }}
|
|
|
|
|
2022-09-23 10:54:27 +00:00
|
|
|
{{- with omit (index .Values "addons" "cluster-autoscaler") "enabled" }}
|
2022-09-11 11:54:56 +00:00
|
|
|
{{- toYaml . | nindent 2 }}
|
2022-09-23 10:54:27 +00:00
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{- with .Values.metrics }}
|
2022-09-11 11:54:56 +00:00
|
|
|
serviceMonitor:
|
|
|
|
enabled: {{ .enabled }}
|
2022-09-28 15:41:30 +00:00
|
|
|
# Buggy atm due to integer vs. string issue
|
|
|
|
# prometheusRule:
|
|
|
|
# enabled: {{ .enabled }}
|
2022-09-11 11:54:56 +00:00
|
|
|
{{- end }}
|
|
|
|
|
2024-12-04 18:40:10 +00:00
|
|
|
{{- if eq .Values.global.platform "aws" }}
|
2022-09-20 11:50:19 +00:00
|
|
|
# AWS
|
2022-09-23 10:54:27 +00:00
|
|
|
awsRegion: {{ .Values.global.aws.region }}
|
2022-09-20 11:50:19 +00:00
|
|
|
|
2022-09-11 11:54:56 +00:00
|
|
|
extraEnv:
|
2022-09-23 10:54:27 +00:00
|
|
|
AWS_ROLE_ARN: "arn:aws:iam::{{ .Values.global.aws.accountId }}:role/{{ .Values.global.aws.region }}.{{ .Values.global.clusterName }}.clusterAutoScaler"
|
2022-09-11 11:54:56 +00:00
|
|
|
AWS_WEB_IDENTITY_TOKEN_FILE: "/var/run/secrets/sts.amazonaws.com/serviceaccount/token"
|
|
|
|
AWS_STS_REGIONAL_ENDPOINTS: "regional"
|
|
|
|
extraVolumes:
|
|
|
|
- name: aws-token
|
|
|
|
projected:
|
|
|
|
sources:
|
|
|
|
- serviceAccountToken:
|
|
|
|
path: token
|
|
|
|
expirationSeconds: 86400
|
|
|
|
audience: "sts.amazonaws.com"
|
|
|
|
extraVolumeMounts:
|
|
|
|
- name: aws-token
|
|
|
|
mountPath: "/var/run/secrets/sts.amazonaws.com/serviceaccount/"
|
|
|
|
readOnly: true
|
|
|
|
{{- end }}
|
|
|
|
|
2022-09-20 11:50:19 +00:00
|
|
|
{{- with .Values.addons.fuseDevicePlugin }}
|
|
|
|
fuseDevicePlugin:
|
|
|
|
{{- toYaml . | nindent 2 }}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{- with index .Values "addons" "nvidia-device-plugin" }}
|
|
|
|
nvidia-device-plugin:
|
|
|
|
{{- toYaml . | nindent 2 }}
|
|
|
|
{{- end }}
|
|
|
|
|
2022-12-15 21:51:31 +00:00
|
|
|
{{- with index .Values "addons" "sealed-secrets" }}
|
|
|
|
sealed-secrets:
|
|
|
|
{{- toYaml . | nindent 2 }}
|
|
|
|
|
|
|
|
{{- with $.Values.metrics }}
|
|
|
|
metrics:
|
|
|
|
serviceMonitor:
|
|
|
|
enabled: {{ .enabled }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
2023-08-16 10:17:39 +00:00
|
|
|
|
2024-11-13 18:19:14 +00:00
|
|
|
{{- with index .Values "addons" "py-kube-downscaler" }}
|
|
|
|
py-kube-downscaler:
|
|
|
|
{{- toYaml . | nindent 2 }}
|
|
|
|
{{- end }}
|
|
|
|
|
2023-01-11 12:08:18 +00:00
|
|
|
# AWS only
|
2024-11-13 18:19:14 +00:00
|
|
|
{{- if eq .Values.global.platform "aws" }}
|
2023-01-11 12:08:18 +00:00
|
|
|
aws-node-termination-handler:
|
|
|
|
enabled: {{ default "true" (index .Values "addons" "aws-node-termination-handler" "enabled") }}
|
|
|
|
|
|
|
|
{{- with omit (index .Values "addons" "aws-node-termination-handler") "enabled" }}
|
|
|
|
{{- toYaml . | nindent 2 }}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{- with .Values.metrics }}
|
|
|
|
enablePrometheusServer: {{ .enabled }}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
queueURL: "https://sqs.{{ .Values.global.aws.region }}.amazonaws.com/{{ .Values.global.aws.accountId }}/{{ .Values.global.clusterName }}_Nth"
|
2023-08-16 10:17:39 +00:00
|
|
|
managedTag: "zdt:kubezero:nth:{{ .Values.global.clusterName }}"
|
2023-01-11 12:08:18 +00:00
|
|
|
extraEnv:
|
|
|
|
- name: AWS_ROLE_ARN
|
|
|
|
value: "arn:aws:iam::{{ .Values.global.aws.accountId }}:role/{{ .Values.global.aws.region }}.{{ .Values.global.clusterName }}.awsNth"
|
|
|
|
- name: AWS_WEB_IDENTITY_TOKEN_FILE
|
|
|
|
value: "/var/run/secrets/sts.amazonaws.com/serviceaccount/token"
|
|
|
|
- name: AWS_STS_REGIONAL_ENDPOINTS
|
|
|
|
value: "regional"
|
|
|
|
- name: METADATA_TRIES
|
|
|
|
value: "0"
|
|
|
|
|
|
|
|
aws-eks-asg-rolling-update-handler:
|
|
|
|
enabled: {{ default "true" (index .Values "addons" "aws-eks-asg-rolling-update-handler" "enabled") }}
|
|
|
|
|
|
|
|
{{- with omit (index .Values "addons" "aws-eks-asg-rolling-update-handler") "enabled" }}
|
|
|
|
{{- toYaml . | nindent 2 }}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
environmentVars:
|
|
|
|
- name: CLUSTER_NAME
|
|
|
|
value: {{ .Values.global.clusterName }}
|
|
|
|
- name: AWS_REGION
|
|
|
|
value: {{ .Values.global.aws.region }}
|
|
|
|
- name: EXECUTION_INTERVAL
|
|
|
|
value: "60"
|
|
|
|
- name: METRICS
|
|
|
|
value: "{{ .Values.metrics.enabled }}"
|
|
|
|
- name: EAGER_CORDONING
|
|
|
|
value: "true"
|
|
|
|
- name: SLOW_MODE
|
|
|
|
value: "true"
|
|
|
|
- name: AWS_ROLE_ARN
|
|
|
|
value: "arn:aws:iam::{{ .Values.global.aws.accountId }}:role/{{ .Values.global.aws.region }}.{{ .Values.global.clusterName }}.awsRuh"
|
|
|
|
- name: AWS_WEB_IDENTITY_TOKEN_FILE
|
|
|
|
value: "/var/run/secrets/sts.amazonaws.com/serviceaccount/token"
|
|
|
|
- name: AWS_STS_REGIONAL_ENDPOINTS
|
2024-08-29 12:49:31 +00:00
|
|
|
value: "regional"
|
2024-11-13 18:19:14 +00:00
|
|
|
|
|
|
|
{{- with .Values.addons.awsNeuron }}
|
|
|
|
awsNeuron:
|
|
|
|
{{- toYaml . | nindent 2 }}
|
|
|
|
{{- end }}
|
|
|
|
|
2023-01-11 12:08:18 +00:00
|
|
|
{{- end }}
|
|
|
|
|
2021-09-02 17:08:08 +00:00
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{- define "addons-argo" }}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{ include "kubezero-app.app" . }}
|