Skip to content

Kubernetes recommanded labels and custom labels#25

Merged
pierluigilenoci merged 18 commits intooauth2-proxy:mainfrom
nlamirault:feat/k8s-labelss
Oct 26, 2021
Merged

Kubernetes recommanded labels and custom labels#25
pierluigilenoci merged 18 commits intooauth2-proxy:mainfrom
nlamirault:feat/k8s-labelss

Conversation

@nlamirault
Copy link
Contributor

@nlamirault nlamirault commented Apr 21, 2021

Support for :

Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
@nlamirault nlamirault changed the title Add: Kubernetes recommanded labels Kubernetes recommanded labels Apr 21, 2021
@desaintmartin
Copy link
Member

Thanks for the contribution! Appart from the failed test, this is a breaking change that requires chart uninstallation (or at least k delete X --cascade=false for all controllers) that should be discussed with everybody before merging.

At least, we need to state the breaking change in the version and provide an upgrade procedure.

@nlamirault nlamirault changed the title Kubernetes recommanded labels Kubernetes recommanded labels and custom labels Jun 2, 2021
@pierluigilenoci
Copy link
Member

@nlamirault could you please revisit your PR according to the suggestions?

@pierluigilenoci
Copy link
Member

@nlamirault thanks but things are still missing. The version bump must be of the major version, a migration procedure must be included and explicitly written that it is a breaking changes.

Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
@nlamirault
Copy link
Contributor Author

@pierluigilenoci do you have an example of a chart with a migration procedure ?

@pierluigilenoci
Copy link
Member

@nlamirault maybe something like that is enough https://github.com/oauth2-proxy/manifests/tree/main/helm/oauth2-proxy#to-400

For me is enough to make it clear that it is a breaking change and write the migration instructions but I leave the last word to the other maintainers who are more experienced than me.

Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
@nlamirault
Copy link
Contributor Author

@pierluigilenoci @desaintmartin i make a section for next release.

EtienneBarbier
EtienneBarbier previously approved these changes Jul 7, 2021
Copy link

@EtienneBarbier EtienneBarbier left a comment

Choose a reason for hiding this comment

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

I closed PR #43. Everything is already here and compatible with my use-case. Thank you @nlamirault ;)

@pierluigilenoci
Copy link
Member

@nlamirault from the point of view of the chart everything seems fine, perhaps the migration guide could be more exhaustive because it does not list the necessary steps to migrate without problems.

@pierluigilenoci
Copy link
Member

pierluigilenoci commented Jul 8, 2021

@nlamirault the PR needs a chart bump. And maybe a squash.

@pierluigilenoci
Copy link
Member

@nlamirault sorry to give you bad news but the build failed.

Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
@pierluigilenoci
Copy link
Member

@desaintmartin could you please take a look?

desaintmartin
desaintmartin previously approved these changes Sep 2, 2021
@desaintmartin
Copy link
Member

Last note before merging: have you actually tested that --cascade=false deletion then upgrade works as intended (kubernetes re-attaching the old pod to the new controller and deleting it)?

@nlamirault
Copy link
Contributor Author

@desaintmartin No. My homelab is dead actually :(

@desaintmartin
Copy link
Member

I've just tested, and actually the orphaned Pod gets lost and is not recovered/deleted by the new Deployment. I suppose the only we is to have a downtime with a Deployment deletion WITH cascade...

In order to upgrade, delete the Deployment before upgrading:

```bash
kubectl delete deployment --cascade=false my-release-oauth2-proxy
Copy link
Member

Choose a reason for hiding this comment

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

cascade will not work, unfortunately...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

This should work out of the box but becomes quite complex and error-prone compared to simply delete and have a few downtime.
@pierluigilenoci what do you think?

Copy link
Member

Choose a reason for hiding this comment

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

Maybe I don't fully understand the problem, but it could be left as a backup option only for those who don't want to have downtime. I like to make everything automatic via script but this seems a bit risky to me.

Copy link
Member

Choose a reason for hiding this comment

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

What I propose:

  • document the kubectl delete deployment without cascade
  • as a fallback for user who don't want downtime: document this

Copy link
Member

Choose a reason for hiding this comment

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

@desaintmartin I totally agree

Copy link
Member

Choose a reason for hiding this comment

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

@nlamirault are you ok with the proposed solution?

Copy link
Member

Choose a reason for hiding this comment

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

@desaintmartin it seems to me that now the documentation is ok.

Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
@Allex1
Copy link

Allex1 commented Oct 25, 2021

@nlamirault @pierluigilenoci should we tackle annotations as well in this pr? I've linked a pr for custom config annotations in case we should treat it separately

@pierluigilenoci
Copy link
Member

@nlamirault @pierluigilenoci should we tackle annotations as well in this pr? I've linked a pr for custom config annotations in case we should treat it separately

@Allex1 it might also make sense to me but this PR is so close to closure that I wouldn't want to disturb it. 😛

@Allex1
Copy link

Allex1 commented Oct 25, 2021

@nlamirault @pierluigilenoci should we tackle annotations as well in this pr? I've linked a pr for custom config annotations in case we should treat it separately

@Allex1 it might also make sense to me but this PR is so close to closure that I wouldn't want to disturb it. 😛

kk, Opened #62

@pierluigilenoci
Copy link
Member

@desaintmartin if you give me your final approval I merge the PR. ❤️

@desaintmartin
Copy link
Member

Lgtm!

@pierluigilenoci pierluigilenoci merged commit eb96b38 into oauth2-proxy:main Oct 26, 2021
@pierluigilenoci
Copy link
Member

DONE!!!! ❤️ 🚀

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.

6 participants