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

Don't default AMI Family if LaunchTemplate specified #1352

Merged
merged 1 commit into from
Feb 16, 2022

Conversation

suket22
Copy link
Contributor

@suket22 suket22 commented Feb 16, 2022

1. Issue, if available:
N/A

2. Description of changes:
Fixing an issue where we'd default the AMIFamily even if a launch template was specified. That would then break in the validation webhook.

3. How was this change tested?
The provisioner I was using for testing manually -

apiVersion: karpenter.sh/v1alpha5
kind: Provisioner
metadata:
  name: default
spec:
  limits:
    resources:
      cpu: 1000
  provider:
    launchTemplate: myTemplate
    subnetSelector:
      karpenter.sh/discovery: myCluster
  ttlSecondsAfterEmpty: 30

First I was able to replicate the failure -

for: "../testing/provisionerSpecAMIFix.yaml": admission webhook "validation.webhook.provisioners.karpenter.sh" denied the request: validation failed: expected exactly one, got both: spec.provider.amiFamily, spec.provider.launchTemplate

After that I did a make apply and recreated my provisioner to verify the fix.

> k apply -f ../testing/provisionerSpecAMIFix.yaml
provisioner.karpenter.sh/default configured

4. 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 Feb 16, 2022

✔️ Deploy Preview for karpenter-docs-prod canceled.

🔨 Explore the source changes: 079cb4c

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

@arunsanna
Copy link

This a breaking change, are you guys gonna cut a patch release today?

@ellistarn
Copy link
Contributor

Yep.

@cryptomacma
Copy link

I met the same problem.
Just wonder when you will patch. And after patch what shall I update from my side.?

Currently the first line of my provisioner.yaml is apiVersion: karpenter.sh/v1alpha5
and i run kubectl apply -f provisioner.yaml to apply it.

@suket22
Copy link
Contributor Author

suket22 commented Feb 18, 2022

@cryptomacma this was patched with 0.6.3 - that's different from the provisioner API version

@suket22 suket22 deleted the amiFamilyFix branch February 18, 2022 16:35
@cryptomacma
Copy link

hi @suket22 , i am already using 0.6.3
and i've only have launchTemplate: lt-01 in the provider section, but still get the error message admission webhook "validation.webhook.provisioners.karpenter.sh" denied the request: validation failed: expected exactly one, got both: spec.provider.amiFamily, spec.provider.launchTemplate,

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