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: right order to environment variable exports #6798

Merged
merged 2 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 19 additions & 10 deletions website/content/en/docs/upgrading/v1-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ The upgrade guide will first require upgrading to your latest patch version prio
1. Set environment variables for your cluster to upgrade to the latest patch version of the current Karpenter version you're running on:

```bash
export KARPENTER_NAMESPACE=kube-system
export KARPENTER_IAM_ROLE_ARN="arn:${AWS_PARTITION}:iam::${AWS_ACCOUNT_ID}:role/${CLUSTER_NAME}-karpenter"
export AWS_PARTITION="aws" # if you are not using standard partitions, you may need to configure to aws-cn / aws-us-gov
export CLUSTER_NAME="${USER}-karpenter-demo"
export AWS_REGION="us-west-2"
export AWS_ACCOUNT_ID="$(aws sts get-caller-identity --query Account --output text)"
export KARPENTER_NAMESPACE=kube-system
export KARPENTER_IAM_ROLE_ARN="arn:${AWS_PARTITION}:iam::${AWS_ACCOUNT_ID}:role/${CLUSTER_NAME}-karpenter"
```


Expand Down Expand Up @@ -106,7 +106,7 @@ The upgrade guide will first require upgrading to your latest patch version prio
Notable Changes to the IAM Policy include additional tag-scoping for the `eks:eks-cluster-name` tag for instances and instance profiles.

```bash
TEMPOUT=$(mktemp)
export TEMPOUT=$(mktemp)
curl -fsSL https://raw.githubusercontent.com/aws/karpenter-provider-aws/v"${KARPENTER_VERSION}"/website/content/en/preview/getting-started/getting-started-with-karpenter/cloudformation.yaml > ${TEMPOUT} \
&& aws cloudformation deploy \
--stack-name "Karpenter-${CLUSTER_NAME}" \
Expand Down Expand Up @@ -271,12 +271,19 @@ Since both v1beta1 and v1 will be served, `kubectl` will default to returning th
1. Set environment variables

```bash
export KARPENTER_NAMESPACE="kube-system"
export AWS_PARTITION="aws" # if you are not using standard partitions, you may need to configure to aws-cn / aws-us-gov
export CLUSTER_NAME="${USER}-karpenter-demo"
export AWS_REGION="us-west-2"
export AWS_ACCOUNT_ID="$(aws sts get-caller-identity --query Account --output text)"
export KARPENTER_NAMESPACE=kube-system
export KARPENTER_IAM_ROLE_ARN="arn:${AWS_PARTITION}:iam::${AWS_ACCOUNT_ID}:role/${CLUSTER_NAME}-karpenter"
```

2. Set Karpenter Version

```bash
# Note: v0.33.6 and v0.34.7 include the v prefix, omit it for versions v0.35+
export KARPENTER_VERSION="<rollback version of karpenter>"
export KARPENTER_IAM_ROLE_ARN="arn:${AWS_PARTITION}:iam::${AWS_ACCOUNT_ID}:role/${CLUSTER_NAME}-karpenter"
export CLUSTER_NAME="<name of your cluster>"
export TEMPOUT="$(mktemp)"
```

{{% alert title="Warning" color="warning" %}}
Expand All @@ -289,10 +296,11 @@ echo "${KARPENTER_NAMESPACE}" "${KARPENTER_VERSION}" "${CLUSTER_NAME}" "${TEMPOU

{{% /alert %}}

2. Rollback the Karpenter Policy
3. Rollback the Karpenter Policy

**v0.33.6 and v0.34.7:**
```bash
export TEMPOUT=$(mktemp)
curl -fsSL https://raw.githubusercontent.com/aws/karpenter-provider-aws/"${KARPENTER_VERSION}"/website/content/en/preview/getting-started/getting-started-with-karpenter/cloudformation.yaml > ${TEMPOUT} \
&& aws cloudformation deploy \
--stack-name "Karpenter-${CLUSTER_NAME}" \
Expand All @@ -303,6 +311,7 @@ curl -fsSL https://raw.githubusercontent.com/aws/karpenter-provider-aws/"${KARPE

**v0.35+:**
```bash
export TEMPOUT=$(mktemp)
curl -fsSL https://raw.githubusercontent.com/aws/karpenter-provider-aws/v"${KARPENTER_VERSION}"/website/content/en/preview/getting-started/getting-started-with-karpenter/cloudformation.yaml > ${TEMPOUT} \
&& aws cloudformation deploy \
--stack-name "Karpenter-${CLUSTER_NAME}" \
Expand All @@ -311,7 +320,7 @@ curl -fsSL https://raw.githubusercontent.com/aws/karpenter-provider-aws/v"${KARP
--parameter-overrides "ClusterName=${CLUSTER_NAME}"
```

3. Rollback the CRDs
4. Rollback the CRDs

```bash
helm upgrade --install karpenter-crd oci://public.ecr.aws/karpenter/karpenter-crd --version "${KARPENTER_VERSION}" --namespace "${KARPENTER_NAMESPACE}" --create-namespace \
Expand All @@ -321,7 +330,7 @@ helm upgrade --install karpenter-crd oci://public.ecr.aws/karpenter/karpenter-cr
--set webhook.port=8443
```

4. Rollback the Karpenter Controller
5. Rollback the Karpenter Controller

```bash
# Service account annotation can be dropped when using pod identity
Expand Down
29 changes: 19 additions & 10 deletions website/content/en/preview/upgrading/v1-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ The upgrade guide will first require upgrading to your latest patch version prio
1. Set environment variables for your cluster to upgrade to the latest patch version of the current Karpenter version you're running on:

```bash
export KARPENTER_NAMESPACE=kube-system
export KARPENTER_IAM_ROLE_ARN="arn:${AWS_PARTITION}:iam::${AWS_ACCOUNT_ID}:role/${CLUSTER_NAME}-karpenter"
export AWS_PARTITION="aws" # if you are not using standard partitions, you may need to configure to aws-cn / aws-us-gov
export CLUSTER_NAME="${USER}-karpenter-demo"
export AWS_REGION="us-west-2"
export AWS_ACCOUNT_ID="$(aws sts get-caller-identity --query Account --output text)"
export KARPENTER_NAMESPACE=kube-system
export KARPENTER_IAM_ROLE_ARN="arn:${AWS_PARTITION}:iam::${AWS_ACCOUNT_ID}:role/${CLUSTER_NAME}-karpenter"
```


Expand Down Expand Up @@ -106,7 +106,7 @@ The upgrade guide will first require upgrading to your latest patch version prio
Notable Changes to the IAM Policy include additional tag-scoping for the `eks:eks-cluster-name` tag for instances and instance profiles.

```bash
TEMPOUT=$(mktemp)
export TEMPOUT=$(mktemp)
curl -fsSL https://raw.githubusercontent.com/aws/karpenter-provider-aws/v"${KARPENTER_VERSION}"/website/content/en/preview/getting-started/getting-started-with-karpenter/cloudformation.yaml > ${TEMPOUT} \
&& aws cloudformation deploy \
--stack-name "Karpenter-${CLUSTER_NAME}" \
Expand Down Expand Up @@ -271,12 +271,19 @@ Since both v1beta1 and v1 will be served, `kubectl` will default to returning th
1. Set environment variables

```bash
export KARPENTER_NAMESPACE="kube-system"
export AWS_PARTITION="aws" # if you are not using standard partitions, you may need to configure to aws-cn / aws-us-gov
export CLUSTER_NAME="${USER}-karpenter-demo"
export AWS_REGION="us-west-2"
export AWS_ACCOUNT_ID="$(aws sts get-caller-identity --query Account --output text)"
export KARPENTER_NAMESPACE=kube-system
export KARPENTER_IAM_ROLE_ARN="arn:${AWS_PARTITION}:iam::${AWS_ACCOUNT_ID}:role/${CLUSTER_NAME}-karpenter"
```

2. Set Karpenter Version

```bash
# Note: v0.33.6 and v0.34.7 include the v prefix, omit it for versions v0.35+
export KARPENTER_VERSION="<rollback version of karpenter>"
export KARPENTER_IAM_ROLE_ARN="arn:${AWS_PARTITION}:iam::${AWS_ACCOUNT_ID}:role/${CLUSTER_NAME}-karpenter"
export CLUSTER_NAME="<name of your cluster>"
export TEMPOUT="$(mktemp)"
```

{{% alert title="Warning" color="warning" %}}
Expand All @@ -289,10 +296,11 @@ echo "${KARPENTER_NAMESPACE}" "${KARPENTER_VERSION}" "${CLUSTER_NAME}" "${TEMPOU

{{% /alert %}}

2. Rollback the Karpenter Policy
3. Rollback the Karpenter Policy

**v0.33.6 and v0.34.7:**
```bash
export TEMPOUT=$(mktemp)
curl -fsSL https://raw.githubusercontent.com/aws/karpenter-provider-aws/"${KARPENTER_VERSION}"/website/content/en/preview/getting-started/getting-started-with-karpenter/cloudformation.yaml > ${TEMPOUT} \
&& aws cloudformation deploy \
--stack-name "Karpenter-${CLUSTER_NAME}" \
Expand All @@ -303,6 +311,7 @@ curl -fsSL https://raw.githubusercontent.com/aws/karpenter-provider-aws/"${KARPE

**v0.35+:**
```bash
export TEMPOUT=$(mktemp)
curl -fsSL https://raw.githubusercontent.com/aws/karpenter-provider-aws/v"${KARPENTER_VERSION}"/website/content/en/preview/getting-started/getting-started-with-karpenter/cloudformation.yaml > ${TEMPOUT} \
&& aws cloudformation deploy \
--stack-name "Karpenter-${CLUSTER_NAME}" \
Expand All @@ -311,7 +320,7 @@ curl -fsSL https://raw.githubusercontent.com/aws/karpenter-provider-aws/v"${KARP
--parameter-overrides "ClusterName=${CLUSTER_NAME}"
```

3. Rollback the CRDs
4. Rollback the CRDs

```bash
helm upgrade --install karpenter-crd oci://public.ecr.aws/karpenter/karpenter-crd --version "${KARPENTER_VERSION}" --namespace "${KARPENTER_NAMESPACE}" --create-namespace \
Expand All @@ -321,7 +330,7 @@ helm upgrade --install karpenter-crd oci://public.ecr.aws/karpenter/karpenter-cr
--set webhook.port=8443
```

4. Rollback the Karpenter Controller
5. Rollback the Karpenter Controller

```bash
# Service account annotation can be dropped when using pod identity
Expand Down
29 changes: 19 additions & 10 deletions website/content/en/v1.0/upgrading/v1-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ The upgrade guide will first require upgrading to your latest patch version prio
1. Set environment variables for your cluster to upgrade to the latest patch version of the current Karpenter version you're running on:

```bash
export KARPENTER_NAMESPACE=kube-system
export KARPENTER_IAM_ROLE_ARN="arn:${AWS_PARTITION}:iam::${AWS_ACCOUNT_ID}:role/${CLUSTER_NAME}-karpenter"
export AWS_PARTITION="aws" # if you are not using standard partitions, you may need to configure to aws-cn / aws-us-gov
export CLUSTER_NAME="${USER}-karpenter-demo"
export AWS_REGION="us-west-2"
export AWS_ACCOUNT_ID="$(aws sts get-caller-identity --query Account --output text)"
export KARPENTER_NAMESPACE=kube-system
export KARPENTER_IAM_ROLE_ARN="arn:${AWS_PARTITION}:iam::${AWS_ACCOUNT_ID}:role/${CLUSTER_NAME}-karpenter"
```


Expand Down Expand Up @@ -106,7 +106,7 @@ The upgrade guide will first require upgrading to your latest patch version prio
Notable Changes to the IAM Policy include additional tag-scoping for the `eks:eks-cluster-name` tag for instances and instance profiles.

```bash
TEMPOUT=$(mktemp)
export TEMPOUT=$(mktemp)
curl -fsSL https://raw.githubusercontent.com/aws/karpenter-provider-aws/v"${KARPENTER_VERSION}"/website/content/en/preview/getting-started/getting-started-with-karpenter/cloudformation.yaml > ${TEMPOUT} \
&& aws cloudformation deploy \
--stack-name "Karpenter-${CLUSTER_NAME}" \
Expand Down Expand Up @@ -271,12 +271,19 @@ Since both v1beta1 and v1 will be served, `kubectl` will default to returning th
1. Set environment variables

```bash
export KARPENTER_NAMESPACE="kube-system"
export AWS_PARTITION="aws" # if you are not using standard partitions, you may need to configure to aws-cn / aws-us-gov
export CLUSTER_NAME="${USER}-karpenter-demo"
export AWS_REGION="us-west-2"
export AWS_ACCOUNT_ID="$(aws sts get-caller-identity --query Account --output text)"
export KARPENTER_NAMESPACE=kube-system
export KARPENTER_IAM_ROLE_ARN="arn:${AWS_PARTITION}:iam::${AWS_ACCOUNT_ID}:role/${CLUSTER_NAME}-karpenter"
```

2. Set Karpenter Version

```bash
# Note: v0.33.6 and v0.34.7 include the v prefix, omit it for versions v0.35+
export KARPENTER_VERSION="<rollback version of karpenter>"
export KARPENTER_IAM_ROLE_ARN="arn:${AWS_PARTITION}:iam::${AWS_ACCOUNT_ID}:role/${CLUSTER_NAME}-karpenter"
export CLUSTER_NAME="<name of your cluster>"
export TEMPOUT="$(mktemp)"
```

{{% alert title="Warning" color="warning" %}}
Expand All @@ -289,10 +296,11 @@ echo "${KARPENTER_NAMESPACE}" "${KARPENTER_VERSION}" "${CLUSTER_NAME}" "${TEMPOU

{{% /alert %}}

2. Rollback the Karpenter Policy
3. Rollback the Karpenter Policy

**v0.33.6 and v0.34.7:**
```bash
export TEMPOUT=$(mktemp)
curl -fsSL https://raw.githubusercontent.com/aws/karpenter-provider-aws/"${KARPENTER_VERSION}"/website/content/en/preview/getting-started/getting-started-with-karpenter/cloudformation.yaml > ${TEMPOUT} \
&& aws cloudformation deploy \
--stack-name "Karpenter-${CLUSTER_NAME}" \
Expand All @@ -303,6 +311,7 @@ curl -fsSL https://raw.githubusercontent.com/aws/karpenter-provider-aws/"${KARPE

**v0.35+:**
```bash
export TEMPOUT=$(mktemp)
curl -fsSL https://raw.githubusercontent.com/aws/karpenter-provider-aws/v"${KARPENTER_VERSION}"/website/content/en/preview/getting-started/getting-started-with-karpenter/cloudformation.yaml > ${TEMPOUT} \
&& aws cloudformation deploy \
--stack-name "Karpenter-${CLUSTER_NAME}" \
Expand All @@ -311,7 +320,7 @@ curl -fsSL https://raw.githubusercontent.com/aws/karpenter-provider-aws/v"${KARP
--parameter-overrides "ClusterName=${CLUSTER_NAME}"
```

3. Rollback the CRDs
4. Rollback the CRDs

```bash
helm upgrade --install karpenter-crd oci://public.ecr.aws/karpenter/karpenter-crd --version "${KARPENTER_VERSION}" --namespace "${KARPENTER_NAMESPACE}" --create-namespace \
Expand All @@ -321,7 +330,7 @@ helm upgrade --install karpenter-crd oci://public.ecr.aws/karpenter/karpenter-cr
--set webhook.port=8443
```

4. Rollback the Karpenter Controller
5. Rollback the Karpenter Controller

```bash
# Service account annotation can be dropped when using pod identity
Expand Down
Loading