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

ci: remove pinned k8s version for aks clusters #1334

Merged
merged 2 commits into from
May 2, 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
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"
Comment on lines -28 to -29
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a test matrix with kind clusters, so relying on default version for AKS cluster creation should be fine.

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
Loading