Skip to content

Commit

Permalink
Converted DeploymentConfig to Deployment (#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
cditcher authored Dec 19, 2024
1 parent 0fd31ee commit 7220a72
Show file tree
Hide file tree
Showing 6 changed files with 100 additions and 81 deletions.
29 changes: 18 additions & 11 deletions .github/workflows/build.from.dev.branch.deploy.to.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ env:
IMAGE_REGISTRY_USER: ${{ github.actor }}
IMAGE_REGISTRY_PASSWORD: ${{ github.token }}

SPRING_BOOT_IMAGE_NAME: educ-grad-trax-api-dc
SPRING_BOOT_IMAGE_NAME: educ-grad-trax-api

REPO_NAME: "educ-grad-trax-api"
APP_DOMAIN: ${{ vars.APP_DOMAIN }}
BRANCH: "grad-release"
Expand Down Expand Up @@ -108,16 +109,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 }}/${{ github.event.inputs.choice }}/tools/config/update-configmap.sh \
Expand All @@ -144,14 +152,13 @@ jobs:
${{ secrets.STUDENT_ADMIN_URL_ROOT }}
# 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-grad-trax-api-dc
SPRING_BOOT_IMAGE_NAME: educ-grad-trax-api

REPO_NAME: "educ-grad-trax-api"
APP_DOMAIN: ${{ vars.APP_DOMAIN }}
Expand Down Expand Up @@ -96,16 +96,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 @@ -132,14 +139,13 @@ jobs:
${{ secrets.STUDENT_ADMIN_URL_ROOT }}
# 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'
31 changes: 19 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,8 @@ env:
IMAGE_REGISTRY_USER: ${{ github.actor }}
IMAGE_REGISTRY_PASSWORD: ${{ github.token }}

SPRING_BOOT_IMAGE_NAME: educ-grad-trax-api-dc
SPRING_BOOT_IMAGE_NAME: educ-grad-trax-api

REPO_NAME: "educ-grad-trax-api"
APP_DOMAIN: ${{ vars.APP_DOMAIN }}
BRANCH: "grad-release"
Expand Down Expand Up @@ -103,17 +104,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 @@ -139,14 +147,13 @@ jobs:
${{ secrets.STUDENT_ADMIN_URL_ROOT }}
# 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'
33 changes: 17 additions & 16 deletions .github/workflows/deploy_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
COMMON_NAMESPACE: ${{ vars.COMMON_NAMESPACE }}
BUSINESS_NAMESPACE: ${{ vars.GRAD_BUSINESS_NAMESPACE }}

SPRING_BOOT_IMAGE_NAME: educ-grad-trax-api-dc
SPRING_BOOT_IMAGE_NAME: educ-grad-trax-api

REPO_NAME: "educ-grad-trax-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.GRAD_NAMESPACE }}-test/${{ env.REPO_NAME }}:${{ steps.get-latest-tag.outputs.tag }} \
${{ env.GRAD_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 @@ -86,8 +88,7 @@ jobs:
${{ secrets.STUDENT_ADMIN_URL_ROOT }}
# 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 }}
33 changes: 17 additions & 16 deletions .github/workflows/deploy_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
COMMON_NAMESPACE: ${{ vars.COMMON_NAMESPACE }}
BUSINESS_NAMESPACE: ${{ vars.GRAD_BUSINESS_NAMESPACE }}

SPRING_BOOT_IMAGE_NAME: educ-grad-trax-api-dc
SPRING_BOOT_IMAGE_NAME: educ-grad-trax-api

REPO_NAME: "educ-grad-trax-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.GRAD_NAMESPACE }}-dev/${{ env.REPO_NAME }}:${{ steps.get-latest-tag.outputs.tag }} \
${{ env.GRAD_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 @@ -86,8 +88,7 @@ jobs:
${{ secrets.STUDENT_ADMIN_URL_ROOT }}
# 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 @@ -139,16 +137,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}}
#GRAD2-1947 Resource optimization
Expand Down

0 comments on commit 7220a72

Please sign in to comment.