rancher-charts/charts/harvester-cloud-provider/103.0.5+up0.2.8/dependency_charts/kube-vip/templates/daemonset.yaml

92 lines
2.8 KiB
YAML

apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ include "kube-vip.name" . }}
namespace: {{ .Release.Namespace | default "kube-system" }}
spec:
selector:
matchLabels:
{{- include "kube-vip.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "kube-vip.selectorLabels" . | nindent 8 }}
{{- with .Values.extraLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
containers:
- args:
- manager
{{- if kindIs "map" .Values.extraArgs }}
{{- range $key, $value := .Values.extraArgs }}
{{- if not (kindIs "invalid" $value) }}
- --{{ $key }}={{ tpl ($value | toString) $ }}
{{- else }}
- --{{ $key }}
{{- end }}
{{- end }}
{{- end }}
env:
{{- if eq (include "kube-vip.toBool" .Values.env.cp_enable) "true" }}
- name: vip_address
value: {{ required "A valid config.address required!" .Values.config.address}}
{{- end }}
{{- with .Values.env }}
{{- range $k, $v := . }}
{{- $name := $k }}
{{- $value := $v }}
- name: {{ quote $name }}
value: {{ quote $value }}
{{- end }}
{{- end }}
{{- with .Values.envValueFrom }}
{{- range $k, $v := . }}
{{- $name := $k }}
{{- $value := $v }}
- name: {{ quote $name }}
valueFrom:
{{- toYaml $value | nindent 14 }}
{{- end }}
{{- end }}
{{- with .Values.envFrom }}
envFrom:
{{- toYaml . | nindent 8 }}
{{- end }}
image: {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
name: kube-vip
resources:
{{- toYaml .Values.resources | nindent 10 }}
securityContext:
{{- toYaml .Values.securityContext | nindent 10 }}
{{- with .Values.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.hostAliases }}
hostAliases:
{{- toYaml . | nindent 8 }}
{{- end }}
hostNetwork: true
serviceAccountName: {{ include "kube-vip.name" . }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}