helm: use deployment instead of pod template
This commit is contained in:
parent
d6bdf80fdb
commit
12da0fcfe3
57
helm/templates/deployment.yaml
Normal file
57
helm/templates/deployment.yaml
Normal file
@ -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 }}
|
@ -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 }}
|
Loading…
Reference in New Issue
Block a user