-
Notifications
You must be signed in to change notification settings - Fork 980
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
Conversion webhook hardcoded at kube-system namespace #6818
Comments
Turns out this is controller by https://github.com/aws/karpenter-provider-aws/blob/main/charts/karpenter-crd/values.yaml#L5 This is something that should be made very clear in the documentation or migration guide. It isn't mentioned here https://aws.amazon.com/blogs/containers/announcing-karpenter-1-0/ |
@marcofranssen We just stumbled over this as well. At best, this could be by default the namespace of the helm chart deployment. |
yes indeed. that would even be better |
I encountered the same problem using ArgoCD. The |
You can already do so by |
@marcofranssen using that value only works if you install the "karpenter-crd" helm chart, if you use the "normal" one, they are symlinked and replacement does not happen. (https://github.com/aws/karpenter-provider-aws/tree/28da0b96b6086679f75e656d31ac65bd7fca2bc0/charts/karpenter) |
Related to #6544 |
Seems to be resolved in #6827 |
There's some additional justification given here, but if you need to template the CRDs (required if installing Karpenter outside of As far as what's missing from our docs, I do think we can be a little more explicit. We do instruct users to install the CRD chart as part of the installation guide, but without a justification of why I can understand why users would continue to just use the standard chart since it already includes the CRDs, just without templating. |
@jmdeal - In our case, in an ArgoCD environment, it's not the lack of clear instructions or justifications for using the
So you're stuck with the situation of having to figure it out yourself and potentially dealing with the Application construction as we are discussing in #6847. |
For now, "fixing" it with an override on top of the helm chart. Because the validation in the webhook is still useful for me on older Kubernetes versions. From Tanka with ❤️. {
local conversionWebhookSpecMixin = {
spec+: {
conversion+: {
webhook+: {
clientConfig+: {
service+: {
namespace: c.karpenter.namespace,
},
},
},
},
},
},
karpenter: helm.template(releaseName, './vendor/charts/karpenter', {
apiVersions: apiVersions,
includeCrds: includeCrds,
kubeVersion: kubeVersion,
namespace: c.karpenter.namespace,
noHooks: noHooks,
values: values,
}) + {
// https://github.com/aws/karpenter-provider-aws/issues/6818
'custom_resource_definition_ec_2nodeclasses.karpenter.k_8s.aws'+: conversionWebhookSpecMixin,
'custom_resource_definition_nodeclaims.karpenter.sh'+: conversionWebhookSpecMixin,
'custom_resource_definition_nodepools.karpenter.sh'+: conversionWebhookSpecMixin,
},
} |
I'm seeing the same error:
but for
I thought this should be an issue with |
Thanks to all this worked out for me $ export KARPENTER_VERSION=1.0.6
$ helm registry logout public.ecr.aws
$ helm upgrade --install karpenter-crd oci://public.ecr.aws/karpenter/karpenter-crd --version "${KARPENTER_VERSION}" --namespace karpenter --create-namespace
$ helm upgrade --install karpenter oci://public.ecr.aws/karpenter/karpenter --version "${KARPENTER_VERSION}" -f values/karpenter-values.yaml -n karpenter --skip-crds |
Those that installs Karpenter as a Helm subchart are susceptible to this issue. Options are to move Karpenter out of the parent chart OR to install karpenter-crd separately. |
Additionally, the service that Karpenter creates is named after the release name. The webhook seems to be hardcoded to look for a service named |
@icicimov - I am running into the same issue with |
@corkupine in preparation to 1.0 move I just split the charts into separate dependency as recommended in the docs:
|
I did this too, I'm using argocd and it works. |
Description
Observed Behavior:
When upgrading our karpenter to the v1.0.0 chart it fails at the conversion webhook which is targeting the
kube-system
namespace. Our karpenter is deployed in thekarpenter
namespace.controller logs
Expected Behavior:
The conversion webhook targets the Helm Release namespace.
Reproduction Steps (Please include YAML):
Install Karpenter in the karpenter namespace using the release prior to v1.0.0. Then upgrade karpenter to v1.0.0.
Versions:
kubectl version
): 1.30The text was updated successfully, but these errors were encountered: