Skip to content

Fix for existing CRDs are deleted when crd-install hook is introduced - #4709

Merged
bacongobbler merged 1 commit into
helm:masterfrom
mmerrill3:feature/fix_crd_deletion
Nov 29, 2018
Merged

bacongobbler merged 1 commit into
helm:masterfrom
mmerrill3:feature/fix_crd_deletion

Conversation

@mmerrill3

Copy link
Copy Markdown

The PR addresses #4704, where the crd-install helm hook in introduced into an existing helm chart on CustomResourceDefinitions manifests.

@mmerrill3
mmerrill3 force-pushed the feature/fix_crd_deletion branch from 18bdbc0 to 402dcac Compare September 27, 2018 15:12
@munnerz

munnerz commented Oct 5, 2018

Copy link
Copy Markdown
Contributor

Could one of you two take a look at this? I'm not so familiar with this area of the code, but I think this is a very important PR (and worthy of back-porting too).

Without it, I have heard stories of users with 1k+ custom resources having them all deleted.

/cc @technosophos @bacongobbler

@bacongobbler

Copy link
Copy Markdown
Member

@technosophos if you have time, would you mind taking a look?

@technosophos technosophos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM -- thanks for the tests

@bacongobbler
bacongobbler merged commit e2a0e7f into helm:master Nov 29, 2018
splisson pushed a commit to splisson/helm that referenced this pull request Dec 6, 2018
splisson pushed a commit to splisson/helm that referenced this pull request Dec 6, 2018
splisson pushed a commit to splisson/helm that referenced this pull request Dec 6, 2018
splisson pushed a commit to splisson/helm that referenced this pull request Dec 6, 2018
markmandel added a commit to markmandel/agones that referenced this pull request Dec 8, 2018
if you use the crd-install hook, then you can only install CRDs, and not
update them at any point during a chart lifecycle.

Also, prior to Helm 2.12, if you installed chart with a crd-install hook
that did not have one previously, it deleted the CRDs.

Therefore, removing the crd-install hook, so that CRDs are again managed
by the Helm charts.

Added a `agones.crd.install` parameter, in case someone wants to subchart
this chart, then can set this to false, and copy the Agones CRDs into
their own charts to be included in the right place for their chart lifecycle.

Also, since we have a `agones.crd` config section, moved
`agones.enableHelmCleanupHooks` into `agones.crds.cleanupOnDelete`

Unfortunately, with this back and forth on the crd-install hook, if you are
using the Helm chart, you will need to do a full Agones
`helm delete --purge` and cleanup any remaining CRDs to upgrade.

More context on helm + crds:
- helm/helm#4697
- istio/istio#9604
- istio/istio#7688
- helm/community#64
- helm/helm#4863
- helm/helm#4709
markmandel added a commit to markmandel/agones that referenced this pull request Dec 8, 2018
if you use the crd-install hook, then you can only install CRDs, and not
update them at any point during a chart lifecycle.

Also, prior to Helm 2.12, if you installed chart with a crd-install hook
that did not have one previously, it deleted the CRDs.

Therefore, removing the crd-install hook, so that CRDs are again managed
by the Helm charts.

Added a `agones.crd.install` parameter, in case someone wants to subchart
this chart, then can set this to false, and copy the Agones CRDs into
their own charts to be included in the right place for their chart lifecycle.

Also, since we have a `agones.crd` config section, moved
`agones.enableHelmCleanupHooks` into `agones.crds.cleanupOnDelete`

Unfortunately, with this back and forth on the crd-install hook, if you are
using the Helm chart, you will need to do a full Agones
`helm delete --purge` and cleanup any remaining CRDs to upgrade.

More context on helm + crds:
- helm/helm#4697
- istio/istio#9604
- istio/istio#7688
- helm/community#64
- helm/helm#4863
- helm/helm#4709
markmandel added a commit to markmandel/agones that referenced this pull request Dec 8, 2018
This is a problem that Helm is going to solve going forward, but for now
if you use the crd-install hook, then you can only install CRDs, and not
update them at any point during a chart lifecycle.

Also, prior to Helm 2.12, if you installed chart with a crd-install hook
that did not have one previously, it deleted the CRDs.

Therefore, removing the crd-install hook, so that CRDs are again managed
by the Helm charts.

Added a `agones.crd.install` parameter, in case someone wants to subchart
this chart, then can set this to false, and copy the Agones CRDs into
their own charts to be included in the right place for their chart lifecycle.

Also, since we have a `agones.crd` config section, moved
`agones.enableHelmCleanupHooks` into `agones.crds.cleanupOnDelete`

Unfortunately, with this back and forth on the crd-install hook, if you are
using the Helm chart, you will need to do a full Agones
`helm delete --purge` and cleanup any remaining CRDs to upgrade.

More context on helm + crds:
- helm/helm#4697
- istio/istio#9604
- istio/istio#7688
- helm/community#64
- helm/helm#4863
- helm/helm#4709
markmandel added a commit to agones-dev/agones that referenced this pull request Dec 9, 2018
This is a problem that Helm is going to solve going forward, but for now
if you use the crd-install hook, then you can only install CRDs, and not
update them at any point during a chart lifecycle.

Also, prior to Helm 2.12, if you installed chart with a crd-install hook
that did not have one previously, it deleted the CRDs.

Therefore, removing the crd-install hook, so that CRDs are again managed
by the Helm charts.

Added a `agones.crd.install` parameter, in case someone wants to subchart
this chart, then can set this to false, and copy the Agones CRDs into
their own charts to be included in the right place for their chart lifecycle.

Also, since we have a `agones.crd` config section, moved
`agones.enableHelmCleanupHooks` into `agones.crds.cleanupOnDelete`

Unfortunately, with this back and forth on the crd-install hook, if you are
using the Helm chart, you will need to do a full Agones
`helm delete --purge` and cleanup any remaining CRDs to upgrade.

More context on helm + crds:
- helm/helm#4697
- istio/istio#9604
- istio/istio#7688
- helm/community#64
- helm/helm#4863
- helm/helm#4709
@bacongobbler

Copy link
Copy Markdown
Member

This PR introduced a few bugs, so we're going to have to revert this and cut a 2.12.1 without it. @mmerrill3 if you wouldn't mind having a look at #5054 and helm/charts#9941 to see if you can address those issues, that'd be much appreciated. Thanks.

bacongobbler pushed a commit that referenced this pull request Dec 19, 2018
…troduced (#4709)" (#5067)

This reverts commit e2a0e7f.

Signed-off-by: Matthew Fisher <[email protected]>
adamreese pushed a commit that referenced this pull request Dec 19, 2018
…troduced (#4709)" (#5067)

This reverts commit e2a0e7f.

Signed-off-by: Matthew Fisher <[email protected]>
consolewitch pushed a commit to consolewitch/helm that referenced this pull request Jan 7, 2019
consolewitch pushed a commit to consolewitch/helm that referenced this pull request Jan 7, 2019
eraac pushed a commit to eraac/helm that referenced this pull request Mar 21, 2019
eraac pushed a commit to eraac/helm that referenced this pull request Mar 21, 2019
…troduced (helm#4709)" (helm#5067)

This reverts commit e2a0e7f.

Signed-off-by: Matthew Fisher <[email protected]>
Signed-off-by: Kevin Labesse <[email protected]>
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.

4 participants