Skip to content

Commit

Permalink
Wiring user identities
Browse files Browse the repository at this point in the history
Signed-off-by: ritikaguptams <[email protected]>
  • Loading branch information
ritikaguptams committed Jul 29, 2024
1 parent 240fc84 commit a523acd
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 2 deletions.
4 changes: 2 additions & 2 deletions capz/run-capz-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ run_e2e_test() {

if [[ ! "${RUN_SERIAL_TESTS:-}" == "true" ]]; then
export GINKGO_FOCUS=${GINKGO_FOCUS:-"\[Conformance\]|\[NodeConformance\]|\[sig-windows\]|\[sig-apps\].CronJob|\[sig-api-machinery\].ResourceQuota|\[sig-scheduling\].SchedulerPreemption"}
export GINKGO_SKIP=${GINKGO_SKIP:-"\[LinuxOnly\]|\[Serial\]|\[Slow\]|\[Excluded:WindowsDocker\]|\[Feature:DynamicResourceAllocation\]|Networking.Granular.Checks(.*)node-pod.communication|Guestbook.application.should.create.and.stop.a.working.application|device.plugin.for.Windows|Container.Lifecycle.Hook.when.create.a.pod.with.lifecycle.hook.should.execute(.*)http.hook.properly|\[sig-api-machinery\].Garbage.collector|pull.from.private.registry.with.secret"}
export GINKGO_SKIP=${GINKGO_SKIP:-"\[LinuxOnly\]|\[Serial\]|\[Slow\]|\[Excluded:WindowsDocker\]|\[Feature:DynamicResourceAllocation\]|Networking.Granular.Checks(.*)node-pod.communication|Guestbook.application.should.create.and.stop.a.working.application|device.plugin.for.Windows|Container.Lifecycle.Hook.when.create.a.pod.with.lifecycle.hook.should.execute(.*)http.hook.properly|\[sig-api-machinery\].Garbage.collector"}
export GINKGO_NODES="${GINKGO_NODES:-"4"}"
else
export GINKGO_FOCUS=${GINKGO_FOCUS:-"(\[sig-windows\]|\[sig-scheduling\].SchedulerPreemption|\[sig-autoscaling\].\[Feature:HPA\]|\[sig-apps\].CronJob).*(\[Serial\]|\[Slow\])|(\[Serial\]|\[Slow\]).*(\[Conformance\]|\[NodeConformance\])|\[sig-api-machinery\].Garbage.collector"}
Expand All @@ -387,7 +387,7 @@ run_e2e_test() {
# This will not work in community cluster as this secret is not present (hence we only do it if ENV is set)
# On the community cluster we will use credential providers to a private registry in azure see:
# https://github.com/kubernetes-sigs/windows-testing/issues/446
export KUBE_TEST_REPO_LIST="$SCRIPT_ROOT/../images/image-repo-list-private-registry"
export KUBE_TEST_REPO_LIST="$SCRIPT_ROOT/../images/image-repo-list-private-registry-community"
ADDITIONAL_E2E_ARGS+=("--docker-config-file=${DOCKER_CONFIG_FILE}")
fi

Expand Down
2 changes: 2 additions & 0 deletions capz/templates/gmsa-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ spec:
kubeletExtraArgs:
cloud-provider: external
feature-gates: ${NODE_FEATURE_GATES:-"HPAContainerMetrics=true"}
image-credential-provider-bin-dir: /var/lib/kubelet/credential-provider
image-credential-provider-config: /var/lib/kubelet/credential-provider-config.yaml
v: "2"
windows-priorityclass: ABOVE_NORMAL_PRIORITY_CLASS
name: '{{ ds.meta_data["local_hostname"] }}'
Expand Down
2 changes: 2 additions & 0 deletions capz/templates/gmsa-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ spec:
kubeletExtraArgs:
cloud-provider: external
feature-gates: ${NODE_FEATURE_GATES:-"HPAContainerMetrics=true"}
image-credential-provider-bin-dir: /var/lib/kubelet/credential-provider
image-credential-provider-config: /var/lib/kubelet/credential-provider-config.yaml
v: "2"
windows-priorityclass: ABOVE_NORMAL_PRIORITY_CLASS
name: '{{ ds.meta_data["local_hostname"] }}'
Expand Down
5 changes: 5 additions & 0 deletions capz/templates/shared-image-gallery-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ spec:
kubeletExtraArgs:
cloud-provider: external
feature-gates: ${NODE_FEATURE_GATES:-"HPAContainerMetrics=true"}
image-credential-provider-bin-dir: /var/lib/kubelet/credential-provider
image-credential-provider-config: /var/lib/kubelet/credential-provider-config.yaml
v: "2"
windows-priorityclass: ABOVE_NORMAL_PRIORITY_CLASS
name: '{{ ds.meta_data["local_hostname"] }}'
Expand Down Expand Up @@ -433,6 +435,7 @@ spec:
annotations:
runtime: containerd
spec:
identity: UserAssigned
image:
sharedGallery:
gallery: SigwinTestingImages
Expand All @@ -446,4 +449,6 @@ spec:
storageAccountType: Premium_LRS
osType: Windows
sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""}
userAssignedIdentities:
- providerID: /subscriptions/${AZURE_SUBSCRIPTION_ID}/resourceGroups/${CI_RG:=capz-ci}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/${USER_IDENTITY:=cloud-provider-user-identity}
vmSize: ${AZURE_NODE_MACHINE_TYPE:-"Standard_D4s_v3"}
5 changes: 5 additions & 0 deletions capz/templates/windows-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ spec:
criSocket: npipe:////./pipe/containerd-containerd
kubeletExtraArgs:
cloud-provider: external
image-credential-provider-config: /var/lib/kubelet/credential-provider-config.yaml
image-credential-provider-bin-dir: /var/lib/kubelet/credential-provider
feature-gates: ${NODE_FEATURE_GATES:-"HPAContainerMetrics=true"}
v: "2"
windows-priorityclass: ABOVE_NORMAL_PRIORITY_CLASS
Expand Down Expand Up @@ -330,11 +332,14 @@ spec:
annotations:
runtime: containerd
spec:
identity: UserAssigned
image:
osDisk:
diskSizeGB: 128
managedDisk:
storageAccountType: Premium_LRS
osType: Windows
sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""}
userAssignedIdentities:
- providerID: /subscriptions/${AZURE_SUBSCRIPTION_ID}/resourceGroups/${CI_RG:=capz-ci}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/${USER_IDENTITY:=cloud-provider-user-identity}
vmSize: ${AZURE_NODE_MACHINE_TYPE:-"Standard_D4s_v3"}
5 changes: 5 additions & 0 deletions capz/templates/windows-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ spec:
kubeletExtraArgs:
cloud-provider: external
feature-gates: ${NODE_FEATURE_GATES:-"HPAContainerMetrics=true"}
image-credential-provider-bin-dir: /var/lib/kubelet/credential-provider
image-credential-provider-config: /var/lib/kubelet/credential-provider-config.yaml
v: "2"
windows-priorityclass: ABOVE_NORMAL_PRIORITY_CLASS
name: '{{ ds.meta_data["local_hostname"] }}'
Expand Down Expand Up @@ -427,6 +429,7 @@ spec:
annotations:
runtime: containerd
spec:
identity: UserAssigned
image:
marketplace:
offer: capi-windows
Expand All @@ -439,4 +442,6 @@ spec:
storageAccountType: Premium_LRS
osType: Windows
sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""}
userAssignedIdentities:
- providerID: /subscriptions/${AZURE_SUBSCRIPTION_ID}/resourceGroups/${CI_RG:=capz-ci}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/${USER_IDENTITY:=cloud-provider-user-identity}
vmSize: ${AZURE_NODE_MACHINE_TYPE:-"Standard_D4s_v3"}
5 changes: 5 additions & 0 deletions capz/templates/windows-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ spec:
kubeletExtraArgs:
cloud-provider: external
feature-gates: ${NODE_FEATURE_GATES:-"HPAContainerMetrics=true"}
image-credential-provider-bin-dir: /var/lib/kubelet/credential-provider
image-credential-provider-config: /var/lib/kubelet/credential-provider-config.yaml
v: "2"
windows-priorityclass: ABOVE_NORMAL_PRIORITY_CLASS
name: '{{ ds.meta_data["local_hostname"] }}'
Expand Down Expand Up @@ -415,6 +417,7 @@ spec:
annotations:
runtime: containerd
spec:
identity: UserAssigned
image:
marketplace:
offer: capi-windows
Expand All @@ -427,4 +430,6 @@ spec:
storageAccountType: Premium_LRS
osType: Windows
sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""}
userAssignedIdentities:
- providerID: /subscriptions/${AZURE_SUBSCRIPTION_ID}/resourceGroups/${CI_RG:=capz-ci}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/${USER_IDENTITY:=cloud-provider-user-identity}
vmSize: ${AZURE_NODE_MACHINE_TYPE:-"Standard_D4s_v3"}
1 change: 1 addition & 0 deletions images/image-repo-list-private-registry-community
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
privateRegistry: e2eprivatecommunity.azurecr.io

0 comments on commit a523acd

Please sign in to comment.