From 74823a894704e5d9229b94b9ef21b55d6d585f9a Mon Sep 17 00:00:00 2001 From: Joakim Olsson Date: Fri, 24 Jan 2025 15:14:13 +0100 Subject: [PATCH] fix(k8s): standardize app label to app.kubernetes.io/name Update Kubernetes YAML files to replace the app label with the standard app.kubernetes.io/name label for better consistency and adherence to best practices in Kubernetes resource labeling. --- k8s/autoscale.yaml | 2 +- k8s/deploy.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/k8s/autoscale.yaml b/k8s/autoscale.yaml index 32e5515..9509b9f 100644 --- a/k8s/autoscale.yaml +++ b/k8s/autoscale.yaml @@ -2,7 +2,7 @@ apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: labels: - app: schemas + app.kubernetes.io/name: schemas name: schemas spec: scaleTargetRef: diff --git a/k8s/deploy.yaml b/k8s/deploy.yaml index a938428..8c33b5b 100644 --- a/k8s/deploy.yaml +++ b/k8s/deploy.yaml @@ -7,7 +7,7 @@ apiVersion: apps/v1 kind: Deployment metadata: labels: - app: schemas + app.kubernetes.io/name: schemas name: schemas annotations: kubernetes.io/change-cause: "${TIMESTAMP} Deployed commit id: ${COMMIT}" @@ -15,7 +15,7 @@ spec: replicas: 1 selector: matchLabels: - app: schemas + app.kubernetes.io/name: schemas strategy: rollingUpdate: maxSurge: 1 @@ -24,7 +24,7 @@ spec: template: metadata: labels: - app: schemas + app.kubernetes.io/name: schemas spec: affinity: podAntiAffinity: @@ -33,7 +33,7 @@ spec: podAffinityTerm: labelSelector: matchExpressions: - - key: "app" + - key: "app.kubernetes.io/name" operator: In values: - schemas @@ -79,5 +79,5 @@ spec: protocol: TCP targetPort: 8080 selector: - app: schemas + app.kubernetes.io/name: schemas type: NodePort