Skip to content

Conversation

dylantangredi-jakala
Copy link
Collaborator

@dylantangredi-jakala dylantangredi-jakala commented Oct 6, 2025

List of Changes

  • upgraded helm chart to v8.0.2
  • added rolling update strategy (maxUnavailable, maxSurge)
  • overridden deployment replicas to match HPA minReplica config

NOTE: upgraded in

  • DEV -> OK
  • UAT -> TODO
  • PROD -> TODO

Motivation and Context

This upgrade was required to address an issue with the rollout strategy and the autoscaler behaviour, where the pods would scale down to 1 during deploy instead of keeping the same number of pods and doing +1 -1 to avoid traffic congestion. Also replicas are set to match the autoscaling config during deploy, to avoid starting the service with 1 pod when there is relevant traffic on the service.
This also ensures zero-downtime deployments by keeping all existing pods running until new versions are healthy and ready, then replacing them one at a time.

How Has This Been Tested?

VERY IMPORTANT

The scripts needs to be adapted for every service and launched on each environment before actually upgrading through helm upgrade (ref. https://github.com/pagopa/aks-microservice-chart-blueprint/blob/main/scripts/migrate_from_v7_to_v8.sh)

❯ ../migrate_from_v7_to_v8.sh pagopagpdpayments-microservice-chart pagopagpdpayments gps
scaledobject.keda.sh/pagopagpdpayments-microservice-chart labeled
scaledobject.keda.sh/pagopagpdpayments-microservice-chart not labeled
scaledobject.keda.sh/pagopagpdpayments-microservice-chart annotated
scaledobject.keda.sh/pagopagpdpayments-microservice-chart annotated
❯ helm upgrade --namespace gps \
    --install --values ./helm/values-dev.yaml \
    --set microservice-chart.azure.workloadIdentityClientId=xxxxx \
    --wait --timeout 5m0s \
    pagopagpdpayments ./helm
Release "pagopagpdpayments" has been upgraded. Happy Helming!
NAME: pagopagpdpayments
LAST DEPLOYED: Tue Oct 14 10:49:34 2025
NAMESPACE: gps
STATUS: deployed
REVISION: 45
TEST SUITE: None
❯ kubectl get scaledobject pagopagpdpayments-microservice-chart -n gps -o jsonpath='{.metadata.labels.helm\.sh/blueprint-version}'
8.0.2% 

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Copy link

sonarqubecloud bot commented Oct 6, 2025

@dylantangredi-jakala
Copy link
Collaborator Author

update_code

Copy link

github-actions bot commented Oct 6, 2025

Update Code is failed. Please retry.

Copy link

Comment this PR with update_code to update openapi.json and format the code. Consider to use pre-commit to format the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant