Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(geoipupdater) add a rollout restart and update only if necessary #6014

Merged
merged 4 commits into from
Dec 13, 2024

Conversation

smerle33
Copy link
Contributor

@smerle33 smerle33 commented Dec 12, 2024

ref jenkins-infra/helpdesk#4441

following jenkins-infra/helpdesk#4278 and jenkins-infra/helpdesk#4240

we improved the helm chart with this PR jenkins-infra/helm-charts#1471
that use jenkins-infra/docker-geoipupdate#20

we had to improve the update process with only if needed pattern and a rollout restart included.

tested locally on my k3d, with the staging fileshare (storage_fileshare: "geoip-data")
and with a rollout on simulated deployements and namespaces:

rolloutrestart:
    enable: true
    restarts:
      - namespace: updates-jenkins-io
        deployments:
          - updates-jenkins-io-content-secured-mirrorbits
          - updates-jenkins-io-content-unsecured-mirrorbits
      - namespace: get-jenkins-io
        deployments:
          - get-jenkins-io-mirrorbits

the output is validating:

ROLLOUT RESTART
kubectl -n updates-jenkins-io rollout restart deployment updates-jenkins-io-content-secured-mirrorbits
deployment "updates-jenkins-io-content-secured-mirrorbits" successfully rolled out
deployment.apps/updates-jenkins-io-content-secured-mirrorbits restarted
Waiting for deployment "updates-jenkins-io-content-secured-mirrorbits" rollout to finish: 1 old replicas are pending termination...
Waiting for deployment "updates-jenkins-io-content-secured-mirrorbits" rollout to finish: 1 old replicas are pending termination...
deployment "updates-jenkins-io-content-secured-mirrorbits" successfully rolled out
kubectl -n updates-jenkins-io rollout restart deployment updates-jenkins-io-content-unsecured-mirrorbits
deployment "updates-jenkins-io-content-unsecured-mirrorbits" successfully rolled out
deployment.apps/updates-jenkins-io-content-unsecured-mirrorbits restarted
Waiting for deployment "updates-jenkins-io-content-unsecured-mirrorbits" rollout to finish: 1 old replicas are pending termination...
Waiting for deployment "updates-jenkins-io-content-unsecured-mirrorbits" rollout to finish: 1 old replicas are pending termination...
deployment "updates-jenkins-io-content-unsecured-mirrorbits" successfully rolled out
kubectl -n get-jenkins-io rollout restart deployment get-jenkins-io-mirrorbits
deployment "get-jenkins-io-mirrorbits" successfully rolled out
deployment.apps/get-jenkins-io-mirrorbits restarted
Waiting for deployment "get-jenkins-io-mirrorbits" rollout to finish: 1 old replicas are pending termination...
Waiting for deployment "get-jenkins-io-mirrorbits" rollout to finish: 1 old replicas are pending termination...
deployment "get-jenkins-io-mirrorbits" successfully rolled out
ROLLOUT RESTART DONE

@smerle33 smerle33 marked this pull request as draft December 12, 2024 16:33
@smerle33 smerle33 marked this pull request as ready for review December 12, 2024 16:34
@smerle33 smerle33 requested a review from dduportal December 12, 2024 16:40
Copy link
Contributor

@dduportal dduportal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change uses the image 0.3.3 while it seems 0.3.5 is required: https://github.com/jenkins-infra/docker-geoipupdate/releases/tag/0.3.5

@smerle33
Copy link
Contributor Author

I corrected the secrets for the production fileshare here https://github.com/jenkins-infra/charts-secrets/commit/86439c0050f23fc1c3cd9eef3e4ac14b842dd29a

and added a staging secrets file, that we will remove, with the terraform for staging when everything will be ok
TODO: cleanup
https://github.com/jenkins-infra/azure/blob/0dd69e354c3d764d72763ae3f4b23ec29b67cf69/publick8s.tf#L371-L388

Copy link
Contributor

@dduportal dduportal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • We are watching 2 pages on both get.jenkins.io and mirrors.updates.jenkins.io (with the ?mirrorlist query string)
  • We are also watching pods on the 3 namespaces

Let's roll!

@smerle33 smerle33 merged commit 85f3bf6 into jenkins-infra:main Dec 13, 2024
6 checks passed
@smerle33 smerle33 deleted the rollout/geoipupdate branch December 13, 2024 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants