Skip to content

Commit

Permalink
ci: remove pinned k8s version for aks clusters (#1334)
Browse files Browse the repository at this point in the history
Signed-off-by: Anish Ramasekar <[email protected]>
  • Loading branch information
aramase committed May 2, 2024
1 parent 9b60b52 commit 96f34d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .pipelines/templates/scan-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ steps:
tar zxvf trivy_${TRIVY_VERSION:-0.24.4}_Linux-64bit.tar.gz
# show all vulnerabilities in the logs
./trivy image --reset
for IMAGE_NAME in "proxy" "proxy-init" "webhook"; do
# TODO(aramase): add proxy-init image after https://github.com/kubernetes/release/issues/3593 is fixed
for IMAGE_NAME in "proxy" "webhook"; do
./trivy image "${REGISTRY}/${IMAGE_NAME}:${IMAGE_VERSION}-linux-amd64"
./trivy image --exit-code 1 --ignore-unfixed --severity MEDIUM,HIGH,CRITICAL "${REGISTRY}/${IMAGE_NAME}:${IMAGE_VERSION}-linux-amd64" || exit 1
done
Expand Down
5 changes: 1 addition & 4 deletions scripts/create-aks-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ main() {
if [[ "$(should_create_aks_cluster)" == "true" ]]; then
echo "Creating an AKS cluster '${CLUSTER_NAME}'"
LOCATION="$(get_random_region)"
# pin to the minor version and aks will pick the latest patch version
KUBERNETES_VERSION="1.26"
az group create --name "${CLUSTER_NAME}" --location "${LOCATION}" > /dev/null
# TODO(chewong): ability to create an arc-enabled cluster
az aks create \
Expand All @@ -35,7 +33,6 @@ main() {
--node-vm-size Standard_DS3_v2 \
--enable-managed-identity \
--network-plugin azure \
--kubernetes-version "${KUBERNETES_VERSION}" \
--node-count 3 \
--generate-ssh-keys \
--enable-oidc-issuer > /dev/null
Expand All @@ -44,7 +41,7 @@ main() {
EXTRA_ARGS="--aks-custom-headers WindowsContainerRuntime=containerd"
fi
# shellcheck disable=SC2086
az aks nodepool add --resource-group "${CLUSTER_NAME}" --cluster-name "${CLUSTER_NAME}" --os-type Windows --name npwin --kubernetes-version "${KUBERNETES_VERSION}" --node-count 3 ${EXTRA_ARGS:-} > /dev/null
az aks nodepool add --resource-group "${CLUSTER_NAME}" --cluster-name "${CLUSTER_NAME}" --os-type Windows --name npwin --node-count 3 ${EXTRA_ARGS:-} > /dev/null
fi
fi
}
Expand Down

0 comments on commit 96f34d0

Please sign in to comment.