Skip to content

Commit

Permalink
Merge pull request #578 from bcgov/deprecating-deployment-configs
Browse files Browse the repository at this point in the history
fix: indistinguishable matchLabels across envs
  • Loading branch information
trev-dev authored Nov 19, 2024
2 parents 2569e1f + 26b7aeb commit eeddbc0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions tools/openshift/backend.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ objects:
annotations:
openshift.io/generated-by: OpenShiftNewApp
labels:
app: "${APP_NAME}-backend-deployment"
app: "${APP_NAME}-backend-${APP_ENVIRONMENT}-deployment"
branch: "${BRANCH}"
name: "${APP_NAME}-backend-${APP_ENVIRONMENT}"
spec:
replicas: ${{MIN_REPLICAS}}
selector:
matchLabels:
app: "${APP_NAME}-backend-deployment"
app: "${APP_NAME}-backend-${APP_ENVIRONMENT}-deployment"
strategy:
type: RollingUpdate
rollingUpdate:
Expand All @@ -30,7 +30,7 @@ objects:
annotations:
openshift.io/generated-by: OpenShiftNewApp
labels:
app: "${APP_NAME}-backend-deployment"
app: "${APP_NAME}-backend-${APP_ENVIRONMENT}-deployment"
spec:
containers:
- image: image-registry.openshift-image-registry.svc:5000/${NAMESPACE}/${REPO_NAME}-backend-${BRANCH}:${TAG}
Expand Down Expand Up @@ -132,7 +132,7 @@ objects:
service.alpha.openshift.io/serving-cert-secret-name: "ccof-backend-cert"
openshift.io/generated-by: OpenShiftNewApp
labels:
app: "${APP_NAME}-backend-deployment"
app: "${APP_NAME}-backend-${APP_ENVIRONMENT}-deployment"
name: "${APP_NAME}-backend-${APP_ENVIRONMENT}"
spec:
ports:
Expand All @@ -145,7 +145,7 @@ objects:
protocol: TCP
targetPort: 443
selector:
app: "${APP_NAME}-backend-deployment"
app: "${APP_NAME}-backend-${APP_ENVIRONMENT}-deployment"
- apiVersion: v1
kind: Route
metadata:
Expand All @@ -156,7 +156,7 @@ objects:
haproxy.router.openshift.io/timeout: 120s
openshift.io/host.generated: 'true'
labels:
app: "${APP_NAME}-backend-deployment"
app: "${APP_NAME}-backend-${APP_ENVIRONMENT}-deployment"
name: "${APP_NAME}-backend-${APP_ENVIRONMENT}"
spec:
host: "${HOST_ROUTE}"
Expand Down
12 changes: 6 additions & 6 deletions tools/openshift/frontend.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
annotations:
openshift.io/generated-by: OpenShiftNewApp
labels:
app: "${APP_NAME}-frontend-deployment"
app: "${APP_NAME}-frontend-${APP_ENVIRONMENT}-deployment"
branch: "${BRANCH}"
name: "${APP_NAME}-frontend-${APP_ENVIRONMENT}"
spec:
replicas: ${{MIN_REPLICAS}}
selector:
matchLabels:
app: "${APP_NAME}-frontend-deployment"
app: "${APP_NAME}-frontend-${APP_ENVIRONMENT}-deployment"
strategy:
type: RollingUpdate
rollingUpdate:
Expand All @@ -30,7 +30,7 @@
annotations:
openshift.io/generated-by: OpenShiftNewApp
labels:
app: "${APP_NAME}-frontend-deployment"
app: "${APP_NAME}-frontend-${APP_ENVIRONMENT}-deployment"
spec:
containers:
- image: image-registry.openshift-image-registry.svc:5000/${NAMESPACE}/${REPO_NAME}-frontend-${BRANCH}:${TAG}
Expand Down Expand Up @@ -85,7 +85,7 @@
service.alpha.openshift.io/serving-cert-secret-name: "ccof-frontend-cert"
openshift.io/generated-by: OpenShiftNewApp
labels:
app: "${APP_NAME}-frontend-deployment"
app: "${APP_NAME}-frontend-${APP_ENVIRONMENT}-deployment"
name: "${APP_NAME}-frontend-${APP_ENVIRONMENT}"
spec:
ports:
Expand All @@ -94,14 +94,14 @@
protocol: TCP
targetPort: 2015
selector:
app: "${APP_NAME}-frontend-deployment"
app: "${APP_NAME}-frontend-${APP_ENVIRONMENT}-deployment"
- apiVersion: v1
kind: Route
metadata:
annotations:
openshift.io/host.generated: 'true'
labels:
app: "${APP_NAME}-frontend-deployment"
app: "${APP_NAME}-frontend-${APP_ENVIRONMENT}-deployment"
name: "${APP_NAME}-frontend-${APP_ENVIRONMENT}"
spec:
host: "${HOST_ROUTE}"
Expand Down

0 comments on commit eeddbc0

Please sign in to comment.