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

move default provisioner to helm post-install hook #810

Merged
merged 3 commits into from
Nov 17, 2021

Conversation

bwagner5
Copy link
Contributor

@bwagner5 bwagner5 commented Nov 17, 2021

1. Issue, if available:
N/A

2. Description of changes:

  • When adding the default provisioner to the helm chart (add default provisioner to helm chart #786), there is a race condition if you rely on defaulting from the webhook deployment since the provisioner resource is applied at the same time the webhook pod is coming online.
  • This change moves the default provisioner to a helm post-install-hook resource. Helm resources applied in a post-install-hook are applied after the regular release resources are applied and are technically not part of the release. If you specify the --wait flag when helm installing, the post-install-hook will wait until release resources are in a Ready state. So, I have added readiness probes to both the controller and webhook deployments so that helm is signaled properly to begin the post-install-hook.

3. Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: link to issue
  • No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@netlify
Copy link

netlify bot commented Nov 17, 2021

✔️ Deploy Preview for karpenter-docs-prod ready!

🔨 Explore the source changes: 9f4188f

🔍 Inspect the deploy log: https://app.netlify.com/sites/karpenter-docs-prod/deploys/61944aa6fb7d3800086616b3

😎 Browse the preview: https://deploy-preview-810--karpenter-docs-prod.netlify.app

@bwagner5 bwagner5 requested a review from ellistarn November 17, 2021 00:11
@@ -3,6 +3,9 @@ apiVersion: karpenter.sh/v1alpha5
kind: Provisioner
metadata:
name: default
annotations:
"helm.sh/hook": post-install
"helm.sh/resource-policy": keep
Copy link
Contributor

Choose a reason for hiding this comment

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

What do these do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this tells helm that it's a post-install hook and to keep the resource rather than deleting it right after applying.

@@ -50,7 +50,10 @@ func (m *GenericControllerManager) RegisterControllers(ctx context.Context, cont
}
}
if err := m.AddHealthzCheck("healthz", healthz.Ping); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you call this livez (liveness)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can't tell if this is a joke. If it's not, the convention is healthz for liveness check

Copy link
Contributor

@ellistarn ellistarn left a comment

Choose a reason for hiding this comment

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

hoooraaay

@bwagner5 bwagner5 requested review from ellistarn and njtran November 17, 2021 00:20
@bwagner5 bwagner5 merged commit f4a9fe1 into aws:main Nov 17, 2021
@bwagner5 bwagner5 deleted the default-provisioner-post-install branch November 17, 2021 02:11
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.

3 participants