Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion helm-charts/cogstack-cohorter-helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,27 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
Selector labels (release-scoped — shared base, do not use directly as pod selectors)
*/}}
{{- define "cogstack-cohorter-helm.selectorLabels" -}}
app.kubernetes.io/name: {{ include "cogstack-cohorter-helm.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Component-scoped selector labels — use these in Deployment matchLabels and Service selectors
so that each service only targets its own pods.
*/}}
{{- define "cogstack-cohorter-helm.webappSelectorLabels" -}}
{{ include "cogstack-cohorter-helm.selectorLabels" . }}
app.kubernetes.io/component: webapp
{{- end }}

{{- define "cogstack-cohorter-helm.nl2dslSelectorLabels" -}}
{{ include "cogstack-cohorter-helm.selectorLabels" . }}
app.kubernetes.io/component: nl2dsl
{{- end }}

{{/*
Create the name of the service account to use
*/}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
replicas: {{ .Values.nl2dsl.replicaCount }}
selector:
matchLabels:
{{- include "cogstack-cohorter-helm.selectorLabels" . | nindent 6 }}
{{- include "cogstack-cohorter-helm.nl2dslSelectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
Expand All @@ -18,6 +18,7 @@ spec:
{{- end }}
labels:
{{- include "cogstack-cohorter-helm.labels" . | nindent 8 }}
app.kubernetes.io/component: nl2dsl
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ spec:
protocol: TCP
name: http
selector:
{{- include "cogstack-cohorter-helm.selectorLabels" . | nindent 4 }}
{{- include "cogstack-cohorter-helm.nl2dslSelectorLabels" . | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
{{- end }}
selector:
matchLabels:
{{- include "cogstack-cohorter-helm.selectorLabels" . | nindent 6 }}
{{- include "cogstack-cohorter-helm.webappSelectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
Expand All @@ -21,6 +21,7 @@ spec:
{{- end }}
labels:
{{- include "cogstack-cohorter-helm.labels" . | nindent 8 }}
app.kubernetes.io/component: webapp
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ spec:
protocol: TCP
name: http
selector:
{{- include "cogstack-cohorter-helm.selectorLabels" . | nindent 4 }}
{{- include "cogstack-cohorter-helm.webappSelectorLabels" . | nindent 4 }}
{{- end }}
4 changes: 2 additions & 2 deletions helm-charts/cogstack-cohorter-helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ webapp:
image:
repository: cogstacksystems/cogstack-cohorter-webapp
tag: latest
pullPolicy: IfNotPresent
pullPolicy: Always

# Environment variables injected into the webapp container.
# NL2DSL_SERVER is set automatically from nl2dsl.service.port.
Expand Down Expand Up @@ -182,7 +182,7 @@ nl2dsl:
image:
repository: cogstacksystems/cogstack-cohorter-nl2dsl
tag: latest
pullPolicy: IfNotPresent
pullPolicy: Always

# Environment variables injected into the nl2dsl container.
# OLLAMA_URL and MEDCAT_URL are set automatically from subchart service names.
Expand Down
Loading