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.
This commit is contained in:
2025-01-24 14:59:58 +01:00
parent 53e2d5a69f
commit 4c6118116b
+6 -6
View File
@@ -3,7 +3,7 @@ kind: Deployment
metadata: metadata:
name: unbound-site name: unbound-site
labels: labels:
app: unbound-site app.kubernetes.io/name: unbound-site
annotations: annotations:
kubernetes.io/change-cause: "${TIMESTAMP} Deployed commit id: ${COMMIT}" kubernetes.io/change-cause: "${TIMESTAMP} Deployed commit id: ${COMMIT}"
spec: spec:
@@ -16,11 +16,11 @@ spec:
minReadySeconds: 30 minReadySeconds: 30
selector: selector:
matchLabels: matchLabels:
app: unbound-site app.kubernetes.io/name: unbound-site
template: template:
metadata: metadata:
labels: labels:
app: unbound-site app.kubernetes.io/name: unbound-site
spec: spec:
affinity: affinity:
podAntiAffinity: podAntiAffinity:
@@ -29,7 +29,7 @@ spec:
podAffinityTerm: podAffinityTerm:
labelSelector: labelSelector:
matchExpressions: matchExpressions:
- key: "app" - key: "app.kubernetes.io/name"
operator: In operator: In
values: values:
- unbound-site - unbound-site
@@ -62,11 +62,11 @@ kind: Service
metadata: metadata:
name: unbound-site name: unbound-site
labels: labels:
app: unbound-site app.kubernetes.io/name: unbound-site
spec: spec:
type: NodePort type: NodePort
selector: selector:
app: unbound-site app.kubernetes.io/name: unbound-site
ports: ports:
- port: 80 - port: 80
targetPort: 80 targetPort: 80