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

[bitnami/contour] Sync upstream changes and chart standardization #3381

Merged
merged 36 commits into from
Sep 9, 2020

Conversation

mkilchhofer
Copy link
Contributor

@mkilchhofer mkilchhofer commented Aug 10, 2020

Description of the change
The most important change is the refactoring of the shutdown sidecar:
projectcontour/contour@7cd9f4a

I manually diff'ed the example manifests here: https://github.com/projectcontour/contour/tree/master/examples/contour

Benefits
By using this configuration in combination with contour version 1.7.0 the envoys now properly entering into the DRAINING state when the pods needs to be terminated.

Additionally this change fixes the failing pipeline issue.

Possible drawbacks
-

Applicable issues
-

Additional information
-

Checklist

  • Chart version bumped in Chart.yaml according to semver.
  • Variables are documented in the README.md
  • Title of the PR starts with chart name (e.g. [bitnami/chart])
  • If the chart contains a values-production.yaml apart from values.yaml, ensure that you implement the changes in both files

⚠️ Keep in mind that if you want to make changes to the kubeapps chart, please implement them in the kubeapps repository. This is only a synchronized mirror.

The most important change is the refactoring of the shutdown sidecar:
projectcontour/contour@7cd9f4a

Signed-off-by: Marco Kilchhofer <marco@kilchhofer.info>
Copy link
Contributor

@dani8art dani8art left a comment

Choose a reason for hiding this comment

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

Hi @mkilchhofer thank you so much for the PR, please take a look at my comments

bitnami/contour/Chart.yaml Outdated Show resolved Hide resolved
bitnami/contour/README.md Show resolved Hide resolved
bitnami/contour/templates/daemonset.yaml Show resolved Hide resolved
bitnami/contour/values-production.yaml Show resolved Hide resolved
bitnami/contour/values.yaml Show resolved Hide resolved
Copy link
Contributor

@dani8art dani8art left a comment

Choose a reason for hiding this comment

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

Please, could you fix the errors when deploying the chart? it seems it cannot execute the readiness probe well or doesn't get the proper response.

@mkilchhofer
Copy link
Contributor Author

Please, could you fix the errors when deploying the chart? it seems it cannot execute the readiness probe well or doesn't get the proper response.

Hi @dani8art, I would love to fix them, but it is not possible. Please read what your colleague @marcosbc wrote here: #3367

As for the tests, we recently enabled PR chart testing so some failures like these are expected until we polish things up. Note that we run more reliable tests in our internal pipeline, and in the case of Contour they're currently succeeding.

> As a reminder, support for IngressRoute was officially dropped in v1.6.
> If you haven’t already migrated to HTTPProxy, see the IngressRoute to
> HTTPProxy migration guide for instructions on how to do so. Once you have
> migrated, delete the IngressRoute and related CRDs.
Ref: https://projectcontour.io/resources/upgrading/

Signed-off-by: Marco Kilchhofer <marco@kilchhofer.info>
@mkilchhofer mkilchhofer changed the title [bitnami/contour] Sync back most significant upstream projectcontour changes WIP: [bitnami/contour] Sync back most significant upstream projectcontour changes Aug 12, 2020
@mkilchhofer mkilchhofer marked this pull request as draft August 12, 2020 19:07
Signed-off-by: Marco Kilchhofer <marco@kilchhofer.info>
API group contour.heptio.com is no longer supported since 1.6.x
@mkilchhofer mkilchhofer changed the title WIP: [bitnami/contour] Sync back most significant upstream projectcontour changes [bitnami/contour] Sync back most significant upstream projectcontour changes Aug 13, 2020
@mkilchhofer mkilchhofer marked this pull request as ready for review August 13, 2020 10:05
Signed-off-by: Marco Kilchhofer <marco@kilchhofer.info>
@mkilchhofer mkilchhofer force-pushed the sync_projectcontour_changes branch 2 times, most recently from 8a8c196 to 222f848 Compare August 13, 2020 12:00
I found a hint in PR bitnami#2721 that it should be possible to override values
used in GH actions.
@mkilchhofer
Copy link
Contributor Author

Finally the tests are green 🟢 💯 🥳

…tions"

This was requested during the review process by dani8art.
This reverts commit 253a8ec.
@mkilchhofer
Copy link
Contributor Author

Hi @dani8art
Are my changes ok now? :)

@dani8art
Copy link
Contributor

dani8art commented Aug 19, 2020

Hi @mkilchhofer we went deeper on these changes and we saw you are introducing and modify CRDs. We would like to consider these changes as a major version and take this opportunity to include some of our standardization and recent common features.

Even though a helm upgrade works fine, it will remove a CRD and will update the rest, so instances that are deployed using previous CRDs will not work properly after an upgrade.

We know that adding those standardization and common features may be out of scope for you but I can help you to manage this.

We would like to include the next list of features.

  • add bitnami/common as a dependency, please find it here you can also find an example for all the helpers in the common chart here
  • extraVolumes, extraVolumeMounts both contour and envoy, please find an example here
  • extraEnvVar both contour and envoy, please find an example here
  • extraEnvVarsConfigMap both contour and envoy, please find an example here
  • extraEnvVarsSecret both contour and envoy, please find an example here
  • initContainers both contour and envoy, please find an example here
  • service.extraPorts here
  • rolling tags helpers here
  • passwords/secrets upgrade helper here

@mkilchhofer
Copy link
Contributor Author

Hi @dani8art
Sure, I understand your point and I can work on it. The changeset would be even bigger then.

I only want to mention that the guys behind projectcontour (mainly the heptio.com people which are now part of VMware) talks about using the bitnami chart and already prepared their changes:
projectcontour/contour#2050

Do we still need to support helm2 for all the bitnami charts?

Signed-off-by: Marco Kilchhofer <marco@kilchhofer.info>
@mkilchhofer mkilchhofer marked this pull request as ready for review September 2, 2020 11:02
Copy link
Contributor

@dani8art dani8art left a comment

Choose a reason for hiding this comment

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

Thank you so much for these amazing changes, please take a look at my latest comments.

Could we use these other helpers as well? https://github.com/bitnami/charts/blob/master/bitnami/common/templates/_capabilities.tpl

bitnami/contour/README.md Show resolved Hide resolved
bitnami/contour/templates/rbac.yaml Outdated Show resolved Hide resolved
@mkilchhofer
Copy link
Contributor Author

Could we use these other helpers as well? https://github.com/bitnami/charts/blob/master/bitnami/common/templates/_capabilities.tpl

We could use the one for the Deployment apiVersion. But batch/v1 for the Job and apps/v1 for the DaemonSet is not available in the common chart. I suggest to leave this as-is for all 3 types of workload definitions used and do the implentations inside the common at the time the apiVersion changes again (eg. when the workload definitions changes to v2 or so).

Helm2 uses Sprig v2 and therefore the funtion "get" is not available
there. Since we need to guarantee helm v2 support, we need to workaround
this.
@Cellebyte
Copy link
Contributor

@mkilchhofer thank you for improving my Chart. :)

@dani8art
Copy link
Contributor

dani8art commented Sep 7, 2020

Could we use these other helpers as well? https://github.com/bitnami/charts/blob/master/bitnami/common/templates/_capabilities.tpl

We could use the one for the Deployment apiVersion. But batch/v1 for the Job and apps/v1 for the DaemonSet is not available in the common chart. I suggest to leave this as-is for all 3 types of workload definitions used and do the implentations inside the common at the time the apiVersion changes again (eg. when the workload definitions changes to v2 or so).

I would use it for the one that we have implemented in the common, please.

@mkilchhofer
Copy link
Contributor Author

mkilchhofer commented Sep 7, 2020

Thanks for the review again @dani8art. I will implement the changes 👍 But before I go on, I made a proposal here to refactor the whole chart into subfolders based on components mkilchhofer#4. WDYT? Is it a good idea? If so, I would merge this in before I make changes to not do my changes twice :)

Update: changes are outside of the restructured files and therefore I updated both this PR and PR mkilchhofer#4.

@dani8art
Copy link
Contributor

dani8art commented Sep 9, 2020

Thanks for the review again @dani8art. I will implement the changes 👍 But before I go on, I made a proposal here to refactor the whole chart into subfolders based on components mkilchhofer#4. WDYT? Is it a good idea? If so, I would merge this in before I make changes to not do my changes twice :)

Update: changes are outside of the restructured files and therefore I updated both this PR and PR mkilchhofer#4.

Yes I think it would be a good approach LGTM!

@mkilchhofer
Copy link
Contributor Author

mkilchhofer commented Sep 9, 2020

Yes I think it would be a good approach LGTM!

Superb :) I now merged these changes also on this PR here. So from my point of view, we now should be done with all the requested changes, right?

@dani8art
Copy link
Contributor

dani8art commented Sep 9, 2020

Yes I think it would be a good approach LGTM!

Superb :) I now merged these changes also on this PR here. So from my point of view, we now should be done with all the requested changes, right?

Yes, regarding changes suggested by bitnami team it is all ok. If you are ok with your changes/refactors we could proceed to test it internally in our CI/CD system. Do you agree?

@mkilchhofer
Copy link
Contributor Author

Yes I think it would be a good approach LGTM!

Superb :) I now merged these changes also on this PR here. So from my point of view, we now should be done with all the requested changes, right?

Yes, regarding changes suggested by bitnami team it is all ok. If you are ok with your changes/refactors we could proceed to test it internally in our CI/CD system. Do you agree?

Sure. I hope we get green light from your CI/CD system :)

Copy link
Contributor

@dani8art dani8art left a comment

Choose a reason for hiding this comment

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

We have got the green light!

@mkilchhofer Thank you so much for this amazing job!

@dani8art dani8art merged commit 91fa2c0 into bitnami:master Sep 9, 2020
@mkilchhofer mkilchhofer deleted the sync_projectcontour_changes branch October 19, 2020 12:19
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.

None yet

4 participants