diff --git a/templates/database/statefulset.yaml b/templates/database/statefulset.yaml index 29dabcb..c6f3c22 100644 --- a/templates/database/statefulset.yaml +++ b/templates/database/statefulset.yaml @@ -101,7 +101,7 @@ metadata: spec: selector: app: {{ $.Chart.Name }}-database - {{- include "liferay.labels" $ | nindent 4 }} + {{- include "liferay.selectorLabels" $ | nindent 4 }} ports: - name: database port: {{ .config.port }} @@ -120,7 +120,7 @@ spec: clusterIP: None # This is what makes it headless selector: app: {{ $.Chart.Name }}-database - {{- include "liferay.labels" $ | nindent 4 }} + {{- include "liferay.selectorLabels" $ | nindent 4 }} ports: - name: database port: {{ .config.port }} diff --git a/templates/headless-service.yml b/templates/headless-service.yml index 74abe3b..bc40082 100644 --- a/templates/headless-service.yml +++ b/templates/headless-service.yml @@ -3,6 +3,7 @@ kind: Service metadata: name: {{ include "liferay.fullname" . }}-headless labels: + app: {{ $.Chart.Name }} {{- include "liferay.labels" . | nindent 4 }} spec: clusterIP: None # This is what makes it headless @@ -16,4 +17,5 @@ spec: protocol: TCP name: http selector: + app: {{ $.Chart.Name }} {{- include "liferay.selectorLabels" . | nindent 4 }} diff --git a/templates/objectstorage/statefulset.yaml b/templates/objectstorage/statefulset.yaml index 4d95a59..7885134 100644 --- a/templates/objectstorage/statefulset.yaml +++ b/templates/objectstorage/statefulset.yaml @@ -159,7 +159,7 @@ metadata: spec: selector: app: {{ $.Chart.Name }}-objectstorage - {{- include "liferay.labels" $ | nindent 4 }} + {{- include "liferay.selectorLabels" $ | nindent 4 }} ports: - name: api port: {{ .config.ports.api }} @@ -182,7 +182,7 @@ spec: clusterIP: None # This is what makes it headless selector: app: {{ $.Chart.Name }}-objectstorage - {{- include "liferay.labels" $ | nindent 4 }} + {{- include "liferay.selectorLabels" $ | nindent 4 }} ports: - name: api port: {{ .config.ports.api }} diff --git a/templates/search/statefulset.yaml b/templates/search/statefulset.yaml index fa09837..800f609 100644 --- a/templates/search/statefulset.yaml +++ b/templates/search/statefulset.yaml @@ -152,7 +152,7 @@ metadata: spec: selector: app: {{ $.Chart.Name }}-search - {{- include "liferay.labels" $ | nindent 4 }} + {{- include "liferay.selectorLabels" $ | nindent 4 }} ports: - name: search port: {{ .config.port }} @@ -171,7 +171,7 @@ spec: clusterIP: None # This is what makes it headless selector: app: {{ $.Chart.Name }}-search - {{- include "liferay.labels" $ | nindent 4 }} + {{- include "liferay.selectorLabels" $ | nindent 4 }} ports: - name: search port: {{ .config.port }} diff --git a/templates/service.yaml b/templates/service.yaml index 1890c4d..c6684cd 100644 --- a/templates/service.yaml +++ b/templates/service.yaml @@ -3,6 +3,7 @@ kind: Service metadata: name: {{ include "liferay.fullname" . }} labels: + app: {{ $.Chart.Name }} {{- include "liferay.labels" . | nindent 4 }} {{- with .Values.service.annotations }} annotations: @@ -15,4 +16,6 @@ spec: targetPort: http protocol: TCP name: http - selector: {{- include "liferay.selectorLabels" . | nindent 4 }} + selector: + app: {{ $.Chart.Name }} + {{- include "liferay.selectorLabels" . | nindent 4 }} diff --git a/templates/statefulset.yaml b/templates/statefulset.yaml index cb3412f..8636b28 100644 --- a/templates/statefulset.yaml +++ b/templates/statefulset.yaml @@ -3,6 +3,7 @@ kind: StatefulSet metadata: name: {{ include "liferay.fullname" . }} labels: + app: {{ $.Chart.Name }} {{- include "liferay.labels" . | nindent 4 }} spec: {{- if not .Values.autoscaling.enabled }} @@ -10,6 +11,7 @@ spec: {{- end }} selector: matchLabels: + app: {{ $.Chart.Name }} {{- include "liferay.selectorLabels" . | nindent 6 }} serviceName: {{ include "liferay.fullname" . }} template: @@ -19,6 +21,7 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} labels: + app: {{ $.Chart.Name }} {{- include "liferay.labels" . | nindent 8 }} {{- with .Values.podLabels }} {{- toYaml . | nindent 8 }}