Skip to content

Commit

Permalink
Merge pull request #509 from bcgov/GRAD2-3117
Browse files Browse the repository at this point in the history
Converted DeploymentConfig to Deployment
  • Loading branch information
kamal-mohammed authored Dec 19, 2024
2 parents 957253c + 7afc900 commit 96517c2
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 85 deletions.
32 changes: 19 additions & 13 deletions .github/workflows/build.from.developer.branch.deploy.to.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:
IMAGE_REGISTRY_USER: ${{ github.actor }}
IMAGE_REGISTRY_PASSWORD: ${{ github.token }}

SPRING_BOOT_IMAGE_NAME: educ-rule-engine-api-dc
SPRING_BOOT_IMAGE_NAME: educ-rule-engine-api

REPO_NAME: "educ-rule-engine-api"
APP_DOMAIN: ${{ vars.APP_DOMAIN }}
Expand Down Expand Up @@ -108,17 +108,24 @@ jobs:
oc login --token=${{ env.OPENSHIFT_TOKEN }} --server=${{ env.OPENSHIFT_SERVER }}
oc project ${{ env.OPENSHIFT_NAMESPACE }}
# Cancel any rollouts in progress
oc rollout cancel dc/${{ env.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
oc rollout cancel deployment/${{ env.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
|| true && echo "No rollout in progress"
# tag image stream
oc -n ${{ env.OPENSHIFT_NAMESPACE }} tag ${{ steps.push-image.outputs.registry-path }} ${{ env.REPO_NAME }}:${{ env.TAG }}
# Process and apply deployment template
oc process -f tools/openshift/api.dc.yaml -p IS_NAMESPACE=${{ env.OPENSHIFT_NAMESPACE }} -p REPO_NAME=${{ env.REPO_NAME }} \
-p TAG_NAME=${{ env.TAG }} -p HOST_ROUTE=${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}.${{ env.APP_DOMAIN }} \
-p MIN_REPLICAS=${{ env.MIN_REPLICAS }} -p MAX_REPLICAS=${{ env.MAX_REPLICAS }} -p MIN_CPU=${{ env.MIN_CPU }} \
-p MAX_CPU=${{ env.MAX_CPU }} -p MIN_MEM=${{ env.MIN_MEM }} -p MAX_MEM=${{ env.MAX_MEM }} | oc apply -f -
oc process -f tools/openshift/api.dc.yaml \
-p IS_NAMESPACE=${{ env.OPENSHIFT_NAMESPACE }} \
-p REPO_NAME=${{ env.REPO_NAME }} \
-p TAG_NAME=${{ env.TAG }} \
-p HOST_ROUTE=${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}.${{ env.APP_DOMAIN }} \
-p MIN_REPLICAS=${{ env.MIN_REPLICAS }} \
-p MAX_REPLICAS=${{ env.MAX_REPLICAS }} \
-p MIN_CPU=${{ env.MIN_CPU }} \
-p MAX_CPU=${{ env.MAX_CPU }} \
-p MIN_MEM=${{ env.MIN_MEM }} \
-p MAX_MEM=${{ env.MAX_MEM }} | oc apply -f -
# UPDATE Configmaps
curl -s https://raw.githubusercontent.com/bcgov/${{ env.REPO_NAME }}/${{ github.event.inputs.choice }}/tools/config/update-configmap.sh \
| bash /dev/stdin \
Expand All @@ -130,7 +137,7 @@ jobs:
${{ secrets.SPLUNK_TOKEN }} \
${{ vars.APP_LOG_LEVEL }}
# OVERRIDe Configmaps
# OVERRIDE Configmaps
curl -s https://raw.githubusercontent.com/bcgov/${{ env.REPO_NAME }}/${{ github.event.inputs.choice }}/tools/config/override-configmap-dev.sh \
| bash /dev/stdin \
dev \
Expand All @@ -142,14 +149,13 @@ jobs:
${{ vars.APP_LOG_LEVEL }}
# Start rollout (if necessary) and follow it
oc rollout latest dc/${{ env.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
|| true && echo "Rollout in progress"
oc logs -f dc/${{ env.SPRING_BOOT_IMAGE_NAME }}
oc rollout restart deployment/${{ env.SPRING_BOOT_IMAGE_NAME }}
# Get status, returns 0 if rollout is successful
oc rollout status dc/${{ env.SPRING_BOOT_IMAGE_NAME }}
oc rollout status deployment/${{ env.SPRING_BOOT_IMAGE_NAME }}
# now hit it with a zap scan
- name: ZAP Scan
uses: zaproxy/[email protected]
with:
target: 'https://${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}.apps.silver.devops.gov.bc.ca/api/v1/api-docs'
target: 'https://${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}.apps.silver.devops.gov.bc.ca/api/v1/api-docs'
28 changes: 17 additions & 11 deletions .github/workflows/build.from.main.branch.deploy.to.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:
IMAGE_REGISTRY_USER: ${{ github.actor }}
IMAGE_REGISTRY_PASSWORD: ${{ github.token }}

SPRING_BOOT_IMAGE_NAME: educ-rule-engine-api-dc
SPRING_BOOT_IMAGE_NAME: educ-rule-engine-api

REPO_NAME: "educ-rule-engine-api"
APP_DOMAIN: ${{ vars.APP_DOMAIN }}
Expand Down Expand Up @@ -94,16 +94,23 @@ jobs:
oc login --token=${{ env.OPENSHIFT_TOKEN }} --server=${{ env.OPENSHIFT_SERVER }}
oc project ${{ env.OPENSHIFT_NAMESPACE }}
# Cancel any rollouts in progress
oc rollout cancel dc/${{ env.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
oc rollout cancel deployment/${{ env.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
|| true && echo "No rollout in progress"
# tag image stream
oc -n ${{ env.OPENSHIFT_NAMESPACE }} tag ${{ steps.push-image.outputs.registry-path }} ${{ env.REPO_NAME }}:${{ env.TAG }}
# Process and apply deployment template
oc process -f tools/openshift/api.dc.yaml -p IS_NAMESPACE=${{ env.OPENSHIFT_NAMESPACE }} -p REPO_NAME=${{ env.REPO_NAME }} \
-p TAG_NAME=${{ env.TAG }} -p HOST_ROUTE=${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}.${{ env.APP_DOMAIN }} \
-p MIN_REPLICAS=${{ env.MIN_REPLICAS }} -p MAX_REPLICAS=${{ env.MAX_REPLICAS }} -p MIN_CPU=${{ env.MIN_CPU }} \
-p MAX_CPU=${{ env.MAX_CPU }} -p MIN_MEM=${{ env.MIN_MEM }} -p MAX_MEM=${{ env.MAX_MEM }} | oc apply -f -
oc process -f tools/openshift/api.dc.yaml \
-p IS_NAMESPACE=${{ env.OPENSHIFT_NAMESPACE }} \
-p REPO_NAME=${{ env.REPO_NAME }} \
-p TAG_NAME=${{ env.TAG }} \
-p HOST_ROUTE=${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}.${{ env.APP_DOMAIN }} \
-p MIN_REPLICAS=${{ env.MIN_REPLICAS }} \
-p MAX_REPLICAS=${{ env.MAX_REPLICAS }} \
-p MIN_CPU=${{ env.MIN_CPU }} \
-p MAX_CPU=${{ env.MAX_CPU }} \
-p MIN_MEM=${{ env.MIN_MEM }} \
-p MAX_MEM=${{ env.MAX_MEM }} | oc apply -f -
# UPDATE Configmaps
curl -s https://raw.githubusercontent.com/bcgov/${{ env.REPO_NAME }}/${{ env.BRANCH }}/tools/config/update-configmap.sh \
Expand All @@ -128,14 +135,13 @@ jobs:
${{ vars.APP_LOG_LEVEL }}
# Start rollout (if necessary) and follow it
oc rollout latest dc/${{ env.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
|| true && echo "Rollout in progress"
oc logs -f dc/${{ env.SPRING_BOOT_IMAGE_NAME }}
oc rollout restart deployment/${{ env.SPRING_BOOT_IMAGE_NAME }}
# Get status, returns 0 if rollout is successful
oc rollout status dc/${{ env.SPRING_BOOT_IMAGE_NAME }}
oc rollout status deployment/${{ env.SPRING_BOOT_IMAGE_NAME }}
# now hit it with a zap scan
- name: ZAP Scan
uses: zaproxy/[email protected]
with:
target: 'https://${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}.apps.silver.devops.gov.bc.ca/api/v1/api-docs'
target: 'https://${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}.apps.silver.devops.gov.bc.ca/api/v1/api-docs'
30 changes: 18 additions & 12 deletions .github/workflows/build.from.release.branch.deploy.to.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:
IMAGE_REGISTRY_USER: ${{ github.actor }}
IMAGE_REGISTRY_PASSWORD: ${{ github.token }}

SPRING_BOOT_IMAGE_NAME: educ-rule-engine-api-dc
SPRING_BOOT_IMAGE_NAME: educ-rule-engine-api

REPO_NAME: "educ-rule-engine-api"
APP_DOMAIN: ${{ vars.APP_DOMAIN }}
Expand Down Expand Up @@ -103,17 +103,24 @@ jobs:
oc login --token=${{ env.OPENSHIFT_TOKEN }} --server=${{ env.OPENSHIFT_SERVER }}
oc project ${{ env.OPENSHIFT_NAMESPACE }}
# Cancel any rollouts in progress
oc rollout cancel dc/${{ env.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
oc rollout cancel deployment/${{ env.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
|| true && echo "No rollout in progress"
# tag image stream
oc -n ${{ env.OPENSHIFT_NAMESPACE }} tag ${{ steps.push-image.outputs.registry-path }} ${{ env.REPO_NAME }}:${{ env.TAG }}
# Process and apply deployment template
oc process -f tools/openshift/api.dc.yaml -p IS_NAMESPACE=${{ env.OPENSHIFT_NAMESPACE }} -p REPO_NAME=${{ env.REPO_NAME }} \
-p TAG_NAME=${{ env.TAG }} -p HOST_ROUTE=${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}.${{ env.APP_DOMAIN }} \
-p MIN_REPLICAS=${{ env.MIN_REPLICAS }} -p MAX_REPLICAS=${{ env.MAX_REPLICAS }} -p MIN_CPU=${{ env.MIN_CPU }} \
-p MAX_CPU=${{ env.MAX_CPU }} -p MIN_MEM=${{ env.MIN_MEM }} -p MAX_MEM=${{ env.MAX_MEM }} | oc apply -f -
oc process -f tools/openshift/api.dc.yaml \
-p IS_NAMESPACE=${{ env.OPENSHIFT_NAMESPACE }} \
-p REPO_NAME=${{ env.REPO_NAME }} \
-p TAG_NAME=${{ env.TAG }} \
-p HOST_ROUTE=${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}.${{ env.APP_DOMAIN }} \
-p MIN_REPLICAS=${{ env.MIN_REPLICAS }} \
-p MAX_REPLICAS=${{ env.MAX_REPLICAS }} \
-p MIN_CPU=${{ env.MIN_CPU }} \
-p MAX_CPU=${{ env.MAX_CPU }} \
-p MIN_MEM=${{ env.MIN_MEM }} \
-p MAX_MEM=${{ env.MAX_MEM }} | oc apply -f -
# UPDATE Configmaps
curl -s https://raw.githubusercontent.com/bcgov/${{ env.REPO_NAME }}/${{ env.BRANCH }}/tools/config/update-configmap.sh \
| bash /dev/stdin \
Expand All @@ -137,14 +144,13 @@ jobs:
${{ vars.APP_LOG_LEVEL }}
# Start rollout (if necessary) and follow it
oc rollout latest dc/${{ env.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
|| true && echo "Rollout in progress"
oc logs -f dc/${{ env.SPRING_BOOT_IMAGE_NAME }}
oc rollout restart deployment/${{ env.SPRING_BOOT_IMAGE_NAME }}
# Get status, returns 0 if rollout is successful
oc rollout status dc/${{ env.SPRING_BOOT_IMAGE_NAME }}
oc rollout status deployment/${{ env.SPRING_BOOT_IMAGE_NAME }}
# now hit it with a zap scan
- name: ZAP Scan
uses: zaproxy/[email protected]
with:
target: 'https://${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}.apps.silver.devops.gov.bc.ca/api/v1/api-docs'
target: 'https://${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}.apps.silver.devops.gov.bc.ca/api/v1/api-docs'
35 changes: 18 additions & 17 deletions .github/workflows/deploy_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
COMMON_NAMESPACE: ${{ vars.COMMON_NAMESPACE }}
BUSINESS_NAMESPACE: ${{ vars.GRAD_BUSINESS_NAMESPACE }}

SPRING_BOOT_IMAGE_NAME: educ-rule-engine-api-dc
SPRING_BOOT_IMAGE_NAME: educ-rule-engine-api

REPO_NAME: "educ-rule-engine-api"
APP_DOMAIN: ${{ vars.APP_DOMAIN }}
Expand All @@ -35,13 +35,9 @@ jobs:
runs-on: ubuntu-22.04
environment: prod

outputs:
ROUTE: ${{ steps.deploy-and-expose.outputs.route }}
SELECTOR: ${{ steps.deploy-and-expose.outputs.selector }}

steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Get latest tag
uses: actions-ecosystem/action-get-latest-tag@v1
Expand All @@ -53,25 +49,31 @@ jobs:
oc: 4

# https://github.com/redhat-actions/oc-login#readme
- uses: actions/checkout@v2
- name: Deploy
run: |
set -eux
# Login to OpenShift and select project
oc login --token=${{ env.OPENSHIFT_TOKEN }} --server=${{ env.OPENSHIFT_SERVER }}
oc project ${{ env.OPENSHIFT_NAMESPACE }}
# Cancel any rollouts in progress
oc rollout cancel dc/${{ env.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
oc rollout cancel deployment/${{ env.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
|| true && echo "No rollout in progress"
oc tag ${{ env.BUSINESS_NAMESPACE }}-test/${{ env.REPO_NAME }}:${{ steps.get-latest-tag.outputs.tag }} \
${{ env.BUSINESS_NAMESPACE }}-prod/${{ env.REPO_NAME }}:${{ steps.get-latest-tag.outputs.tag }}
# Process and apply deployment template
oc process -f tools/openshift/api.dc.yaml -p IS_NAMESPACE=${{ env.OPENSHIFT_NAMESPACE }} -p REPO_NAME=${{ env.REPO_NAME }} \
-p TAG_NAME=${{ steps.get-latest-tag.outputs.tag }} -p HOST_ROUTE=${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}.${{ env.APP_DOMAIN }} \
-p MIN_REPLICAS=${{ env.MIN_REPLICAS }} -p MAX_REPLICAS=${{ env.MAX_REPLICAS }} -p MIN_CPU=${{ env.MIN_CPU }} -p MAX_CPU=${{ env.MAX_CPU }} \
-p MIN_MEM=${{ env.MIN_MEM }} -p MAX_MEM=${{ env.MAX_MEM }} | oc apply -f -
oc process -f tools/openshift/api.dc.yaml \
-p IS_NAMESPACE=${{ env.OPENSHIFT_NAMESPACE }} \
-p REPO_NAME=${{ env.REPO_NAME }} \
-p TAG_NAME=${{ steps.get-latest-tag.outputs.tag }} \
-p HOST_ROUTE=${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}.${{ env.APP_DOMAIN }} \
-p MIN_REPLICAS=${{ env.MIN_REPLICAS }} \
-p MAX_REPLICAS=${{ env.MAX_REPLICAS }} \
-p MIN_CPU=${{ env.MIN_CPU }} \
-p MAX_CPU=${{ env.MAX_CPU }} \
-p MIN_MEM=${{ env.MIN_MEM }} \
-p MAX_MEM=${{ env.MAX_MEM }} | oc apply -f -
# UPDATE Configmaps
curl -s https://raw.githubusercontent.com/bcgov/${{ env.REPO_NAME }}/${{ env.BRANCH }}/tools/config/update-configmap.sh \
Expand All @@ -83,10 +85,9 @@ jobs:
${{ env.BUSINESS_NAMESPACE }} \
${{ secrets.SPLUNK_TOKEN }} \
${{ vars.APP_LOG_LEVEL }}
# Start rollout (if necessary) and follow it
oc rollout latest dc/${{ env.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
|| true && echo "Rollout in progress"
oc logs -f dc/${{ env.SPRING_BOOT_IMAGE_NAME }}
oc rollout restart deployment/${{ env.SPRING_BOOT_IMAGE_NAME }}
# Get status, returns 0 if rollout is successful
oc rollout status dc/${{ env.SPRING_BOOT_IMAGE_NAME }}
oc rollout status deployment/${{ env.SPRING_BOOT_IMAGE_NAME }}
35 changes: 18 additions & 17 deletions .github/workflows/deploy_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
COMMON_NAMESPACE: ${{ vars.COMMON_NAMESPACE }}
BUSINESS_NAMESPACE: ${{ vars.GRAD_BUSINESS_NAMESPACE }}

SPRING_BOOT_IMAGE_NAME: educ-rule-engine-api-dc
SPRING_BOOT_IMAGE_NAME: educ-rule-engine-api

REPO_NAME: "educ-rule-engine-api"
APP_DOMAIN: ${{ vars.APP_DOMAIN }}
Expand All @@ -35,13 +35,9 @@ jobs:
runs-on: ubuntu-22.04
environment: test

outputs:
ROUTE: ${{ steps.deploy-and-expose.outputs.route }}
SELECTOR: ${{ steps.deploy-and-expose.outputs.selector }}

steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Get latest tag
uses: actions-ecosystem/action-get-latest-tag@v1
Expand All @@ -53,25 +49,31 @@ jobs:
oc: 4

# https://github.com/redhat-actions/oc-login#readme
- uses: actions/checkout@v2
- name: Deploy
run: |
set -eux
# Login to OpenShift and select project
oc login --token=${{ env.OPENSHIFT_TOKEN }} --server=${{ env.OPENSHIFT_SERVER }}
oc project ${{ env.OPENSHIFT_NAMESPACE }}
# Cancel any rollouts in progress
oc rollout cancel dc/${{ env.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
oc rollout cancel deployment/${{ env.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
|| true && echo "No rollout in progress"
oc tag ${{ env.BUSINESS_NAMESPACE }}-dev/${{ env.REPO_NAME }}:${{ steps.get-latest-tag.outputs.tag }} \
${{ env.BUSINESS_NAMESPACE }}-test/${{ env.REPO_NAME }}:${{ steps.get-latest-tag.outputs.tag }}
# Process and apply deployment template
oc process -f tools/openshift/api.dc.yaml -p IS_NAMESPACE=${{ env.OPENSHIFT_NAMESPACE }} -p REPO_NAME=${{ env.REPO_NAME }} \
-p TAG_NAME=${{ steps.get-latest-tag.outputs.tag }} -p HOST_ROUTE=${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}.${{ env.APP_DOMAIN }} \
-p MIN_REPLICAS=${{ env.MIN_REPLICAS }} -p MAX_REPLICAS=${{ env.MAX_REPLICAS }} -p MIN_CPU=${{ env.MIN_CPU }} -p MAX_CPU=${{ env.MAX_CPU }} \
-p MIN_MEM=${{ env.MIN_MEM }} -p MAX_MEM=${{ env.MAX_MEM }} | oc apply -f -
oc process -f tools/openshift/api.dc.yaml \
-p IS_NAMESPACE=${{ env.OPENSHIFT_NAMESPACE }} \
-p REPO_NAME=${{ env.REPO_NAME }} \
-p TAG_NAME=${{ steps.get-latest-tag.outputs.tag }} \
-p HOST_ROUTE=${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}.${{ env.APP_DOMAIN }} \
-p MIN_REPLICAS=${{ env.MIN_REPLICAS }} \
-p MAX_REPLICAS=${{ env.MAX_REPLICAS }} \
-p MIN_CPU=${{ env.MIN_CPU }} \
-p MAX_CPU=${{ env.MAX_CPU }} \
-p MIN_MEM=${{ env.MIN_MEM }} \
-p MAX_MEM=${{ env.MAX_MEM }} | oc apply -f -
# UPDATE Configmaps
curl -s https://raw.githubusercontent.com/bcgov/${{ env.REPO_NAME }}/${{ env.BRANCH }}/tools/config/update-configmap.sh \
Expand All @@ -83,10 +85,9 @@ jobs:
${{ env.BUSINESS_NAMESPACE }} \
${{ secrets.SPLUNK_TOKEN }} \
${{ vars.APP_LOG_LEVEL }}
# Start rollout (if necessary) and follow it
oc rollout latest dc/${{ env.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
|| true && echo "Rollout in progress"
oc logs -f dc/${{ env.SPRING_BOOT_IMAGE_NAME }}
oc rollout restart deployment/${{ env.SPRING_BOOT_IMAGE_NAME }}
# Get status, returns 0 if rollout is successful
oc rollout status dc/${{ env.SPRING_BOOT_IMAGE_NAME }}
oc rollout status deployment/${{ env.SPRING_BOOT_IMAGE_NAME }}
27 changes: 12 additions & 15 deletions tools/openshift/api.dc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,27 @@ labels:
metadata:
name: "${REPO_NAME}-deploy-template"
objects:
- apiVersion: v1
kind: DeploymentConfig
- apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: "${REPO_NAME}"
app.kubernetes.io/part-of: GRAD-Backend-API
app.openshift.io/runtime: spring-boot
name: "${REPO_NAME}-dc"
name: "${REPO_NAME}"
spec:
replicas: 1
revisionHistoryLimit: 1
triggers: []
replicas: ${{MIN_REPLICAS}}
selector:
app: "${REPO_NAME}"
deploymentConfig: "${REPO_NAME}-dc"
matchLabels:
app: "${REPO_NAME}"
strategy:
resources: {}
type: Rolling
rollingUpdate:
maxUnavailable: 25%
maxSurge: 25%
template:
metadata:
labels:
app: "${REPO_NAME}"
deploymentConfig: "${REPO_NAME}-dc"
spec:
containers:
- image: image-registry.openshift-image-registry.svc:5000/${IS_NAMESPACE}/${REPO_NAME}:${TAG_NAME}
Expand Down Expand Up @@ -129,16 +127,15 @@ objects:
protocol: TCP
selector:
app: "${REPO_NAME}"
deploymentconfig: "${REPO_NAME}-dc"
- apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: "${REPO_NAME}-cpu-autoscaler"
spec:
scaleTargetRef:
apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
name: "${REPO_NAME}-dc"
apiVersion: apps/v1
kind: Deployment
name: "${REPO_NAME}"
minReplicas: ${{MIN_REPLICAS}}
maxReplicas: ${{MAX_REPLICAS}}
metrics:
Expand Down

0 comments on commit 96517c2

Please sign in to comment.