2021-07-21 11:26:56 +00:00
|
|
|
{{- define "storage-values" }}
|
2021-08-02 09:52:07 +00:00
|
|
|
|
2021-08-31 15:33:54 +00:00
|
|
|
{{- with index .Values "storage" "lvm-localpv" }}
|
|
|
|
lvm-localpv:
|
|
|
|
{{- toYaml . | nindent 2 }}
|
2022-04-08 14:20:19 +00:00
|
|
|
prometheus:
|
|
|
|
enabled: {{ $.Values.metrics.enabled }}
|
2021-08-31 15:33:54 +00:00
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{- with .Values.storage.gemini }}
|
|
|
|
gemini:
|
|
|
|
{{- toYaml . | nindent 2 }}
|
2021-08-02 09:52:07 +00:00
|
|
|
{{- end }}
|
|
|
|
|
2023-04-12 11:14:31 +00:00
|
|
|
{{- with .Values.storage.k8up }}
|
|
|
|
k8up:
|
2022-12-15 21:51:31 +00:00
|
|
|
{{- toYaml . | nindent 2 }}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
snapshotController:
|
2023-08-22 12:17:02 +00:00
|
|
|
# install controller if any capable storage driver is enabled
|
|
|
|
enabled: {{ or (index .Values "storage" "lvm-localpv" "enabled") (index .Values "storage" "aws-ebs-csi-driver" "enabled")}}
|
2022-12-15 21:51:31 +00:00
|
|
|
|
2021-12-08 16:14:38 +00:00
|
|
|
aws-ebs-csi-driver:
|
|
|
|
enabled: {{ default false (index .Values "storage" "aws-ebs-csi-driver" "enabled")}}
|
|
|
|
controller:
|
2022-09-20 12:54:33 +00:00
|
|
|
replicaCount: {{ ternary 2 1 .Values.global.highAvailable }}
|
2022-09-11 11:54:56 +00:00
|
|
|
k8sTagClusterId: {{ .Values.global.clusterName }}
|
2023-08-21 17:24:01 +00:00
|
|
|
enableMetrics: {{ .Values.metrics.enabled }}
|
2023-11-24 16:43:30 +00:00
|
|
|
region: {{ .Values.global.aws.region }}
|
2021-12-08 16:14:38 +00:00
|
|
|
env:
|
|
|
|
- name: AWS_ROLE_ARN
|
|
|
|
value: {{ index .Values "storage" "aws-ebs-csi-driver" "IamArn" | quote }}
|
|
|
|
- name: AWS_WEB_IDENTITY_TOKEN_FILE
|
|
|
|
value: "/var/run/secrets/sts.amazonaws.com/serviceaccount/token"
|
|
|
|
- name: AWS_STS_REGIONAL_ENDPOINTS
|
|
|
|
value: regional
|
|
|
|
|
2023-08-21 17:24:01 +00:00
|
|
|
{{- if not .Values.global.highAvailable }}
|
|
|
|
sidecars:
|
|
|
|
provisioner:
|
|
|
|
leaderElection:
|
|
|
|
enabled: false
|
|
|
|
attacher:
|
|
|
|
leaderElection:
|
|
|
|
enabled: false
|
|
|
|
resizer:
|
|
|
|
leaderElection:
|
|
|
|
enabled: false
|
|
|
|
volumemodifier:
|
|
|
|
leaderElection:
|
|
|
|
enabled: false
|
|
|
|
{{- end }}
|
2022-05-05 15:22:23 +00:00
|
|
|
|
2021-12-08 16:14:38 +00:00
|
|
|
aws-efs-csi-driver:
|
|
|
|
enabled: {{ default false (index .Values "storage" "aws-efs-csi-driver" "enabled")}}
|
2022-09-20 12:54:33 +00:00
|
|
|
replicaCount: {{ ternary 2 1 .Values.global.highAvailable }}
|
2021-12-08 16:14:38 +00:00
|
|
|
controller:
|
|
|
|
extraEnv:
|
|
|
|
- name: AWS_ROLE_ARN
|
|
|
|
value: {{ index .Values "storage" "aws-efs-csi-driver" "IamArn" | quote }}
|
|
|
|
- name: AWS_WEB_IDENTITY_TOKEN_FILE
|
|
|
|
value: "/var/run/secrets/sts.amazonaws.com/serviceaccount/token"
|
|
|
|
- name: AWS_STS_REGIONAL_ENDPOINTS
|
|
|
|
value: regional
|
2022-05-05 15:22:23 +00:00
|
|
|
|
|
|
|
# The EFS controller steel needs hostnetwork and cannot update on single node control planes otherwise
|
2022-09-20 12:54:33 +00:00
|
|
|
{{- if not .Values.global.highAvailable }}
|
2023-04-12 16:13:01 +00:00
|
|
|
updateStrategy:
|
|
|
|
type: Recreate
|
2022-05-05 15:22:23 +00:00
|
|
|
{{- else }}
|
|
|
|
affinity:
|
|
|
|
podAntiAffinity:
|
|
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
|
|
- labelSelector:
|
|
|
|
matchExpressions:
|
|
|
|
- key: app
|
|
|
|
operator: In
|
|
|
|
values:
|
|
|
|
- efs-csi-controller
|
|
|
|
topologyKey: "kubernetes.io/hostname"
|
|
|
|
{{- end }}
|
|
|
|
|
2022-04-08 14:20:19 +00:00
|
|
|
# Dynamic Provisioning
|
|
|
|
{{- with index .Values "storage" "aws-efs-csi-driver" "storageClasses" }}
|
|
|
|
storageClasses:
|
|
|
|
{{- toYaml . | nindent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
# Legacy static provisioning
|
2021-12-08 16:14:38 +00:00
|
|
|
{{- with index .Values "storage" "aws-efs-csi-driver" "PersistentVolumes" }}
|
|
|
|
PersistentVolumes:
|
|
|
|
{{- toYaml . | nindent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
|
2021-07-21 11:26:56 +00:00
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{- define "storage-argo" }}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{ include "kubezero-app.app" . }}
|