Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into update-post-install-docs
  • Loading branch information
engedaam committed Aug 22, 2024
2 parents ca8651c + 1ba3a3e commit 1b8a42b
Show file tree
Hide file tree
Showing 4 changed files with 173 additions and 71 deletions.
44 changes: 0 additions & 44 deletions test/suites/integration/lease_garbagecollection_test.go

This file was deleted.

74 changes: 65 additions & 9 deletions website/content/en/docs/upgrading/v1-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,24 +74,30 @@ The upgrade guide will first require upgrading to your latest patch version prio
--set webhook.serviceNamespace="${KARPENTER_NAMESPACE}" \
--set webhook.port=8443
```
{{% alert title="Note" color="warning" %}}
If you receive a `label validation error` or `annotation validation error` consult the [troubleshooting guide]({{<ref "../troubleshooting/#helm-error-when-installing-the-karpenter-crd-chart" >}}) for steps to resolve.
{{% /alert %}}
{{% alert title="Note" color="warning" %}}
As an alternative approach to updating the Karpenter CRDs conversion webhook configuration, you can patch the CRDs as follows:
```bash
# NodePools
kubectl patch customresourcedefinitions nodepools.karpenter.sh -p '{"spec":{"conversion":{"webhook":{"clientConfig":{"service": {"name": "<karpenter webhook service name>"}}}}}}'
kubectl patch customresourcedefinitions nodepools.karpenter.sh -p '{"spec":{"conversion":{"webhook":{"clientConfig":{"service": {"namespace": "<karpenter webhook service namespace>"}}}}}}'
kubectl patch customresourcedefinitions nodepools.karpenter.sh -p '{"spec":{"conversion":{"webhook":{"clientConfig":{"service": {"port": <karpenter webhook service port>}}}}}}'
SERVICE_NAME=<karpenter webhook service name>
SERVICE_NAMESPACE=<karpenter webhook service namespace>
SERVICE_PORT=<karpenter webhook service port>
kubectl patch customresourcedefinitions nodepools.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAME}\"}}}}}}"
kubectl patch customresourcedefinitions nodepools.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAMESPACE}\"}}}}}}"
kubectl patch customresourcedefinitions nodepools.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_PORT}\"}}}}}}"
# NodeClaims
kubectl patch customresourcedefinitions nodeclaims.karpenter.sh -p '{"spec":{"conversion":{"webhook":{"clientConfig":{"service": {"name": "<karpenter webhook service name>"}}}}}}'
kubectl patch customresourcedefinitions nodeclaims.karpenter.sh -p '{"spec":{"conversion":{"webhook":{"clientConfig":{"service": {"namespace": "<karpenter webhook service namespace>"}}}}}}'
kubectl patch customresourcedefinitions nodeclaims.karpenter.sh -p '{"spec":{"conversion":{"webhook":{"clientConfig":{"service": {"port": <karpenter webhook service port>}}}}}}'
kubectl patch customresourcedefinitions nodeclaims.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAME}\"}}}}}}"
kubectl patch customresourcedefinitions nodeclaims.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAMESPACE}\"}}}}}}"
kubectl patch customresourcedefinitions nodeclaims.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_PORT}\"}}}}}}"
# EC2NodeClass
kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws -p '{"spec":{"conversion":{"webhook":{"clientConfig":{"service": {"name": "<karpenter webhook service name>"}}}}}}'
kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws -p '{"spec":{"conversion":{"webhook":{"clientConfig":{"service": {"namespace": "<karpenter webhook service namespace>"}}}}}}'
kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws -p '{"spec":{"conversion":{"webhook":{"clientConfig":{"service": {"port": <karpenter webhook service port>}}}}}}'
kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAME}\"}}}}}}"
kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAMESPACE}\"}}}}}}"
kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_PORT}\"}}}}}}"
```
{{% /alert %}}
Expand Down Expand Up @@ -141,6 +147,33 @@ kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws -p '{"s
--set webhook.port=8443
```

{{% alert title="Note" color="warning" %}}
If you receive a `label validation error` or `annotation validation error` consult the [troubleshooting guide]({{<ref "../troubleshooting/#helm-error-when-installing-the-karpenter-crd-chart" >}}) for steps to resolve.
{{% /alert %}}

{{% alert title="Note" color="warning" %}}

As an alternative approach to updating the Karpenter CRDs conversion webhook configuration, you can patch the CRDs as follows:

```bash
# NodePools
SERVICE_NAME=<karpenter webhook service name>
SERVICE_NAMESPACE=<karpenter webhook service namespace>
SERVICE_PORT=<karpenter webhook service port>
kubectl patch customresourcedefinitions nodepools.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAME}\"}}}}}}"
kubectl patch customresourcedefinitions nodepools.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAMESPACE}\"}}}}}}"
kubectl patch customresourcedefinitions nodepools.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_PORT}\"}}}}}}"
# NodeClaims
kubectl patch customresourcedefinitions nodeclaims.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAME}\"}}}}}}"
kubectl patch customresourcedefinitions nodeclaims.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAMESPACE}\"}}}}}}"
kubectl patch customresourcedefinitions nodeclaims.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_PORT}\"}}}}}}"
# EC2NodeClass
kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAME}\"}}}}}}"
kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAMESPACE}\"}}}}}}"
kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_PORT}\"}}}}}}"
```
{{% /alert %}}

10. Upgrade Karpenter to the new version. At the end of this step, conversion webhooks run to convert the Karpenter CRDs to v1.

```bash
Expand Down Expand Up @@ -346,6 +379,29 @@ helm upgrade --install karpenter-crd oci://public.ecr.aws/karpenter/karpenter-cr
--set webhook.port=8443
```
{{% alert title="Note" color="warning" %}}
As an alternative approach to updating the Karpenter CRDs conversion webhook configuration, you can patch the CRDs as follows:
```bash
# NodePools
SERVICE_NAME=<karpenter webhook service name>
SERVICE_NAMESPACE=<karpenter webhook service namespace>
SERVICE_PORT=<karpenter webhook service port>
kubectl patch customresourcedefinitions nodepools.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAME}\"}}}}}}"
kubectl patch customresourcedefinitions nodepools.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAMESPACE}\"}}}}}}"
kubectl patch customresourcedefinitions nodepools.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_PORT}\"}}}}}}"
# NodeClaims
kubectl patch customresourcedefinitions nodeclaims.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAME}\"}}}}}}"
kubectl patch customresourcedefinitions nodeclaims.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAMESPACE}\"}}}}}}"
kubectl patch customresourcedefinitions nodeclaims.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_PORT}\"}}}}}}"
# EC2NodeClass
kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAME}\"}}}}}}"
kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAMESPACE}\"}}}}}}"
kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_PORT}\"}}}}}}"
```
{{% /alert %}}
5. Rollback the Karpenter Controller
```bash
Expand Down
74 changes: 65 additions & 9 deletions website/content/en/preview/upgrading/v1-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,24 +74,30 @@ The upgrade guide will first require upgrading to your latest patch version prio
--set webhook.serviceNamespace="${KARPENTER_NAMESPACE}" \
--set webhook.port=8443
```
{{% alert title="Note" color="warning" %}}
If you receive a `label validation error` or `annotation validation error` consult the [troubleshooting guide]({{<ref "../troubleshooting/#helm-error-when-installing-the-karpenter-crd-chart" >}}) for steps to resolve.
{{% /alert %}}
{{% alert title="Note" color="warning" %}}
As an alternative approach to updating the Karpenter CRDs conversion webhook configuration, you can patch the CRDs as follows:
```bash
# NodePools
kubectl patch customresourcedefinitions nodepools.karpenter.sh -p '{"spec":{"conversion":{"webhook":{"clientConfig":{"service": {"name": "<karpenter webhook service name>"}}}}}}'
kubectl patch customresourcedefinitions nodepools.karpenter.sh -p '{"spec":{"conversion":{"webhook":{"clientConfig":{"service": {"namespace": "<karpenter webhook service namespace>"}}}}}}'
kubectl patch customresourcedefinitions nodepools.karpenter.sh -p '{"spec":{"conversion":{"webhook":{"clientConfig":{"service": {"port": <karpenter webhook service port>}}}}}}'
SERVICE_NAME=<karpenter webhook service name>
SERVICE_NAMESPACE=<karpenter webhook service namespace>
SERVICE_PORT=<karpenter webhook service port>
kubectl patch customresourcedefinitions nodepools.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAME}\"}}}}}}"
kubectl patch customresourcedefinitions nodepools.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAMESPACE}\"}}}}}}"
kubectl patch customresourcedefinitions nodepools.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_PORT}\"}}}}}}"
# NodeClaims
kubectl patch customresourcedefinitions nodeclaims.karpenter.sh -p '{"spec":{"conversion":{"webhook":{"clientConfig":{"service": {"name": "<karpenter webhook service name>"}}}}}}'
kubectl patch customresourcedefinitions nodeclaims.karpenter.sh -p '{"spec":{"conversion":{"webhook":{"clientConfig":{"service": {"namespace": "<karpenter webhook service namespace>"}}}}}}'
kubectl patch customresourcedefinitions nodeclaims.karpenter.sh -p '{"spec":{"conversion":{"webhook":{"clientConfig":{"service": {"port": <karpenter webhook service port>}}}}}}'
kubectl patch customresourcedefinitions nodeclaims.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAME}\"}}}}}}"
kubectl patch customresourcedefinitions nodeclaims.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAMESPACE}\"}}}}}}"
kubectl patch customresourcedefinitions nodeclaims.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_PORT}\"}}}}}}"
# EC2NodeClass
kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws -p '{"spec":{"conversion":{"webhook":{"clientConfig":{"service": {"name": "<karpenter webhook service name>"}}}}}}'
kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws -p '{"spec":{"conversion":{"webhook":{"clientConfig":{"service": {"namespace": "<karpenter webhook service namespace>"}}}}}}'
kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws -p '{"spec":{"conversion":{"webhook":{"clientConfig":{"service": {"port": <karpenter webhook service port>}}}}}}'
kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAME}\"}}}}}}"
kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAMESPACE}\"}}}}}}"
kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_PORT}\"}}}}}}"
```
{{% /alert %}}
Expand Down Expand Up @@ -141,6 +147,33 @@ kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws -p '{"s
--set webhook.port=8443
```

{{% alert title="Note" color="warning" %}}
If you receive a `label validation error` or `annotation validation error` consult the [troubleshooting guide]({{<ref "../troubleshooting/#helm-error-when-installing-the-karpenter-crd-chart" >}}) for steps to resolve.
{{% /alert %}}

{{% alert title="Note" color="warning" %}}

As an alternative approach to updating the Karpenter CRDs conversion webhook configuration, you can patch the CRDs as follows:

```bash
# NodePools
SERVICE_NAME=<karpenter webhook service name>
SERVICE_NAMESPACE=<karpenter webhook service namespace>
SERVICE_PORT=<karpenter webhook service port>
kubectl patch customresourcedefinitions nodepools.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAME}\"}}}}}}"
kubectl patch customresourcedefinitions nodepools.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAMESPACE}\"}}}}}}"
kubectl patch customresourcedefinitions nodepools.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_PORT}\"}}}}}}"
# NodeClaims
kubectl patch customresourcedefinitions nodeclaims.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAME}\"}}}}}}"
kubectl patch customresourcedefinitions nodeclaims.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAMESPACE}\"}}}}}}"
kubectl patch customresourcedefinitions nodeclaims.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_PORT}\"}}}}}}"
# EC2NodeClass
kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAME}\"}}}}}}"
kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAMESPACE}\"}}}}}}"
kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_PORT}\"}}}}}}"
```
{{% /alert %}}

10. Upgrade Karpenter to the new version. At the end of this step, conversion webhooks run to convert the Karpenter CRDs to v1.

```bash
Expand Down Expand Up @@ -346,6 +379,29 @@ helm upgrade --install karpenter-crd oci://public.ecr.aws/karpenter/karpenter-cr
--set webhook.port=8443
```
{{% alert title="Note" color="warning" %}}
As an alternative approach to updating the Karpenter CRDs conversion webhook configuration, you can patch the CRDs as follows:
```bash
# NodePools
SERVICE_NAME=<karpenter webhook service name>
SERVICE_NAMESPACE=<karpenter webhook service namespace>
SERVICE_PORT=<karpenter webhook service port>
kubectl patch customresourcedefinitions nodepools.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAME}\"}}}}}}"
kubectl patch customresourcedefinitions nodepools.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAMESPACE}\"}}}}}}"
kubectl patch customresourcedefinitions nodepools.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_PORT}\"}}}}}}"
# NodeClaims
kubectl patch customresourcedefinitions nodeclaims.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAME}\"}}}}}}"
kubectl patch customresourcedefinitions nodeclaims.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAMESPACE}\"}}}}}}"
kubectl patch customresourcedefinitions nodeclaims.karpenter.sh -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_PORT}\"}}}}}}"
# EC2NodeClass
kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAME}\"}}}}}}"
kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_NAMESPACE}\"}}}}}}"
kubectl patch customresourcedefinitions ec2nodeclasses.karpenter.k8s.aws -p "{\"spec\":{\"conversion\":{\"webhook\":{\"clientConfig\":{\"service\": {\"name\": \"${SERVICE_PORT}\"}}}}}}"
```
{{% /alert %}}
5. Rollback the Karpenter Controller
```bash
Expand Down
Loading

0 comments on commit 1b8a42b

Please sign in to comment.