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

fix: Remove deletion webhooks #214

Merged
merged 1 commit into from
Feb 17, 2023
Merged

Conversation

ellistarn
Copy link
Contributor

@ellistarn ellistarn commented Feb 16, 2023

Fixes #aws/karpenter-provider-aws#3409

Description

If a bad CRD causes Karpenter to crash, customers can get stuck without the ability to remove CRDs, since deletion validation webhooks are on by default in knative.

How was this change tested?

❯ k scale deployment karpenter -n karpenter --replicas 0
deployment.apps/karpenter scaled
 ~/workspaces/go/src/github.com/aws/karpenter │ deletionwh *1 !7 ?1 ───────────────────── dev ⎈ │ 14:58:23
❯ k apply -f test.yaml
Error from server (InternalError): error when creating "test.yaml": Internal error occurred: failed calling webhook "defaulting.webhook.karpenter.k8s.aws": failed to call webhook: Post "https://karpenter.karpenter.svc:443/default/karpenter.k8s.aws?timeout=10s": no endpoints available for service "karpenter"
 ~/workspaces/go/src/github.com/aws/karpenter │ deletionwh *1 !7 ?1 ───────────────────── dev ⎈ │ 14:58:31
❯ k scale deployment karpenter -n karpenter --replicas 1
deployment.apps/karpenter scaled
 ~/workspaces/go/src/github.com/aws/karpenter │ deletionwh *1 !7 ?1 ───────────────────── dev ⎈ │ 14:58:40
❯ k apply -f test.yaml
provisioner.karpenter.sh/test created
 ~/workspaces/go/src/github.com/aws/karpenter │ deletionwh *1 !7 ?1 ───────────────────── dev ⎈ │ 14:58:52
❯ k scale deployment karpenter -n karpenter --replicas 0
deployment.apps/karpenter scaled
 ~/workspaces/go/src/github.com/aws/karpenter │ deletionwh *1 !7 ?1 ───────────────────── dev ⎈ │ 14:59:00
❯ k delete -f test.yaml
Error from server (InternalError): error when deleting "test.yaml": Internal error occurred: failed calling webhook "validation.webhook.karpenter.k8s.aws": failed to call webhook: Post "https://karpenter.karpenter.svc:443/validate/karpenter.k8s.aws?timeout=10s": no endpoints available for service "karpenter"

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

@ellistarn ellistarn requested a review from a team as a code owner February 16, 2023 22:44
@coveralls
Copy link

coveralls commented Feb 16, 2023

Pull Request Test Coverage Report for Build 4198851384

  • 0 of 6 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.004%) to 78.57%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/apis/v1alpha5/provisioner_validation.go 0 6 0.0%
Totals Coverage Status
Change from base Build 4189058856: 0.004%
Covered Lines: 6383
Relevant Lines: 8124

💛 - Coveralls

Copy link
Member

@jonathan-innis jonathan-innis left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@ellistarn ellistarn merged commit b542f6b into kubernetes-sigs:main Feb 17, 2023
@ellistarn ellistarn deleted the deletionwh branch February 20, 2023 16:27
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