Skip to content

Commit

Permalink
Override images in deploy/* before release
Browse files Browse the repository at this point in the history
Bit of a hack, but that's ok for now. We can switch to properly using
kustomize as a separate PR.
  • Loading branch information
sharnoff committed Jan 11, 2023
1 parent 5bc9f34 commit f5e24b0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ jobs:
docker cp $ID:/usr/bin/vm-informant bin/vm-informant
docker rm -f $ID
# note: We *could* use something like kustomize for this. But there's extra steps (e.g.,
# adding kustomization.yaml) and sed is simple; so we can deal with this for now.
- name: modify deploy files to use current image(s)
run: |
sed -i -e s^localhost:5001/autoscaler-agent:latest^${{ env.AGENT_IMAGE }}:${{ steps.get_vcs_info.outputs.version }} deploy/autoscale-scheduler.yaml
sed -i -e s^localhost:5001/kube-autoscale-scheduler:latest^${{ env.SCHED_IMAGE }}:${{ steps.get_vcs_info.outputs.version }} deploy/autoscaler-agent.yaml
- name: github release
uses: softprops/action-gh-release@v1
with:
Expand Down
2 changes: 2 additions & 0 deletions deploy/autoscale-scheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ spec:
spec:
serviceAccountName: autoscale-scheduler
containers:
# hey! This image name is hard-coded in .github/workflows/release.yaml - make sure to
# update that as well if you change this line!
- image: localhost:5001/kube-autoscale-scheduler:latest
command: ["/usr/bin/kube-scheduler", "--config=/etc/kubernetes/autoscale-scheduler-config/scheduler-config.yaml"]
livenessProbe:
Expand Down
2 changes: 2 additions & 0 deletions deploy/autoscaler-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ spec:
serviceAccountName: autoscaler-agent
containers:
- name: autoscaler-agent
# hey! This image name is hard-coded in .github/workflows/release.yaml - make sure to
# update that as well if you change this line!
image: localhost:5001/autoscaler-agent:latest
resources:
limits:
Expand Down

0 comments on commit f5e24b0

Please sign in to comment.