Skip to content

Commit

Permalink
docs: update v1 migration guide (#7220)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdeal authored Nov 30, 2024
1 parent 5e9803a commit 13d6fc0
Show file tree
Hide file tree
Showing 7 changed files with 1,201 additions and 705 deletions.
16 changes: 16 additions & 0 deletions website/content/en/docs/upgrading/get-controller-policy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

sourceVersionCfn=$(mktemp)
versionTag=$([[ ${KARPENTER_VERSION} == v* ]] && echo "${KARPENTER_VERSION}" || echo "v${KARPENTER_VERSION}")
curl -fsSL https://raw.githubusercontent.com/aws/karpenter-provider-aws/${versionTag}/website/content/en/preview/getting-started/getting-started-with-karpenter/cloudformation.yaml > ${sourceVersionCfn}

# Substitute the cloudformation templating strings for our environment variables
sed -e 's/!Sub//g' -i "" "${sourceVersionCfn}"
sed -e 's/${AWS::Partition}/${AWS_PARTITION}/g' -i "" "${sourceVersionCfn}"
sed -e 's/${AWS::Region}/${AWS_REGION}/g' -i "" "${sourceVersionCfn}"
sed -e 's/${AWS::AccountId}/${AWS_ACCOUNT_ID}/g' -i "" "${sourceVersionCfn}"
sed -e 's/${ClusterName}/${CLUSTER_NAME}/g' -i "" "${sourceVersionCfn}"
sed -e 's/${KarpenterInterruptionQueue.Arn}/arn:${AWS_PARTITION}:sqs:${AWS_REGION}:${AWS_ACCOUNT_ID}:${CLUSTER_NAME}/g' -i "" "${sourceVersionCfn}"
sed -e 's/${KarpenterNodeRole.Arn}/arn:${AWS_PARTITION}:iam::${AWS_ACCOUNT_ID}:role\/KarpenterNodeRole-${CLUSTER_NAME}/g' -i "" "${sourceVersionCfn}"

yq '.Resources.KarpenterControllerPolicy.Properties.PolicyDocument' ${sourceVersionCfn} | envsubst
83 changes: 36 additions & 47 deletions website/content/en/docs/upgrading/upgrade-guide.md

Large diffs are not rendered by default.

809 changes: 529 additions & 280 deletions website/content/en/docs/upgrading/v1-migration.md

Large diffs are not rendered by default.

85 changes: 37 additions & 48 deletions website/content/en/preview/upgrading/upgrade-guide.md

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions website/content/en/v1.0/upgrading/get-controller-policy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

sourceVersionCfn=$(mktemp)
versionTag=$([[ ${KARPENTER_VERSION} == v* ]] && echo "${KARPENTER_VERSION}" || echo "v${KARPENTER_VERSION}")
curl -fsSL https://raw.githubusercontent.com/aws/karpenter-provider-aws/${versionTag}/website/content/en/preview/getting-started/getting-started-with-karpenter/cloudformation.yaml > ${sourceVersionCfn}

# Substitute the cloudformation templating strings for our environment variables
sed -e 's/!Sub//g' -i "" "${sourceVersionCfn}"
sed -e 's/${AWS::Partition}/${AWS_PARTITION}/g' -i "" "${sourceVersionCfn}"
sed -e 's/${AWS::Region}/${AWS_REGION}/g' -i "" "${sourceVersionCfn}"
sed -e 's/${AWS::AccountId}/${AWS_ACCOUNT_ID}/g' -i "" "${sourceVersionCfn}"
sed -e 's/${ClusterName}/${CLUSTER_NAME}/g' -i "" "${sourceVersionCfn}"
sed -e 's/${KarpenterInterruptionQueue.Arn}/arn:${AWS_PARTITION}:sqs:${AWS_REGION}:${AWS_ACCOUNT_ID}:${CLUSTER_NAME}/g' -i "" "${sourceVersionCfn}"
sed -e 's/${KarpenterNodeRole.Arn}/arn:${AWS_PARTITION}:iam::${AWS_ACCOUNT_ID}:role\/KarpenterNodeRole-${CLUSTER_NAME}/g' -i "" "${sourceVersionCfn}"

yq '.Resources.KarpenterControllerPolicy.Properties.PolicyDocument' ${sourceVersionCfn} | envsubst
85 changes: 37 additions & 48 deletions website/content/en/v1.0/upgrading/upgrade-guide.md

Large diffs are not rendered by default.

812 changes: 530 additions & 282 deletions website/content/en/v1.0/upgrading/v1-migration.md

Large diffs are not rendered by default.

0 comments on commit 13d6fc0

Please sign in to comment.