diff --git a/templates/admin-deployment.yaml b/templates/admin-deployment.yaml index 2af2876..0a8edff 100644 --- a/templates/admin-deployment.yaml +++ b/templates/admin-deployment.yaml @@ -16,7 +16,7 @@ spec: template: metadata: labels: - role: wordpress + app: {{ .Values.name }} {{- include "adminSelectorLabels" . | nindent 8 }} spec: securityContext: diff --git a/templates/networkpolicy.yaml b/templates/networkpolicy.yaml index 5e29854..bf07da2 100644 --- a/templates/networkpolicy.yaml +++ b/templates/networkpolicy.yaml @@ -5,11 +5,7 @@ metadata: spec: podSelector: matchLabels: - {{- if .Values.static.enabled }} - role: wordpress - {{- else }} - role: nginx - {{- end }} + app: {{ .Values.name }} policyTypes: - Ingress - Egress diff --git a/templates/nginx-deployment.yaml b/templates/nginx-deployment.yaml index 02d197c..d1bd7f2 100644 --- a/templates/nginx-deployment.yaml +++ b/templates/nginx-deployment.yaml @@ -17,7 +17,6 @@ spec: template: metadata: labels: - role: nginx app: {{ .Values.name }} {{- include "selectorLabels" . | nindent 8 }} spec: diff --git a/templates/wordpress-deployment.yaml b/templates/wordpress-deployment.yaml index b2906ca..cbce78d 100644 --- a/templates/wordpress-deployment.yaml +++ b/templates/wordpress-deployment.yaml @@ -17,7 +17,7 @@ spec: template: metadata: labels: - role: wordpress + app: {{ .Values.name }} {{- include "selectorLabels" . | nindent 8 }} spec: securityContext: