Skip to content

Commit

Permalink
seperate the worker and web selectors so that the worker does not acc…
Browse files Browse the repository at this point in the history
…identally get drafted in to the service for displaying pages
  • Loading branch information
orangewolf authored and mcritchlow committed Nov 3, 2022
1 parent a0f8455 commit 1225474
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions chart/hyrax/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ app.kubernetes.io/name: {{ include "hyrax.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Worker Selector labels
*/}}
{{- define "hyrax.workerSelectorLabels" -}}
app.kubernetes.io/name: {{ include "hyrax.name" . }}-worker
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
Expand Down
4 changes: 2 additions & 2 deletions chart/hyrax/templates/deployment-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ spec:
replicas: {{ .Values.worker.replicaCount }}
selector:
matchLabels:
{{- include "hyrax.selectorLabels" . | nindent 6 }}
{{- include "hyrax.workerSelectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "hyrax.selectorLabels" . | nindent 8 }}
{{- include "hyrax.workerSelectorLabels" . | nindent 8 }}
spec:
initContainers:
- name: db-wait
Expand Down

0 comments on commit 1225474

Please sign in to comment.