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:
+6
-6
@@ -3,7 +3,7 @@ kind: Deployment
|
||||
metadata:
|
||||
name: unbound-site
|
||||
labels:
|
||||
app: unbound-site
|
||||
app.kubernetes.io/name: unbound-site
|
||||
annotations:
|
||||
kubernetes.io/change-cause: "${TIMESTAMP} Deployed commit id: ${COMMIT}"
|
||||
spec:
|
||||
@@ -16,11 +16,11 @@ spec:
|
||||
minReadySeconds: 30
|
||||
selector:
|
||||
matchLabels:
|
||||
app: unbound-site
|
||||
app.kubernetes.io/name: unbound-site
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: unbound-site
|
||||
app.kubernetes.io/name: unbound-site
|
||||
spec:
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
@@ -29,7 +29,7 @@ spec:
|
||||
podAffinityTerm:
|
||||
labelSelector:
|
||||
matchExpressions:
|
||||
- key: "app"
|
||||
- key: "app.kubernetes.io/name"
|
||||
operator: In
|
||||
values:
|
||||
- unbound-site
|
||||
@@ -62,11 +62,11 @@ kind: Service
|
||||
metadata:
|
||||
name: unbound-site
|
||||
labels:
|
||||
app: unbound-site
|
||||
app.kubernetes.io/name: unbound-site
|
||||
spec:
|
||||
type: NodePort
|
||||
selector:
|
||||
app: unbound-site
|
||||
app.kubernetes.io/name: unbound-site
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
|
||||
Reference in New Issue
Block a user