Skip to content

Commit

Permalink
fix: keycloak upgrade wait (#1037)
Browse files Browse the repository at this point in the history
## Description

keycloak upgrades on major versions seem to be a bit finicky. Adding a
wait to kubectl scale down so that the scale down finishes, before the
update happens.


## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Other (security config, docs update, etc)

## Checklist before merging

- [x] Test, docs, adr added or updated as needed
- [x] [Contributor
Guide](https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md)
followed

---------

Co-authored-by: Micah Nagel <[email protected]>
  • Loading branch information
UnicornChance and mjnagel authored Nov 22, 2024
1 parent ccd0a32 commit 1207812
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/keycloak/common/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ components:
echo "Keycloak is installed and not on the latest version. Scaling down..."
zarf tools kubectl delete hpa keycloak -n keycloak
zarf tools kubectl scale statefulsets keycloak -n keycloak --replicas=1
zarf tools kubectl wait --for=jsonpath='{.status.replicas}'=1 statefulset/keycloak -n keycloak --timeout=60s
export KEYCLOAK_IS_HA=true
else
echo "Keycloak is not deployed in HA mode, skipping scale down."
Expand Down

0 comments on commit 1207812

Please sign in to comment.