Skip to content

Commit

Permalink
Merge pull request #17 from JrCs/fix-controller-hpa
Browse files Browse the repository at this point in the history
Fix deployment of boundary-controller when HPA is enabled
  • Loading branch information
jbouse authored Jul 28, 2022
2 parents d71fee5 + fcbfa5a commit dcb2c00
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions templates/database-init-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ spec:
/tools/kubectl wait --for=delete pod -l app.kubernetes.io/component={{ include "boundary.fullname" . }}-controller --timeout=300s || true
echo "Migrating database..."
boundary database migrate -config /boundary/boundary-config.hcl || boundary database init {{ include "boundary.database.init" . | trim }} -config /boundary/boundary-config.hcl || sleep infinity
{{- if not .Values.controller.autoscaling.enabled }}
/tools/kubectl scale --replicas={{ default .Values.global.replicaCount .Values.controller.replicaCount }} deployment/{{ include "boundary.fullname" . }}-controller || true
{{- $replicas := default .Values.global.replicaCount .Values.controller.replicaCount }}
{{- if .Values.controller.autoscaling.enabled }}
{{- $replicas = default .Values.controller.autoscaling.minReplicas }}
{{- end }}
/tools/kubectl scale --replicas={{ $replicas }} deployment/{{ include "boundary.fullname" . }}-controller || true
env:
- name: HOSTNAME
value: boundary
Expand Down

0 comments on commit dcb2c00

Please sign in to comment.