From 4c6118116bde1510218ab41cd43707aed5ad5d6e Mon Sep 17 00:00:00 2001 From: Joakim Olsson Date: Fri, 24 Jan 2025 14:59:58 +0100 Subject: [PATCH] fix(k8s): update labels and selectors for consistency Change label keys from "app" to "app.kubernetes.io/name" to standardize the label format across the deployment, service, and pod specifications. This improves clarity and ensures alignment with Kubernetes best practices for labeling and facilitates better management and selection of resources. --- k8s/deploy.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/k8s/deploy.yaml b/k8s/deploy.yaml index 70779c1..1017f78 100644 --- a/k8s/deploy.yaml +++ b/k8s/deploy.yaml @@ -3,7 +3,7 @@ kind: Deployment metadata: name: unbound-site labels: - app: unbound-site + app.kubernetes.io/name: unbound-site annotations: kubernetes.io/change-cause: "${TIMESTAMP} Deployed commit id: ${COMMIT}" spec: @@ -16,11 +16,11 @@ spec: minReadySeconds: 30 selector: matchLabels: - app: unbound-site + app.kubernetes.io/name: unbound-site template: metadata: labels: - app: unbound-site + app.kubernetes.io/name: unbound-site spec: affinity: podAntiAffinity: @@ -29,7 +29,7 @@ spec: podAffinityTerm: labelSelector: matchExpressions: - - key: "app" + - key: "app.kubernetes.io/name" operator: In values: - unbound-site @@ -62,11 +62,11 @@ kind: Service metadata: name: unbound-site labels: - app: unbound-site + app.kubernetes.io/name: unbound-site spec: type: NodePort selector: - app: unbound-site + app.kubernetes.io/name: unbound-site ports: - port: 80 targetPort: 80