fix: update app labels to use correct Kubernetes naming

Refactor Kubernetes resource definitions to replace the label  
"app" with "app.kubernetes.io/name" for the dancefinder-app.  
This change enhances consistency with Kubernetes best practices  
and improves clarity in resource labeling across deployments,  
services, and autoscalers.
This commit is contained in:
2025-01-24 16:46:49 +01:00
parent 91d49fe3e6
commit f150ae2c64
2 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
labels:
app: dancefinder-app
app.kubernetes.io/name: dancefinder-app
name: dancefinder-app
spec:
scaleTargetRef:
+6 -6
View File
@@ -3,7 +3,7 @@ kind: Deployment
metadata:
name: dancefinder-app
labels:
app: dancefinder-app
app.kubernetes.io/name: dancefinder-app
annotations:
kubernetes.io/change-cause: "${TIMESTAMP} Deployed commit id: ${COMMIT}"
spec:
@@ -16,11 +16,11 @@ spec:
minReadySeconds: 30
selector:
matchLabels:
app: dancefinder-app
app.kubernetes.io/name: dancefinder-app
template:
metadata:
labels:
app: dancefinder-app
app.kubernetes.io/name: dancefinder-app
spec:
affinity:
podAntiAffinity:
@@ -29,7 +29,7 @@ spec:
podAffinityTerm:
labelSelector:
matchExpressions:
- key: "app"
- key: "app.kubernetes.io/name"
operator: In
values:
- dancefinder-app
@@ -63,11 +63,11 @@ kind: Service
metadata:
name: dancefinder-app
labels:
app: dancefinder-app
app.kubernetes.io/name: dancefinder-app
spec:
type: NodePort
selector:
app: dancefinder-app
app.kubernetes.io/name: dancefinder-app
ports:
- port: 80
targetPort: 80