Skip to content

Conditionally update deprecated CronJob and PDB apiVersion v1beta1 to v1

Erik Sundell requested to merge consideRatio/gitlab:pr/update-pdbs into master

Related

I created this before I saw !2691 (merged) and !2692 (merged) doing the same thing. I left some review comments on those, feel free to close this MR if you want.

Technical background

What does this MR do?

Keeps this Helm chart updated with how k8s evolves as it deprecates old apiVersions of various resources. This change makes us avoid seeing this when making a helm upgrade.

W0801 10:25:01.498424   89508 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0801 10:25:01.528830   89508 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0801 10:25:01.559826   89508 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0801 10:25:01.610259   89508 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0801 10:25:01.643197   89508 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0801 10:25:01.676927   89508 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0801 10:25:01.729064   89508 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0801 10:25:01.762223   89508 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0801 10:25:01.795766   89508 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0801 10:25:01.851317   89508 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0801 10:25:01.884629   89508 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0801 10:25:01.918810   89508 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0801 10:25:01.969652   89508 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0801 10:25:02.002383   89508 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0801 10:25:02.035544   89508 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0801 10:25:02.086148   89508 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0801 10:25:02.118685   89508 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0801 10:25:02.151105   89508 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0801 10:25:02.218664   89508 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0801 10:25:02.252002   89508 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0801 10:25:02.285053   89508 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0801 10:25:09.228513   89508 warnings.go:70] batch/v1beta1 CronJob is deprecated in v1.21+, unavailable in v1.25+; use batch/v1 CronJob
W0801 10:25:09.260744   89508 warnings.go:70] batch/v1beta1 CronJob is deprecated in v1.21+, unavailable in v1.25+; use batch/v1 CronJob
W0801 10:25:09.322301   89508 warnings.go:70] batch/v1beta1 CronJob is deprecated in v1.21+, unavailable in v1.25+; use batch/v1 CronJob
Release "gitlab" has been upgraded. Happy Helming!

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Required

  • Merge Request Title and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes

    As long as these helm templates can render and are considered valid by the k8s api-server - as is tested by the CI system, we should be good.

  • Documentation created/updated

    I don't understad what "created/updated" refers to. This could merit a changelog entry, but I don't think any notes in documentation is required about this.

  • Tests added

    Tests already cover rendering of templates and validating they are valid k8s resources I think. I've seen the use of kubeval in the test suite for example.

  • Integration tests added to GitLab QA

    Not needed in my opinion.

  • Equivalent MR/issue for omnibus-gitlab opened

    Not needed as this is k8s specific.

Edited by Erik Sundell

Merge request reports