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:
@@ -2,7 +2,7 @@ apiVersion: autoscaling/v2
|
|||||||
kind: HorizontalPodAutoscaler
|
kind: HorizontalPodAutoscaler
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: dancefinder-app
|
app.kubernetes.io/name: dancefinder-app
|
||||||
name: dancefinder-app
|
name: dancefinder-app
|
||||||
spec:
|
spec:
|
||||||
scaleTargetRef:
|
scaleTargetRef:
|
||||||
|
|||||||
+6
-6
@@ -3,7 +3,7 @@ kind: Deployment
|
|||||||
metadata:
|
metadata:
|
||||||
name: dancefinder-app
|
name: dancefinder-app
|
||||||
labels:
|
labels:
|
||||||
app: dancefinder-app
|
app.kubernetes.io/name: dancefinder-app
|
||||||
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: dancefinder-app
|
app.kubernetes.io/name: dancefinder-app
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: dancefinder-app
|
app.kubernetes.io/name: dancefinder-app
|
||||||
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:
|
||||||
- dancefinder-app
|
- dancefinder-app
|
||||||
@@ -63,11 +63,11 @@ kind: Service
|
|||||||
metadata:
|
metadata:
|
||||||
name: dancefinder-app
|
name: dancefinder-app
|
||||||
labels:
|
labels:
|
||||||
app: dancefinder-app
|
app.kubernetes.io/name: dancefinder-app
|
||||||
spec:
|
spec:
|
||||||
type: NodePort
|
type: NodePort
|
||||||
selector:
|
selector:
|
||||||
app: dancefinder-app
|
app.kubernetes.io/name: dancefinder-app
|
||||||
ports:
|
ports:
|
||||||
- port: 80
|
- port: 80
|
||||||
targetPort: 80
|
targetPort: 80
|
||||||
|
|||||||
Reference in New Issue
Block a user