Skip to content

Commit

Permalink
fixup! Add helm chart for the server container
Browse files Browse the repository at this point in the history
  • Loading branch information
cbosdo committed Sep 21, 2023
1 parent 4eb856f commit d2d1fef
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 7 deletions.
31 changes: 26 additions & 5 deletions containers/server-helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ spec:
volumeMounts:
- mountPath: /mnt
name: etc-rhn
- name: init-etc-systemd
- name: init-etc-systemd-multi
image: {{- include "deployment.container.image" (dict "name" "server" "global" .) | indent 1}}
imagePullPolicy: {{ .Values.pullPolicy }}
command:
Expand All @@ -304,7 +304,23 @@ spec:
fi
volumeMounts:
- mountPath: /mnt
name: etc-systemd
name: etc-systemd-multi
- name: init-etc-systemd-sockets
image: {{- include "deployment.container.image" (dict "name" "server" "global" .) | indent 1}}
imagePullPolicy: {{ .Values.pullPolicy }}
command:
- sh
- -x
- -c
- >
chown --reference=/etc/systemd/system/sockets.target.wants /mnt;
chmod --reference=/etc/systemd/system/sockets.target.wants /mnt;
if [ -z "$(ls -A /mnt)" ]; then
cp -a /etc/systemd/system/sockets.target.wants/. /mnt;
fi
volumeMounts:
- mountPath: /mnt
name: etc-systemd-sockets
- name: init-etc-salt
image: {{- include "deployment.container.image" (dict "name" "server" "global" .) | indent 1}}
imagePullPolicy: {{ .Values.pullPolicy }}
Expand Down Expand Up @@ -458,7 +474,9 @@ spec:
- mountPath: /etc/rhn
name: etc-rhn
- mountPath: /etc/systemd/system/multi-user.target.wants
name: etc-systemd
name: etc-systemd-multi
- mountPath: /etc/systemd/system/sockets.target.wants
name: etc-systemd-sockets
- mountPath: /etc/salt
name: etc-salt
- mountPath: /etc/tomcat
Expand Down Expand Up @@ -563,9 +581,12 @@ spec:
- name: etc-rhn
persistentVolumeClaim:
claimName: etc-rhn
- name: etc-systemd
- name: etc-systemd-multi
persistentVolumeClaim:
claimName: etc-systemd-multi
- name: etc-systemd-multi
persistentVolumeClaim:
claimName: etc-systemd
claimName: etc-systemd-multi
- name: etc-salt
persistentVolumeClaim:
claimName: etc-salt
Expand Down
28 changes: 26 additions & 2 deletions containers/server-helm/templates/volumes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ spec:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: etc-systemd
name: etc-systemd-multi
namespace: "{{ .Release.Namespace }}"
spec:
{{- if .Values.storageClass }}
Expand All @@ -427,7 +427,31 @@ spec:
{{- if .Values.matchPvByLabel }}
selector:
matchLabels:
data: etc-systemd
data: etc-systemd-multi
{{- end }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: etc-systemd-sockets
namespace: "{{ .Release.Namespace }}"
spec:
{{- if .Values.storageClass }}
{{- if (eq "-" .Values.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.storageClass }}"
{{- end }}
{{- end }}
accessModes:
{{ toYaml .Values.accessModes | indent 4 }}
resources:
requests:
storage: 10Mi
{{- if .Values.matchPvByLabel }}
selector:
matchLabels:
data: etc-systemd-sockets
{{- end }}
---
apiVersion: v1
Expand Down

0 comments on commit d2d1fef

Please sign in to comment.