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.
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@ apiVersion: autoscaling/v2
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
labels:
|
||||
app: schemas
|
||||
app.kubernetes.io/name: schemas
|
||||
name: schemas
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
|
||||
+5
-5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user