Skip to content

Commit

Permalink
Merge pull request #18 from bcgov/deprecating-deployment-configs
Browse files Browse the repository at this point in the history
Distinguish between environment between matchLabels
  • Loading branch information
trev-dev authored Nov 19, 2024
2 parents faf4e12 + e7c61a7 commit 06b4896
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
5 changes: 0 additions & 5 deletions tools/config/update-configmap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,3 @@ oc create -n "$OPENSHIFT_NAMESPACE" configmap \
--from-file="appsettings.json=/tmp/appsettings.json" \
--dry-run -o yaml | oc apply -f -

echo
echo Setting environment variables for "$APP_NAME-d365api-$ENV_VAL" application
oc -n "$OPENSHIFT_NAMESPACE" set env \
--from="configmap/$APP_NAME-d365api-$ENV_VAL-config-map" \
"dc/$APP_NAME-d365api-$ENV_VAL"
12 changes: 6 additions & 6 deletions tools/openshift/d365api.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ objects:
annotations:
openshift.io/generated-by: OpenShiftNewApp
labels:
app: "${APP_NAME}-d365api-deployment"
app: "${APP_NAME}-d365api-${APP_ENVIRONMENT}-deployment"
name: "${APP_NAME}-d365api-${APP_ENVIRONMENT}"
spec:
replicas: ${{MIN_REPLICAS}}
selector:
matchLabels:
app: "${APP_NAME}-d365api-deployment"
app: "${APP_NAME}-d365api-${APP_ENVIRONMENT}-deployment"
strategy:
type: RollingUpdate
rollingUpdate:
Expand All @@ -29,7 +29,7 @@ objects:
annotations:
openshift.io/generated-by: OpenShiftNewApp
labels:
app: "${APP_NAME}-d365api-deployment"
app: "${APP_NAME}-d365api-${APP_ENVIRONMENT}-deployment"
spec:
containers:
- image: image-registry.openshift-image-registry.svc:5000/${NAMESPACE}/${REPO_NAME}-d365api-${BRANCH}:${TAG}
Expand Down Expand Up @@ -93,7 +93,7 @@ objects:
service.alpha.openshift.io/serving-cert-secret-name: "ccof-backend-cert"
openshift.io/generated-by: OpenShiftNewApp
labels:
app: "${APP_NAME}-d365api-deployment"
app: "${APP_NAME}-d365api-${APP_ENVIRONMENT}-deployment"
name: "${APP_NAME}-d365api-${APP_ENVIRONMENT}"
spec:
ports:
Expand All @@ -103,10 +103,10 @@ objects:
targetPort: 5091
- name: 443-https
port: 443
protocol: TCP
protocol: TCP
targetPort: 443
selector:
app: "${APP_NAME}-d365api-deployment"
app: "${APP_NAME}-d365api-${APP_ENVIRONMENT}-deployment"
- apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
Expand Down

0 comments on commit 06b4896

Please sign in to comment.