diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml new file mode 100644 index 0000000..a90e6a5 --- /dev/null +++ b/helm/templates/deployment.yaml @@ -0,0 +1,57 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: radvd-deployment-{{ .Release.Name }} + labels: + app: radvd-{{ .Release.Name }} +spec: + replicas: 1 + selector: + matchLabels: + app: radvd-{{ .Release.Name }} + template: + metadata: + labels: + app: radvd-{{ .Release.Name }} + annotations: # Forces pod recreation on upgrade with changes + checksum/config: {{ include (print $.Template.BasePath "/config.yaml") . | sha256sum }} + spec: + hostNetwork: true + containers: + - name: radvd + image: registry.opensuse.org/home/jeff_mahoney/containers/15.6/radvd:2.17 + command: + - "/usr/sbin/radvd" + - "-n" + - "-C" + - "/etc/radvd/radvd.conf" + - "-m" + - "stderr" + - "-d" + {{- if .Values.debugLevel }} + - {{ .Values.debugLevel | quote }} + {{ else }} + - "1" + {{- end }} + securityContext: + capabilities: + add: + - NET_BIND_SERVICE + - NET_RAW + volumeMounts: + - name: config + mountPath: /etc/radvd + readOnly: true + volumes: + - name: config + configMap: + # Provide the name of the ConfigMap containing the files you want + # to add to the container + name: {{ .Chart.Name}}-config-{{ .Release.Name }} + items: + - key: config + path: radvd.conf + {{- if .Values.nodeSelector }} + nodeSelector: + {{- .Values.nodeSelector | toYaml | nindent 4 }} + {{- end }} diff --git a/helm/templates/pod.yaml b/helm/templates/pod.yaml deleted file mode 100644 index fd3a653..0000000 --- a/helm/templates/pod.yaml +++ /dev/null @@ -1,35 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: radvd -spec: - hostNetwork: true - containers: - - name: radvd - image: radvd - command: - - "/usr/bin/radvd" - - "-C" - - "/etc/radvd.conf" - {{- if .Values.debugLevel }} - - "-d" - - {{- .Values.debugLevel | quote }} - {{- end }} - securityContext: - capabilities: - add: - - NET_BIND_SERVICE - - NET_RAW - volumeMounts: - - name: config-volume - mountPath: /etc/radvd.conf - volumes: - - name: config-volume - configMap: - # Provide the name of the ConfigMap containing the files you want - # to add to the container - name: {{ .Chart.Name}}-config-{{ .Release.Name }} - {{- if .Values.nodeSelector }} - nodeSelector: - {{- .Values.nodeSelector | toYaml | nindent 4 }} - {{- end }}