Skip to content

Commit

Permalink
extract clockwork deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
bkiahstroud committed Aug 21, 2024
1 parent 8a9aef6 commit 346f64f
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 17 deletions.
17 changes: 0 additions & 17 deletions chart/princeton-manifold/templates/deployment-api-cable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,6 @@ spec:
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
- name: clockwork
command:
- bin/zhong
- zhong.rb
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.api.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
envFrom:
- configMapRef:
name: {{ include "princeton-manifold.fullname" . }}-env
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
Expand Down
51 changes: 51 additions & 0 deletions chart/princeton-manifold/templates/deployment-api-clockwork.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "princeton-manifold.fullname" . }}-api-clockwork
labels:
{{- include "princeton-manifold.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app.kubernetes.io/name: clockwork
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
app.kubernetes.io/name: clockwork
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "princeton-manifold.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: clockwork
command:
- bin/zhong
- zhong.rb
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.api.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
envFrom:
- configMapRef:
name: {{ include "princeton-manifold.fullname" . }}-env
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
{{- end }}

0 comments on commit 346f64f

Please sign in to comment.