diff --git a/config/aso/kustomization.yaml b/config/aso/kustomization.yaml index 3a225ed9577..52cd874cf9b 100644 --- a/config/aso/kustomization.yaml +++ b/config/aso/kustomization.yaml @@ -5,81 +5,78 @@ resources: - https://github.com/Azure/azure-service-operator/releases/download/v2.6.0/azureserviceoperator_v2.6.0.yaml - crds.yaml - settings.yaml - -patches: - - path: patches/visualizer_label_in_bastionhosts.yaml - - path: patches/visualizer_label_in_extensions.yaml - - path: patches/visualizer_label_in_fleetmembers.yaml - - path: patches/visualizer_label_in_managedclusteragentpools.yaml - - path: patches/visualizer_label_in_managed_clusters.yaml - - path: patches/visualizer_label_in_natgateways.yaml - - path: patches/visualizer_label_in_privateendpoints.yaml - - path: patches/visualizer_label_in_resourcegroups.yaml - - path: patches/visualizer_label_in_subnets.yaml - - path: patches/visualizer_label_in_virtualnetworks.yaml - - patch: |- # default kustomization includes a namespace already - $patch: delete - apiVersion: v1 - kind: Namespace - metadata: - name: azureserviceoperator-system - - patch: |- - - op: test - path: /spec/template/spec/containers/0/args/4 - value: --crd-pattern= - - op: replace # Users can specify additional ASO CRDs. CRDs should be appended with ';' - path: /spec/template/spec/containers/0/args/4 - value: --crd-pattern=${ADDITIONAL_ASO_CRDS:= } - target: - group: apps - version: v1 - kind: Deployment - name: azureserviceoperator-controller-manager # This implements https://github.com/Azure/azure-service-operator/pull/4011 # for versions of ASO which don't include that fix. - - patch: |- - apiVersion: apps/v1 - kind: Deployment - metadata: - name: azureserviceoperator-controller-manager - namespace: azureserviceoperator-system - spec: - template: - spec: - containers: - - name: manager - env: - - name: AZURE_USER_AGENT_SUFFIX - valueFrom: - secretKeyRef: - key: AZURE_USER_AGENT_SUFFIX - name: aso-controller-settings - optional: true - +patches: +- path: patches/visualizer_label_in_bastionhosts.yaml +- path: patches/visualizer_label_in_extensions.yaml +- path: patches/visualizer_label_in_fleetmembers.yaml +- path: patches/visualizer_label_in_managedclusteragentpools.yaml +- path: patches/visualizer_label_in_managed_clusters.yaml +- path: patches/visualizer_label_in_natgateways.yaml +- path: patches/visualizer_label_in_privateendpoints.yaml +- path: patches/visualizer_label_in_resourcegroups.yaml +- path: patches/visualizer_label_in_subnets.yaml +- path: patches/visualizer_label_in_virtualnetworks.yaml +- patch: |- # default kustomization includes a namespace already + $patch: delete + apiVersion: v1 + kind: Namespace + metadata: + name: azureserviceoperator-system +- patch: |- + - op: test + path: /spec/template/spec/containers/0/args/4 + value: --crd-pattern= + - op: replace # Users can specify additional ASO CRDs. CRDs should be appended with ';' + path: /spec/template/spec/containers/0/args/4 + value: --crd-pattern=${ADDITIONAL_ASO_CRDS:= } + target: + group: apps + kind: Deployment + name: azureserviceoperator-controller-manager + version: v1 +- patch: |- + apiVersion: apps/v1 + kind: Deployment + metadata: + name: azureserviceoperator-controller-manager + namespace: azureserviceoperator-system + spec: + template: + spec: + containers: + - name: manager + env: + - name: AZURE_USER_AGENT_SUFFIX + valueFrom: + secretKeyRef: + key: AZURE_USER_AGENT_SUFFIX + name: aso-controller-settings + optional: true replacements: - - source: - kind: Certificate - group: cert-manager.io +- source: + fieldPath: metadata.namespace + group: cert-manager.io + kind: Certificate + name: azureserviceoperator-serving-cert + version: v1 + targets: + - fieldPaths: + - metadata.annotations.cert-manager\.io/inject-ca-from + options: + delimiter: / + select: + annotationSelector: cert-manager.io/inject-ca-from version: v1 + - fieldPaths: + - spec.dnsNames.0 + - spec.dnsNames.1 + options: + delimiter: . + index: 1 + select: + group: cert-manager.io + kind: Certificate name: azureserviceoperator-serving-cert - fieldPath: metadata.namespace - targets: - - select: - version: v1 - annotationSelector: cert-manager.io/inject-ca-from - fieldPaths: - - metadata.annotations.cert-manager\.io/inject-ca-from - options: - delimiter: / - index: 0 - - select: - group: cert-manager.io - version: v1 - kind: Certificate - name: azureserviceoperator-serving-cert - fieldPaths: - - spec.dnsNames.0 - - spec.dnsNames.1 - options: - delimiter: . - index: 1 + version: v1 diff --git a/config/capz/kustomization.yaml b/config/capz/kustomization.yaml index d2845607c03..c651f15ff2a 100644 --- a/config/capz/kustomization.yaml +++ b/config/capz/kustomization.yaml @@ -1,13 +1,12 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization namespace: capz-system - namePrefix: capz- - # Labels to add to all resources and selectors. labels: - includeSelectors: true pairs: cluster.x-k8s.io/provider: infrastructure-azure - resources: - namespace.yaml - credentials.yaml @@ -16,7 +15,6 @@ resources: - ../manager - ../webhook - ../certmanager - patches: - path: manager_image_patch.yaml - path: manager_pull_policy.yaml @@ -24,10 +22,8 @@ patches: - path: manager_webhook_patch.yaml - path: validatingwebhookcainjection_patch.yaml - path: mutatingwebhookcainjection_patch.yaml - configurations: - kustomizeconfig.yaml - replacements: - source: # CERTIFICATE_NAMESPACE fieldPath: metadata.namespace @@ -51,7 +47,6 @@ replacements: index: 1 select: annotationSelector: cert-manager.io/inject-ca-from - - source: # SERVICE_NAMESPACE fieldPath: metadata.namespace kind: Service @@ -79,7 +74,6 @@ replacements: name: serving-cert namespace: system version: v1 - - source: # SERVICE_NAME kind: Service name: webhook-service diff --git a/config/certmanager/kustomization.yaml b/config/certmanager/kustomization.yaml index 34e7e5b1262..8c1ed45bc6e 100644 --- a/config/certmanager/kustomization.yaml +++ b/config/certmanager/kustomization.yaml @@ -1,4 +1,6 @@ resources: - - certificate.yaml +- certificate.yaml configurations: - - kustomizeconfig.yaml +- kustomizeconfig.yaml +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index 034f69d532b..0d26679ddca 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -1,79 +1,77 @@ # This kustomization.yaml is not intended to be run by itself, # since it depends on service name and namespace that are out of this kustomize package. # It should be run by config/ - +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization resources: - - bases/infrastructure.cluster.x-k8s.io_azuremachines.yaml - - bases/infrastructure.cluster.x-k8s.io_azureclusters.yaml - - bases/infrastructure.cluster.x-k8s.io_azureclustertemplates.yaml - - bases/infrastructure.cluster.x-k8s.io_azuremachinetemplates.yaml - - bases/infrastructure.cluster.x-k8s.io_azureclusteridentities.yaml - - bases/infrastructure.cluster.x-k8s.io_azuremachinepools.yaml - - bases/infrastructure.cluster.x-k8s.io_azuremanagedmachinepools.yaml - - bases/infrastructure.cluster.x-k8s.io_azuremanagedclusters.yaml - - bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanes.yaml - - bases/infrastructure.cluster.x-k8s.io_azuremachinepoolmachines.yaml - - bases/infrastructure.cluster.x-k8s.io_azuremanagedclustertemplates.yaml - - bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanetemplates.yaml - - bases/infrastructure.cluster.x-k8s.io_azuremanagedmachinepooltemplates.yaml - - bases/infrastructure.cluster.x-k8s.io_azureasomanagedclusters.yaml - - bases/infrastructure.cluster.x-k8s.io_azureasomanagedclustertemplates.yaml - - bases/infrastructure.cluster.x-k8s.io_azureasomanagedcontrolplanes.yaml - - bases/infrastructure.cluster.x-k8s.io_azureasomanagedcontrolplanetemplates.yaml - - bases/infrastructure.cluster.x-k8s.io_azureasomanagedmachinepools.yaml - - bases/infrastructure.cluster.x-k8s.io_azureasomanagedmachinepooltemplates.yaml +- bases/infrastructure.cluster.x-k8s.io_azuremachines.yaml +- bases/infrastructure.cluster.x-k8s.io_azureclusters.yaml +- bases/infrastructure.cluster.x-k8s.io_azureclustertemplates.yaml +- bases/infrastructure.cluster.x-k8s.io_azuremachinetemplates.yaml +- bases/infrastructure.cluster.x-k8s.io_azureclusteridentities.yaml +- bases/infrastructure.cluster.x-k8s.io_azuremachinepools.yaml +- bases/infrastructure.cluster.x-k8s.io_azuremanagedmachinepools.yaml +- bases/infrastructure.cluster.x-k8s.io_azuremanagedclusters.yaml +- bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanes.yaml +- bases/infrastructure.cluster.x-k8s.io_azuremachinepoolmachines.yaml +- bases/infrastructure.cluster.x-k8s.io_azuremanagedclustertemplates.yaml +- bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanetemplates.yaml +- bases/infrastructure.cluster.x-k8s.io_azuremanagedmachinepooltemplates.yaml +- bases/infrastructure.cluster.x-k8s.io_azureasomanagedclusters.yaml +- bases/infrastructure.cluster.x-k8s.io_azureasomanagedclustertemplates.yaml +- bases/infrastructure.cluster.x-k8s.io_azureasomanagedcontrolplanes.yaml +- bases/infrastructure.cluster.x-k8s.io_azureasomanagedcontrolplanetemplates.yaml +- bases/infrastructure.cluster.x-k8s.io_azureasomanagedmachinepools.yaml +- bases/infrastructure.cluster.x-k8s.io_azureasomanagedmachinepooltemplates.yaml # +kubebuilder:scaffold:crdkustomizeresource - - patches: - # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix. - # patches here are for enabling the conversion webhook for each CRD - - path: patches/webhook_in_azuremachines.yaml - - path: patches/webhook_in_azureclusters.yaml - - path: patches/webhook_in_azureclustertemplates.yaml - - path: patches/webhook_in_azureclusteridentities.yaml - - path: patches/webhook_in_azuremachinetemplates.yaml - - path: patches/webhook_in_azuremachinepools.yaml - - path: patches/webhook_in_azuremachinepoolmachines.yaml - # - path: patches/webhook_in_azuremanagedmachinepools.yaml - # - path: patches/webhook_in_azuremanagedclusters.yaml - # - path: patches/webhook_in_azuremanagedcontrolplanes.yaml - # +kubebuilder:scaffold:crdkustomizewebhookpatch - - # [CERTMANAGER] To enable webhook, uncomment all the sections with [CERTMANAGER] prefix. - # patches here are for enabling the CA injection for each CRD - - path: patches/cainjection_in_azuremachines.yaml - - path: patches/cainjection_in_azureclusters.yaml - - path: patches/cainjection_in_azureclustertemplates.yaml - - path: patches/cainjection_in_azureclusteridentities.yaml - - path: patches/cainjection_in_azuremachinetemplates.yaml - - path: patches/cainjection_in_azuremachinepools.yaml - - path: patches/cainjection_in_azuremachinepoolmachines.yaml - # - path: patches/cainjection_in_azuremanagedmachinepools.yaml - # - path: patches/cainjection_in_azuremanagedclusters.yaml - # - path: patches/cainjection_in_azuremanagedcontrolplanes.yaml - # +kubebuilder:scaffold:crdkustomizecainjectionpatch +# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix. +# patches here are for enabling the conversion webhook for each CRD +- path: patches/webhook_in_azuremachines.yaml +- path: patches/webhook_in_azureclusters.yaml +- path: patches/webhook_in_azureclustertemplates.yaml +- path: patches/webhook_in_azureclusteridentities.yaml +- path: patches/webhook_in_azuremachinetemplates.yaml +- path: patches/webhook_in_azuremachinepools.yaml +- path: patches/webhook_in_azuremachinepoolmachines.yaml +# - path: patches/webhook_in_azuremanagedmachinepools.yaml +# - path: patches/webhook_in_azuremanagedclusters.yaml +# - path: patches/webhook_in_azuremanagedcontrolplanes.yaml +# +kubebuilder:scaffold:crdkustomizewebhookpatch - - path: patches/capicontract_in_azuremachines.yaml - - path: patches/capicontract_in_azureclusters.yaml - - path: patches/capicontract_in_azureclustertemplates.yaml - - path: patches/capicontract_in_azuremachinetemplates.yaml - - path: patches/capicontract_in_azureclusteridentities.yaml - - path: patches/capicontract_in_azuremachinepools.yaml - - path: patches/capicontract_in_azuremanagedmachinepools.yaml - - path: patches/capicontract_in_azuremanagedclusters.yaml - - path: patches/capicontract_in_azuremanagedcontrolplanes.yaml - - path: patches/capicontract_in_azuremachinepoolmachines.yaml - - path: patches/capicontract_in_azuremanagedclustertemplates.yaml - - path: patches/capicontract_in_azuremanagedcontrolplanetemplates.yaml - - path: patches/capicontract_in_azuremanagedmachinepooltemplates.yaml - - path: patches/capicontract_in_azureasomanagedclusters.yaml - - path: patches/capicontract_in_azureasomanagedclustertemplates.yaml - - path: patches/capicontract_in_azureasomanagedcontrolplanes.yaml - - path: patches/capicontract_in_azureasomanagedcontrolplanetemplates.yaml - - path: patches/capicontract_in_azureasomanagedmachinepools.yaml - - path: patches/capicontract_in_azureasomanagedmachinepooltemplates.yaml +# [CERTMANAGER] To enable webhook, uncomment all the sections with [CERTMANAGER] prefix. +# patches here are for enabling the CA injection for each CRD +- path: patches/cainjection_in_azuremachines.yaml +- path: patches/cainjection_in_azureclusters.yaml +- path: patches/cainjection_in_azureclustertemplates.yaml +- path: patches/cainjection_in_azureclusteridentities.yaml +- path: patches/cainjection_in_azuremachinetemplates.yaml +- path: patches/cainjection_in_azuremachinepools.yaml +- path: patches/cainjection_in_azuremachinepoolmachines.yaml +# - path: patches/cainjection_in_azuremanagedmachinepools.yaml +# - path: patches/cainjection_in_azuremanagedclusters.yaml +# - path: patches/cainjection_in_azuremanagedcontrolplanes.yaml +# +kubebuilder:scaffold:crdkustomizecainjectionpatch +- path: patches/capicontract_in_azuremachines.yaml +- path: patches/capicontract_in_azureclusters.yaml +- path: patches/capicontract_in_azureclustertemplates.yaml +- path: patches/capicontract_in_azuremachinetemplates.yaml +- path: patches/capicontract_in_azureclusteridentities.yaml +- path: patches/capicontract_in_azuremachinepools.yaml +- path: patches/capicontract_in_azuremanagedmachinepools.yaml +- path: patches/capicontract_in_azuremanagedclusters.yaml +- path: patches/capicontract_in_azuremanagedcontrolplanes.yaml +- path: patches/capicontract_in_azuremachinepoolmachines.yaml +- path: patches/capicontract_in_azuremanagedclustertemplates.yaml +- path: patches/capicontract_in_azuremanagedcontrolplanetemplates.yaml +- path: patches/capicontract_in_azuremanagedmachinepooltemplates.yaml +- path: patches/capicontract_in_azureasomanagedclusters.yaml +- path: patches/capicontract_in_azureasomanagedclustertemplates.yaml +- path: patches/capicontract_in_azureasomanagedcontrolplanes.yaml +- path: patches/capicontract_in_azureasomanagedcontrolplanetemplates.yaml +- path: patches/capicontract_in_azureasomanagedmachinepools.yaml +- path: patches/capicontract_in_azureasomanagedmachinepooltemplates.yaml # the following config is for teaching kustomize how to do kustomization for CRDs. configurations: - - kustomizeconfig.yaml +- kustomizeconfig.yaml diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index 7745a6df34e..57bc2c9cae8 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -1,9 +1,9 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization resources: - - ../capz - +- ../capz components: - ../aso - replacements: - source: kind: Deployment diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 96c47e355bb..99cf0f7457d 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -1,5 +1,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - manager.yaml - +- manager.yaml diff --git a/config/rbac/kustomization.yaml b/config/rbac/kustomization.yaml index 74bb4da487b..e82521ffdcc 100644 --- a/config/rbac/kustomization.yaml +++ b/config/rbac/kustomization.yaml @@ -1,8 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - role.yaml - - role_binding.yaml - - service_account.yaml - - leader_election_role.yaml - - leader_election_role_binding.yaml +- role.yaml +- role_binding.yaml +- service_account.yaml +- leader_election_role.yaml +- leader_election_role_binding.yaml diff --git a/config/webhook/kustomization.yaml b/config/webhook/kustomization.yaml index 7feb516a71f..168d5fe188d 100644 --- a/config/webhook/kustomization.yaml +++ b/config/webhook/kustomization.yaml @@ -1,6 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization resources: - - manifests.yaml - - service.yaml - +- manifests.yaml +- service.yaml configurations: - - kustomizeconfig.yaml +- kustomizeconfig.yaml diff --git a/hack/gen-flavors.sh b/hack/gen-flavors.sh index cf7704abd91..c5fb0aba2fd 100755 --- a/hack/gen-flavors.sh +++ b/hack/gen-flavors.sh @@ -29,15 +29,15 @@ ci_dir="${REPO_ROOT}/templates/test/ci/" dev_dir="${REPO_ROOT}/templates/test/dev/" for name in $(find "${flavors_dir}"* -maxdepth 0 -type d -print0 | xargs -0 -I {} basename {} | grep -v base); do - ${KUSTOMIZE} build --load-restrictor LoadRestrictionsNone --reorder none "${flavors_dir}${name}" > "${REPO_ROOT}/templates/cluster-template-${name}.yaml" + ${KUSTOMIZE} build --load-restrictor LoadRestrictionsNone "${flavors_dir}${name}" > "${REPO_ROOT}/templates/cluster-template-${name}.yaml" done # move the default template to the default file expected by clusterctl mv "${REPO_ROOT}/templates/cluster-template-default.yaml" "${REPO_ROOT}/templates/cluster-template.yaml" for name in $(find "${ci_dir}"* -maxdepth 0 -type d -print0 | xargs -0 -I {} basename {} | grep -v patches); do - ${KUSTOMIZE} build --load-restrictor LoadRestrictionsNone --reorder none "${ci_dir}${name}" > "${ci_dir}cluster-template-${name}.yaml" + ${KUSTOMIZE} build --load-restrictor LoadRestrictionsNone "${ci_dir}${name}" > "${ci_dir}cluster-template-${name}.yaml" done for name in $(find "${dev_dir}"* -maxdepth 0 -type d -print0 | xargs -0 -I {} basename {} | grep -v patches); do - ${KUSTOMIZE} build --load-restrictor LoadRestrictionsNone --reorder none "${dev_dir}${name}" > "${dev_dir}cluster-template-${name}.yaml" + ${KUSTOMIZE} build --load-restrictor LoadRestrictionsNone "${dev_dir}${name}" > "${dev_dir}cluster-template-${name}.yaml" done diff --git a/hack/observability/kustomization.yaml b/hack/observability/kustomization.yaml index 7a7e7bb700d..11dd9feca6c 100644 --- a/hack/observability/kustomization.yaml +++ b/hack/observability/kustomization.yaml @@ -1,6 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +patches: +- path: opentelemetry/controller-manager-patch.yaml resources: - - ../../config/default - - prometheus - -patchesStrategicMerge: - - opentelemetry/controller-manager-patch.yaml +- ../../config/default +- prometheus diff --git a/templates/addons/azure-cni-v1/kustomization.yaml b/templates/addons/azure-cni-v1/kustomization.yaml index 7bb534b2c2d..718454aee23 100644 --- a/templates/addons/azure-cni-v1/kustomization.yaml +++ b/templates/addons/azure-cni-v1/kustomization.yaml @@ -1,5 +1,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization - resources: - - https://raw.githubusercontent.com/Azure/azure-container-networking/4034aad0d7085f2a9e96cce6d2b50b81ea9ec900/hack/manifests/cni-installer-v1.yaml +- https://raw.githubusercontent.com/Azure/azure-container-networking/4034aad0d7085f2a9e96cce6d2b50b81ea9ec900/hack/manifests/cni-installer-v1.yaml diff --git a/templates/addons/calico-dual-stack/kustomization.yaml b/templates/addons/calico-dual-stack/kustomization.yaml index 544b4031a0f..80ffc941939 100644 --- a/templates/addons/calico-dual-stack/kustomization.yaml +++ b/templates/addons/calico-dual-stack/kustomization.yaml @@ -1,6 +1,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - ../calico-ipv6 -patchesStrategicMerge: - - patches/calico-config.yaml +- ../calico-ipv6 +patches: +- path: patches/calico-config.yaml diff --git a/templates/addons/calico-ipv6/kustomization.yaml b/templates/addons/calico-ipv6/kustomization.yaml index 177eb8e4182..85181c59a89 100644 --- a/templates/addons/calico-ipv6/kustomization.yaml +++ b/templates/addons/calico-ipv6/kustomization.yaml @@ -1,20 +1,19 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - calico-policy-only.yaml -patchesStrategicMerge: - - patches/azure-mtu.yaml - - patches/calico-config.yaml +- calico-policy-only.yaml patches: -- target: +- path: patches/calico-node.yaml + target: group: apps - version: v1 kind: DaemonSet name: calico-node namespace: kube-system - path: patches/calico-node.yaml + version: v1 - path: patches/control-plane-tolerations.yaml target: kind: Deployment name: calico-kube-controllers namespace: kube-system +- path: patches/azure-mtu.yaml +- path: patches/calico-config.yaml diff --git a/templates/addons/calico/kustomization.yaml b/templates/addons/calico/kustomization.yaml index 72a6889b876..cffd8a70912 100644 --- a/templates/addons/calico/kustomization.yaml +++ b/templates/addons/calico/kustomization.yaml @@ -1,9 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - calico-vxlan.yaml -patchesStrategicMerge: - - patches/azure-mtu.yaml +- calico-vxlan.yaml patches: - path: patches/calico-node.yaml target: @@ -13,3 +11,4 @@ patches: kind: Deployment name: calico-kube-controllers namespace: kube-system +- path: patches/azure-mtu.yaml diff --git a/templates/addons/metrics-server/kustomization.yaml b/templates/addons/metrics-server/kustomization.yaml index 42e51ab36ac..3dd479e7615 100644 --- a/templates/addons/metrics-server/kustomization.yaml +++ b/templates/addons/metrics-server/kustomization.yaml @@ -2,14 +2,13 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization namespace: kube-system resources: - - https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.6.3/components.yaml -patchesStrategicMerge: - - patches/control-plane-toleration.yaml +- https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.6.3/components.yaml patches: -- target: +- path: patches/temp-use-insecure-https.yaml + target: group: apps - version: v1 kind: Deployment name: metrics-server namespace: kube-system - path: patches/temp-use-insecure-https.yaml + version: v1 +- path: patches/control-plane-toleration.yaml diff --git a/templates/azure-cluster-identity/kustomization.yaml b/templates/azure-cluster-identity/kustomization.yaml index c383452dcf2..838d840d866 100644 --- a/templates/azure-cluster-identity/kustomization.yaml +++ b/templates/azure-cluster-identity/kustomization.yaml @@ -1,3 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization namespace: default resources: - - azure-cluster-identity.yaml +- azure-cluster-identity.yaml diff --git a/templates/flavors/aad/kustomization.yaml b/templates/flavors/aad/kustomization.yaml index c575fef432e..8425b5b918f 100644 --- a/templates/flavors/aad/kustomization.yaml +++ b/templates/flavors/aad/kustomization.yaml @@ -1,8 +1,12 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../base - - machine-deployment.yaml - - ../../azure-cluster-identity -patchesStrategicMerge: - - patches/kubeadm-controlplane.yaml - - ../../azure-cluster-identity/azurecluster-identity-ref.yaml +- ../base +- machine-deployment.yaml +- ../../azure-cluster-identity +patches: +- path: patches/kubeadm-controlplane.yaml +- path: ../../azure-cluster-identity/azurecluster-identity-ref.yaml diff --git a/templates/flavors/aks-aso-clusterclass/kustomization.yaml b/templates/flavors/aks-aso-clusterclass/kustomization.yaml index df0d82f53db..7e3f421726c 100644 --- a/templates/flavors/aks-aso-clusterclass/kustomization.yaml +++ b/templates/flavors/aks-aso-clusterclass/kustomization.yaml @@ -1,5 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - clusterclass.yaml diff --git a/templates/flavors/aks-aso-topology/kustomization.yaml b/templates/flavors/aks-aso-topology/kustomization.yaml index 7a5648beb9c..93fbdc512c0 100644 --- a/templates/flavors/aks-aso-topology/kustomization.yaml +++ b/templates/flavors/aks-aso-topology/kustomization.yaml @@ -1,5 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - cluster.yaml diff --git a/templates/flavors/aks-aso/kustomization.yaml b/templates/flavors/aks-aso/kustomization.yaml index 16a0a22fe60..0c367236934 100644 --- a/templates/flavors/aks-aso/kustomization.yaml +++ b/templates/flavors/aks-aso/kustomization.yaml @@ -1,5 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - cluster-template.yaml diff --git a/templates/flavors/aks-clusterclass/kustomization.yaml b/templates/flavors/aks-clusterclass/kustomization.yaml index 98083341a84..f1bf572a9b4 100644 --- a/templates/flavors/aks-clusterclass/kustomization.yaml +++ b/templates/flavors/aks-clusterclass/kustomization.yaml @@ -1,5 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - clusterclass.yaml diff --git a/templates/flavors/aks-topology/kustomization.yaml b/templates/flavors/aks-topology/kustomization.yaml index 7a5648beb9c..93fbdc512c0 100644 --- a/templates/flavors/aks-topology/kustomization.yaml +++ b/templates/flavors/aks-topology/kustomization.yaml @@ -1,5 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - cluster.yaml diff --git a/templates/flavors/aks/kustomization.yaml b/templates/flavors/aks/kustomization.yaml index c11bca8e2cf..031a82a188f 100644 --- a/templates/flavors/aks/kustomization.yaml +++ b/templates/flavors/aks/kustomization.yaml @@ -1,8 +1,10 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - cluster-template.yaml - ../../azure-cluster-identity -patchesStrategicMerge: -- ../../azure-cluster-identity/managedazurecluster-identity-ref.yaml +patches: +- path: ../../azure-cluster-identity/managedazurecluster-identity-ref.yaml diff --git a/templates/flavors/azure-bastion/kustomization.yaml b/templates/flavors/azure-bastion/kustomization.yaml index f016f77b353..63b8de30190 100644 --- a/templates/flavors/azure-bastion/kustomization.yaml +++ b/templates/flavors/azure-bastion/kustomization.yaml @@ -1,5 +1,9 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../default -patchesStrategicMerge: - - patches/azure-cluster.yaml +- ../default +patches: +- path: patches/azure-cluster.yaml diff --git a/templates/flavors/azure-cni-v1/kustomization.yaml b/templates/flavors/azure-cni-v1/kustomization.yaml index 4cda54d59d0..1158ef0194b 100644 --- a/templates/flavors/azure-cni-v1/kustomization.yaml +++ b/templates/flavors/azure-cni-v1/kustomization.yaml @@ -1,9 +1,13 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../default -patchesStrategicMerge: - - ../../azure-cluster-identity/azurecluster-identity-ref.yaml - - patches/azure-machine-template-controlplane.yaml - - patches/azure-machine-template.yaml - - patches/kubeadm-control-plane.yaml - - patches/kubeadm-worker-node.yaml +- ../default +patches: +- path: ../../azure-cluster-identity/azurecluster-identity-ref.yaml +- path: patches/azure-machine-template-controlplane.yaml +- path: patches/azure-machine-template.yaml +- path: patches/kubeadm-control-plane.yaml +- path: patches/kubeadm-worker-node.yaml diff --git a/templates/flavors/base/kustomization.yaml b/templates/flavors/base/kustomization.yaml index 5e058e123c0..0c367236934 100644 --- a/templates/flavors/base/kustomization.yaml +++ b/templates/flavors/base/kustomization.yaml @@ -1,5 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - cluster-template.yaml +- cluster-template.yaml diff --git a/templates/flavors/clusterclass/kustomization.yaml b/templates/flavors/clusterclass/kustomization.yaml index 30b4276d555..1dff79cfc51 100644 --- a/templates/flavors/clusterclass/kustomization.yaml +++ b/templates/flavors/clusterclass/kustomization.yaml @@ -1,9 +1,13 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - clusterclass.yaml - - azure-cluster-template.yaml - - azure-machine-template-controlplane.yaml - - azure-machine-template-worker.yaml - - kubeadm-controlplane-template.yaml - - kubeadm-config-template.yaml - - ../../azure-cluster-identity +- clusterclass.yaml +- azure-cluster-template.yaml +- azure-machine-template-controlplane.yaml +- azure-machine-template-worker.yaml +- kubeadm-controlplane-template.yaml +- kubeadm-config-template.yaml +- ../../azure-cluster-identity diff --git a/templates/flavors/default/kustomization.yaml b/templates/flavors/default/kustomization.yaml index 2afb6f7ff4b..a2259d43d93 100644 --- a/templates/flavors/default/kustomization.yaml +++ b/templates/flavors/default/kustomization.yaml @@ -1,8 +1,11 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../base - - machine-deployment.yaml - - ../../azure-cluster-identity - -patchesStrategicMerge: - - ../../azure-cluster-identity/azurecluster-identity-ref.yaml +- ../base +- machine-deployment.yaml +- ../../azure-cluster-identity +patches: +- path: ../../azure-cluster-identity/azurecluster-identity-ref.yaml diff --git a/templates/flavors/dual-stack/kustomization.yaml b/templates/flavors/dual-stack/kustomization.yaml index 9bcb8b2d163..6fcde8a666f 100644 --- a/templates/flavors/dual-stack/kustomization.yaml +++ b/templates/flavors/dual-stack/kustomization.yaml @@ -1,11 +1,14 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../base - - ../../azure-cluster-identity - - machine-deployment.yaml - -patchesStrategicMerge: - - patches/dual-stack.yaml - - patches/kubeadm-controlplane.yaml - - patches/controlplane-azuremachinetemplate.yaml - - ../../azure-cluster-identity/azurecluster-identity-ref.yaml +- ../base +- ../../azure-cluster-identity +- machine-deployment.yaml +patches: +- path: patches/dual-stack.yaml +- path: patches/kubeadm-controlplane.yaml +- path: patches/controlplane-azuremachinetemplate.yaml +- path: ../../azure-cluster-identity/azurecluster-identity-ref.yaml diff --git a/templates/flavors/edgezone/kustomization.yaml b/templates/flavors/edgezone/kustomization.yaml index 89e733b6ee1..48b55a0fbba 100644 --- a/templates/flavors/edgezone/kustomization.yaml +++ b/templates/flavors/edgezone/kustomization.yaml @@ -1,7 +1,10 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../default - -patchesStrategicMerge: - - patches/azure-extendedlocation.yaml - - patches/azure-remove-natgateway.yaml +- ../default +patches: +- path: patches/azure-extendedlocation.yaml +- path: patches/azure-remove-natgateway.yaml diff --git a/templates/flavors/ephemeral/kustomization.yaml b/templates/flavors/ephemeral/kustomization.yaml index 5a7070c57b1..ee63d07a730 100644 --- a/templates/flavors/ephemeral/kustomization.yaml +++ b/templates/flavors/ephemeral/kustomization.yaml @@ -1,17 +1,20 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../default - +- ../default patches: - path: patches/ephemeral.yaml target: group: infrastructure.cluster.x-k8s.io - version: v1beta1 kind: AzureMachineTemplate - name: ".*-md-0" + name: .*-md-0 + version: v1beta1 - path: patches/ephemeral.yaml target: group: infrastructure.cluster.x-k8s.io - version: v1beta1 kind: AzureMachineTemplate - name: ".*-control-plane" + name: .*-control-plane + version: v1beta1 diff --git a/templates/flavors/flatcar/kustomization.yaml b/templates/flavors/flatcar/kustomization.yaml index a78b566b99e..8425b5b918f 100644 --- a/templates/flavors/flatcar/kustomization.yaml +++ b/templates/flavors/flatcar/kustomization.yaml @@ -1,9 +1,12 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../base - - machine-deployment.yaml - - ../../azure-cluster-identity - -patchesStrategicMerge: - - patches/kubeadm-controlplane.yaml - - ../../azure-cluster-identity/azurecluster-identity-ref.yaml +- ../base +- machine-deployment.yaml +- ../../azure-cluster-identity +patches: +- path: patches/kubeadm-controlplane.yaml +- path: ../../azure-cluster-identity/azurecluster-identity-ref.yaml diff --git a/templates/flavors/ipv6/kustomization.yaml b/templates/flavors/ipv6/kustomization.yaml index 2cf1ca67e7a..b83b0b0a96f 100644 --- a/templates/flavors/ipv6/kustomization.yaml +++ b/templates/flavors/ipv6/kustomization.yaml @@ -1,11 +1,14 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../base - - ../../azure-cluster-identity - - machine-deployment.yaml - -patchesStrategicMerge: - - ../../azure-cluster-identity/azurecluster-identity-ref.yaml - - patches/ipv6.yaml - - patches/kubeadm-controlplane.yaml - - patches/controlplane-azuremachinetemplate.yaml +- ../base +- ../../azure-cluster-identity +- machine-deployment.yaml +patches: +- path: ../../azure-cluster-identity/azurecluster-identity-ref.yaml +- path: patches/ipv6.yaml +- path: patches/kubeadm-controlplane.yaml +- path: patches/controlplane-azuremachinetemplate.yaml diff --git a/templates/flavors/machinepool-windows/kustomization.yaml b/templates/flavors/machinepool-windows/kustomization.yaml index 79414abb008..17ffad487e8 100644 --- a/templates/flavors/machinepool-windows/kustomization.yaml +++ b/templates/flavors/machinepool-windows/kustomization.yaml @@ -1,7 +1,10 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../machinepool - - machine-pool-deployment-windows.yaml - -patchesStrategicMerge: - - ../base-windows-containerd/cluster.yaml +- ../machinepool +- machine-pool-deployment-windows.yaml +patches: +- path: ../base-windows-containerd/cluster.yaml diff --git a/templates/flavors/machinepool/kustomization.yaml b/templates/flavors/machinepool/kustomization.yaml index ba038c599d5..8648d6b8205 100644 --- a/templates/flavors/machinepool/kustomization.yaml +++ b/templates/flavors/machinepool/kustomization.yaml @@ -1,8 +1,11 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../base - - machine-pool-deployment.yaml - - ../../azure-cluster-identity - -patchesStrategicMerge: - - ../../azure-cluster-identity/azurecluster-identity-ref.yaml +- ../base +- machine-pool-deployment.yaml +- ../../azure-cluster-identity +patches: +- path: ../../azure-cluster-identity/azurecluster-identity-ref.yaml diff --git a/templates/flavors/nvidia-gpu/kustomization.yaml b/templates/flavors/nvidia-gpu/kustomization.yaml index abb3f3fe0c2..6bd955ac6d7 100644 --- a/templates/flavors/nvidia-gpu/kustomization.yaml +++ b/templates/flavors/nvidia-gpu/kustomization.yaml @@ -1,15 +1,17 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../base - - ../../azure-cluster-identity - - machine-deployment.yaml - -patchesStrategicMerge: - - ../../azure-cluster-identity/azurecluster-identity-ref.yaml - +- ../base +- ../../azure-cluster-identity +- machine-deployment.yaml generatorOptions: + annotations: + note: generated disableNameSuffixHash: true labels: type: generated - annotations: - note: generated +patches: +- path: ../../azure-cluster-identity/azurecluster-identity-ref.yaml diff --git a/templates/flavors/private/kustomization.yaml b/templates/flavors/private/kustomization.yaml index 60660bd25bc..f8315d83866 100644 --- a/templates/flavors/private/kustomization.yaml +++ b/templates/flavors/private/kustomization.yaml @@ -1,12 +1,14 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../base - - ../default/machine-deployment.yaml - - ../../azure-cluster-identity - -patchesStrategicMerge: - - ../../azure-cluster-identity/azurecluster-identity-ref.yaml - - patches/private-lb.yaml - - patches/apiserver-host-dns.yaml - - patches/azure-bastion.yaml - +- ../base +- ../default/machine-deployment.yaml +- ../../azure-cluster-identity +patches: +- path: ../../azure-cluster-identity/azurecluster-identity-ref.yaml +- path: patches/private-lb.yaml +- path: patches/apiserver-host-dns.yaml +- path: patches/azure-bastion.yaml diff --git a/templates/flavors/topology/kustomization.yaml b/templates/flavors/topology/kustomization.yaml index fd7811e1145..93fbdc512c0 100644 --- a/templates/flavors/topology/kustomization.yaml +++ b/templates/flavors/topology/kustomization.yaml @@ -1,3 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +sortOptions: + order: fifo namespace: default resources: -- cluster.yaml \ No newline at end of file +- cluster.yaml diff --git a/templates/flavors/windows/kustomization.yaml b/templates/flavors/windows/kustomization.yaml index a4cb648e3a8..841f79d6271 100644 --- a/templates/flavors/windows/kustomization.yaml +++ b/templates/flavors/windows/kustomization.yaml @@ -1,8 +1,10 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../default - - machine-deployment-windows.yaml - -patchesStrategicMerge: - - ../base-windows-containerd/cluster.yaml - +- ../default +- machine-deployment-windows.yaml +patches: +- path: ../base-windows-containerd/cluster.yaml diff --git a/templates/test/ci/cluster-template-prow-aks-aso.yaml b/templates/test/ci/cluster-template-prow-aks-aso.yaml index 4b87024d55d..286f8d85264 100644 --- a/templates/test/ci/cluster-template-prow-aks-aso.yaml +++ b/templates/test/ci/cluster-template-prow-aks-aso.yaml @@ -13,31 +13,65 @@ spec: kind: AzureASOManagedCluster name: ${CLUSTER_NAME} --- -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 -kind: AzureASOManagedControlPlane +apiVersion: cluster.x-k8s.io/v1beta1 +kind: MachinePool metadata: - name: ${CLUSTER_NAME} + name: ${CLUSTER_NAME}-pool0 namespace: default spec: - resources: - - apiVersion: containerservice.azure.com/v1api20231001 - kind: ManagedCluster - metadata: - annotations: - serviceoperator.azure.com/credential-from: ${ASO_CREDENTIAL_SECRET_NAME} - name: ${CLUSTER_NAME} + clusterName: ${CLUSTER_NAME} + replicas: ${WORKER_MACHINE_COUNT:=2} + template: + metadata: {} spec: - dnsPrefix: ${CLUSTER_NAME} - identity: - type: SystemAssigned - location: ${AZURE_LOCATION} - networkProfile: - networkPlugin: azure - owner: - name: ${CLUSTER_NAME} - servicePrincipalProfile: - clientId: msi - version: ${KUBERNETES_VERSION} + bootstrap: + dataSecretName: "" + clusterName: ${CLUSTER_NAME} + infrastructureRef: + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 + kind: AzureASOManagedMachinePool + name: ${CLUSTER_NAME}-pool0 + version: ${KUBERNETES_VERSION} +--- +apiVersion: cluster.x-k8s.io/v1beta1 +kind: MachinePool +metadata: + name: ${CLUSTER_NAME}-pool1 + namespace: default +spec: + clusterName: ${CLUSTER_NAME} + replicas: ${WORKER_MACHINE_COUNT:=2} + template: + metadata: {} + spec: + bootstrap: + dataSecretName: "" + clusterName: ${CLUSTER_NAME} + infrastructureRef: + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 + kind: AzureASOManagedMachinePool + name: ${CLUSTER_NAME}-pool1 + version: ${KUBERNETES_VERSION} +--- +apiVersion: cluster.x-k8s.io/v1beta1 +kind: MachinePool +metadata: + name: ${CLUSTER_NAME}-pool2 + namespace: default +spec: + clusterName: ${CLUSTER_NAME} + replicas: 1 + template: + metadata: {} + spec: + bootstrap: + dataSecretName: "" + clusterName: ${CLUSTER_NAME} + infrastructureRef: + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 + kind: AzureASOManagedMachinePool + name: ${CLUSTER_NAME}-pool2 + version: ${KUBERNETES_VERSION} --- apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 kind: AzureASOManagedCluster @@ -59,25 +93,31 @@ spec: creationTimestamp: ${TIMESTAMP} jobName: ${JOB_NAME} --- -apiVersion: cluster.x-k8s.io/v1beta1 -kind: MachinePool +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 +kind: AzureASOManagedControlPlane metadata: - name: ${CLUSTER_NAME}-pool0 + name: ${CLUSTER_NAME} namespace: default spec: - clusterName: ${CLUSTER_NAME} - replicas: ${WORKER_MACHINE_COUNT:=2} - template: - metadata: {} + resources: + - apiVersion: containerservice.azure.com/v1api20231001 + kind: ManagedCluster + metadata: + annotations: + serviceoperator.azure.com/credential-from: ${ASO_CREDENTIAL_SECRET_NAME} + name: ${CLUSTER_NAME} spec: - bootstrap: - dataSecretName: "" - clusterName: ${CLUSTER_NAME} - infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 - kind: AzureASOManagedMachinePool - name: ${CLUSTER_NAME}-pool0 - version: ${KUBERNETES_VERSION} + dnsPrefix: ${CLUSTER_NAME} + identity: + type: SystemAssigned + location: ${AZURE_LOCATION} + networkProfile: + networkPlugin: azure + owner: + name: ${CLUSTER_NAME} + servicePrincipalProfile: + clientId: msi + version: ${KUBERNETES_VERSION} --- apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 kind: AzureASOManagedMachinePool @@ -100,26 +140,6 @@ spec: type: VirtualMachineScaleSets vmSize: ${AZURE_AKS_NODE_MACHINE_TYPE:=Standard_D2s_v3} --- -apiVersion: cluster.x-k8s.io/v1beta1 -kind: MachinePool -metadata: - name: ${CLUSTER_NAME}-pool1 - namespace: default -spec: - clusterName: ${CLUSTER_NAME} - replicas: ${WORKER_MACHINE_COUNT:=2} - template: - metadata: {} - spec: - bootstrap: - dataSecretName: "" - clusterName: ${CLUSTER_NAME} - infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 - kind: AzureASOManagedMachinePool - name: ${CLUSTER_NAME}-pool1 - version: ${KUBERNETES_VERSION} ---- apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 kind: AzureASOManagedMachinePool metadata: @@ -141,26 +161,6 @@ spec: type: VirtualMachineScaleSets vmSize: ${AZURE_AKS_NODE_MACHINE_TYPE:=Standard_D2s_v3} --- -apiVersion: cluster.x-k8s.io/v1beta1 -kind: MachinePool -metadata: - name: ${CLUSTER_NAME}-pool2 - namespace: default -spec: - clusterName: ${CLUSTER_NAME} - replicas: 1 - template: - metadata: {} - spec: - bootstrap: - dataSecretName: "" - clusterName: ${CLUSTER_NAME} - infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 - kind: AzureASOManagedMachinePool - name: ${CLUSTER_NAME}-pool2 - version: ${KUBERNETES_VERSION} ---- apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 kind: AzureASOManagedMachinePool metadata: diff --git a/templates/test/ci/prow-aks-clusterclass/kustomization.yaml b/templates/test/ci/prow-aks-clusterclass/kustomization.yaml index 6a5911e30a9..8d8fabdb0ca 100644 --- a/templates/test/ci/prow-aks-clusterclass/kustomization.yaml +++ b/templates/test/ci/prow-aks-clusterclass/kustomization.yaml @@ -1,14 +1,16 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../../../flavors/aks-clusterclass - - ../../../flavors/aks-topology -patchesStrategicMerge: - - patches/tags-aks-clusterclass.yaml - - patches/aks-clusterclass-pool0.yaml - - patches/aks-clusterclass-pool1.yaml - - patches/cluster.yaml - - patches/addons.yaml - - patches/kubeadm-config-template.yaml - - patches.yaml +- ../../../flavors/aks-clusterclass +- ../../../flavors/aks-topology +patches: +- path: patches/tags-aks-clusterclass.yaml +- path: patches/aks-clusterclass-pool0.yaml +- path: patches/aks-clusterclass-pool1.yaml +- path: patches/cluster.yaml +- path: patches/addons.yaml +- path: patches/kubeadm-config-template.yaml +- path: patches.yaml diff --git a/templates/test/ci/prow-aks/kustomization.yaml b/templates/test/ci/prow-aks/kustomization.yaml index d9371b9f65c..526d22323e3 100644 --- a/templates/test/ci/prow-aks/kustomization.yaml +++ b/templates/test/ci/prow-aks/kustomization.yaml @@ -1,11 +1,13 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../../../flavors/aks - - patches/aks-pool2.yaml -patchesStrategicMerge: - - ../patches/tags-aks.yaml - - patches/aks-pool0.yaml - - patches/aks-pool1.yaml - - patches/addons.yaml \ No newline at end of file +- ../../../flavors/aks +- patches/aks-pool2.yaml +patches: +- path: ../patches/tags-aks.yaml +- path: patches/aks-pool0.yaml +- path: patches/aks-pool1.yaml +- path: patches/addons.yaml diff --git a/templates/test/ci/prow-azure-cni-v1/kustomization.yaml b/templates/test/ci/prow-azure-cni-v1/kustomization.yaml index 3d9aae49c58..4d2547344e4 100644 --- a/templates/test/ci/prow-azure-cni-v1/kustomization.yaml +++ b/templates/test/ci/prow-azure-cni-v1/kustomization.yaml @@ -1,12 +1,14 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../../../flavors/azure-cni-v1/ - - ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml - - ../../../addons/cluster-api-helm/cloud-provider-azure.yaml - - ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml -patchesStrategicMerge: - - ../patches/tags.yaml - - ../patches/controller-manager.yaml - - ../patches/cluster-label-cloud-provider-azure.yaml +- ../../../flavors/azure-cni-v1/ +- ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml +- ../../../addons/cluster-api-helm/cloud-provider-azure.yaml +- ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml +patches: +- path: ../patches/tags.yaml +- path: ../patches/controller-manager.yaml +- path: ../patches/cluster-label-cloud-provider-azure.yaml diff --git a/templates/test/ci/prow-ci-version-dual-stack/kustomization.yaml b/templates/test/ci/prow-ci-version-dual-stack/kustomization.yaml index 92e87540b63..e6285671a73 100644 --- a/templates/test/ci/prow-ci-version-dual-stack/kustomization.yaml +++ b/templates/test/ci/prow-ci-version-dual-stack/kustomization.yaml @@ -1,31 +1,32 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../prow-ci-version - - ../../../addons/cluster-api-helm/calico-dual-stack.yaml -patchesStrategicMerge: - - ../../../flavors/dual-stack/patches/dual-stack.yaml - - ../../../flavors/dual-stack/patches/controlplane-azuremachinetemplate.yaml - - ../../../flavors/dual-stack/patches/kubeadm-controlplane.yaml - - ../prow-dual-stack/patches/cluster-label-calico-dual-stack.yaml - - patches/machine-deployment.yaml - - ../patches/windows-addons-disabled.yaml +- ../prow-ci-version +- ../../../addons/cluster-api-helm/calico-dual-stack.yaml patches: - - target: - kind: HelmChartProxy +- patch: | + $patch: delete + apiVersion: addons.cluster.x-k8s.io/v1alpha1 + kind: HelmChartProxy + metadata: name: calico - patch: | - $patch: delete - apiVersion: addons.cluster.x-k8s.io/v1alpha1 - kind: HelmChartProxy - metadata: - name: calico - - target: - name: ".*-win.*" - patch: | - $patch: delete - apiVersion: cluster.x-k8s.io/v1beta1 - kind: MachineDeployment - metadata: - name: win + target: + kind: HelmChartProxy + name: calico +- patch: | + $patch: delete + apiVersion: cluster.x-k8s.io/v1beta1 + kind: MachineDeployment + metadata: + name: win + target: + name: .*-win.* +- path: ../../../flavors/dual-stack/patches/dual-stack.yaml +- path: ../../../flavors/dual-stack/patches/controlplane-azuremachinetemplate.yaml +- path: ../../../flavors/dual-stack/patches/kubeadm-controlplane.yaml +- path: ../prow-dual-stack/patches/cluster-label-calico-dual-stack.yaml +- path: patches/machine-deployment.yaml +- path: ../patches/windows-addons-disabled.yaml diff --git a/templates/test/ci/prow-ci-version-ipv6/kustomization.yaml b/templates/test/ci/prow-ci-version-ipv6/kustomization.yaml index 4d36b3b5dc8..08a6f260caa 100644 --- a/templates/test/ci/prow-ci-version-ipv6/kustomization.yaml +++ b/templates/test/ci/prow-ci-version-ipv6/kustomization.yaml @@ -1,31 +1,32 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../prow-ci-version - - ../../../addons/cluster-api-helm/calico-ipv6.yaml -patchesStrategicMerge: - - ../../../flavors/ipv6/patches/ipv6.yaml - - ../../../flavors/ipv6/patches/controlplane-azuremachinetemplate.yaml - - ../../../flavors/ipv6/patches/kubeadm-controlplane.yaml - - ../prow-ipv6/patches/cluster-label-calico-ipv6.yaml - - patches/machine-deployment.yaml - - ../patches/windows-addons-disabled.yaml +- ../prow-ci-version +- ../../../addons/cluster-api-helm/calico-ipv6.yaml patches: - - target: - kind: HelmChartProxy +- patch: | + $patch: delete + apiVersion: addons.cluster.x-k8s.io/v1alpha1 + kind: HelmChartProxy + metadata: name: calico - patch: | - $patch: delete - apiVersion: addons.cluster.x-k8s.io/v1alpha1 - kind: HelmChartProxy - metadata: - name: calico - - target: - name: ".*-win.*" - patch: | - $patch: delete - apiVersion: cluster.x-k8s.io/v1beta1 - kind: MachineDeployment - metadata: - name: win + target: + kind: HelmChartProxy + name: calico +- patch: | + $patch: delete + apiVersion: cluster.x-k8s.io/v1beta1 + kind: MachineDeployment + metadata: + name: win + target: + name: .*-win.* +- path: ../../../flavors/ipv6/patches/ipv6.yaml +- path: ../../../flavors/ipv6/patches/controlplane-azuremachinetemplate.yaml +- path: ../../../flavors/ipv6/patches/kubeadm-controlplane.yaml +- path: ../prow-ipv6/patches/cluster-label-calico-ipv6.yaml +- path: patches/machine-deployment.yaml +- path: ../patches/windows-addons-disabled.yaml diff --git a/templates/test/ci/prow-ci-version/kustomization.yaml b/templates/test/ci/prow-ci-version/kustomization.yaml index e0121c39ab6..7eb5e168d84 100644 --- a/templates/test/ci/prow-ci-version/kustomization.yaml +++ b/templates/test/ci/prow-ci-version/kustomization.yaml @@ -1,71 +1,72 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../prow - - ../../../addons/metrics-server/metrics-server-resource-set.yaml -patchesStrategicMerge: - - ../patches/control-plane-image-ci-version.yaml - - ../patches/controller-manager.yaml - - ../patches/windows-feature-gates.yaml - - ../patches/windows-containerd-labels.yaml - - ../patches/windows-machine-deployment-replicas.yaml - - patches/machine-deployment-ci-version.yaml - - patches/machine-deployment-ci-version-windows.yaml - - ../patches/metrics-server-enabled-cluster.yaml - - ../patches/controller-manager-featuregates.yaml +- ../prow +- ../../../addons/metrics-server/metrics-server-resource-set.yaml patches: -- target: +- path: patches/oot-credential-provider.yaml + target: group: bootstrap.cluster.x-k8s.io - version: v1beta1 kind: KubeadmConfigTemplate name: .*-md-0 namespace: default - path: patches/oot-credential-provider.yaml -- target: - group: bootstrap.cluster.x-k8s.io version: v1beta1 +- path: patches/oot-credential-provider-win.yaml + target: + group: bootstrap.cluster.x-k8s.io kind: KubeadmConfigTemplate name: .*-md-win namespace: default - path: patches/oot-credential-provider-win.yaml -- target: - group: controlplane.cluster.x-k8s.io version: v1beta1 +- path: patches/oot-credential-provider-kcp.yaml + target: + group: controlplane.cluster.x-k8s.io kind: KubeadmControlPlane name: .*-control-plane - path: patches/oot-credential-provider-kcp.yaml -- target: - group: bootstrap.cluster.x-k8s.io version: v1beta1 +- path: patches/kubeadm-bootstrap.yaml + target: + group: bootstrap.cluster.x-k8s.io kind: KubeadmConfigTemplate name: .*-md-0 namespace: default - path: patches/kubeadm-bootstrap.yaml -- target: - group: bootstrap.cluster.x-k8s.io version: v1beta1 +- path: patches/kubeadm-bootstrap-windows-k8s-ci-binaries.yaml + target: + group: bootstrap.cluster.x-k8s.io kind: KubeadmConfigTemplate name: .*-md-win namespace: default - path: patches/kubeadm-bootstrap-windows-k8s-ci-binaries.yaml -- target: - group: controlplane.cluster.x-k8s.io version: v1beta1 +- path: ../patches/control-plane-kubeadm-boostrap-ci-version.yaml + target: + group: controlplane.cluster.x-k8s.io kind: KubeadmControlPlane name: .*-control-plane - path: ../patches/control-plane-kubeadm-boostrap-ci-version.yaml + version: v1beta1 +- path: ../patches/control-plane-image-ci-version.yaml +- path: ../patches/controller-manager.yaml +- path: ../patches/windows-feature-gates.yaml +- path: ../patches/windows-containerd-labels.yaml +- path: ../patches/windows-machine-deployment-replicas.yaml +- path: patches/machine-deployment-ci-version.yaml +- path: patches/machine-deployment-ci-version-windows.yaml +- path: ../patches/metrics-server-enabled-cluster.yaml +- path: ../patches/controller-manager-featuregates.yaml configMapGenerator: - - name: cni-${CLUSTER_NAME}-calico-windows - behavior: merge - files: - - kube-proxy-patch=../patches/windows-kubeproxy-ci.yaml - - name: metrics-server-${CLUSTER_NAME} - files: - - metrics-server=../../../addons/metrics-server/metrics-server.yaml +- behavior: merge + files: + - kube-proxy-patch=../patches/windows-kubeproxy-ci.yaml + name: cni-${CLUSTER_NAME}-calico-windows +- files: + - metrics-server=../../../addons/metrics-server/metrics-server.yaml + name: metrics-server-${CLUSTER_NAME} generatorOptions: + annotations: + note: generated disableNameSuffixHash: true labels: type: generated - annotations: - note: generated diff --git a/templates/test/ci/prow-clusterclass-ci-default/kustomization.yaml b/templates/test/ci/prow-clusterclass-ci-default/kustomization.yaml index 5212e3d2c37..cefb6232f11 100644 --- a/templates/test/ci/prow-clusterclass-ci-default/kustomization.yaml +++ b/templates/test/ci/prow-clusterclass-ci-default/kustomization.yaml @@ -1,14 +1,16 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../../../flavors/clusterclass/clusterclass.yaml - - ../../../flavors/clusterclass/kubeadm-controlplane-template.yaml - - ../../../flavors/clusterclass/azure-cluster-template.yaml - - ../../../flavors/clusterclass/azure-machine-template-controlplane.yaml - - kubeadm-config-template.yaml - - windows.yaml - - ../../../azure-cluster-identity -patchesStrategicMerge: - - patches.yaml - - variables.yaml +- ../../../flavors/clusterclass/clusterclass.yaml +- ../../../flavors/clusterclass/kubeadm-controlplane-template.yaml +- ../../../flavors/clusterclass/azure-cluster-template.yaml +- ../../../flavors/clusterclass/azure-machine-template-controlplane.yaml +- kubeadm-config-template.yaml +- windows.yaml +- ../../../azure-cluster-identity +patches: +- path: patches.yaml +- path: variables.yaml diff --git a/templates/test/ci/prow-custom-vnet/kustomization.yaml b/templates/test/ci/prow-custom-vnet/kustomization.yaml index c8bcc156593..2a3254626e1 100644 --- a/templates/test/ci/prow-custom-vnet/kustomization.yaml +++ b/templates/test/ci/prow-custom-vnet/kustomization.yaml @@ -1,19 +1,21 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../../../flavors/default - - ../prow/mhc.yaml - - ../../../addons/cluster-api-helm/calico.yaml - - ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml - - ../../../addons/cluster-api-helm/cloud-provider-azure.yaml - - ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml -patchesStrategicMerge: - - ../patches/tags.yaml - - ../patches/mhc.yaml - - ../patches/controller-manager.yaml - - patches/custom-vnet.yaml - - ../patches/uami-md-0.yaml - - ../patches/uami-control-plane.yaml - - ../patches/cluster-label-calico.yaml - - ../patches/cluster-label-cloud-provider-azure.yaml +- ../../../flavors/default +- ../prow/mhc.yaml +- ../../../addons/cluster-api-helm/calico.yaml +- ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml +- ../../../addons/cluster-api-helm/cloud-provider-azure.yaml +- ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml +patches: +- path: ../patches/tags.yaml +- path: ../patches/mhc.yaml +- path: ../patches/controller-manager.yaml +- path: patches/custom-vnet.yaml +- path: ../patches/uami-md-0.yaml +- path: ../patches/uami-control-plane.yaml +- path: ../patches/cluster-label-calico.yaml +- path: ../patches/cluster-label-cloud-provider-azure.yaml diff --git a/templates/test/ci/prow-dual-stack/kustomization.yaml b/templates/test/ci/prow-dual-stack/kustomization.yaml index f2dc50c53ff..0d63e5c4b5c 100644 --- a/templates/test/ci/prow-dual-stack/kustomization.yaml +++ b/templates/test/ci/prow-dual-stack/kustomization.yaml @@ -1,17 +1,19 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../../../flavors/dual-stack - - machine-pool-dualstack.yaml - - ../../../addons/cluster-api-helm/calico-dual-stack.yaml - - ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml - - ../../../addons/cluster-api-helm/cloud-provider-azure.yaml - - ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml -patchesStrategicMerge: - - ../patches/tags.yaml - - ../patches/controller-manager.yaml - - patches/azure-machine-template-control-plane.yaml - - patches/azure-machine-template.yaml - - patches/cluster-label-calico-dual-stack.yaml - - ../patches/cluster-label-cloud-provider-azure.yaml +- ../../../flavors/dual-stack +- machine-pool-dualstack.yaml +- ../../../addons/cluster-api-helm/calico-dual-stack.yaml +- ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml +- ../../../addons/cluster-api-helm/cloud-provider-azure.yaml +- ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml +patches: +- path: ../patches/tags.yaml +- path: ../patches/controller-manager.yaml +- path: patches/azure-machine-template-control-plane.yaml +- path: patches/azure-machine-template.yaml +- path: patches/cluster-label-calico-dual-stack.yaml +- path: ../patches/cluster-label-cloud-provider-azure.yaml diff --git a/templates/test/ci/prow-edgezone/kustomization.yaml b/templates/test/ci/prow-edgezone/kustomization.yaml index 5f98238048b..24c4f12077e 100644 --- a/templates/test/ci/prow-edgezone/kustomization.yaml +++ b/templates/test/ci/prow-edgezone/kustomization.yaml @@ -1,22 +1,23 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../../../flavors/edgezone - - ../../../addons/cluster-api-helm/calico.yaml - - ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml - - ../../../addons/cluster-api-helm/cloud-provider-azure.yaml - - ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml -patchesStrategicMerge: - - ../patches/tags.yaml - - ../patches/controller-manager.yaml - - ../patches/apiserver.yaml - - ../patches/uami-md-0.yaml - - ../patches/uami-control-plane.yaml - - patches/azurecluster-edgezone.yaml - - patches/standardssd-disk.yaml - - patches/machine-type.yaml - - patches/kubernetes-version.yaml - - ../patches/cluster-label-calico.yaml - - ../patches/cluster-label-cloud-provider-azure.yaml - +- ../../../flavors/edgezone +- ../../../addons/cluster-api-helm/calico.yaml +- ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml +- ../../../addons/cluster-api-helm/cloud-provider-azure.yaml +- ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml +patches: +- path: ../patches/tags.yaml +- path: ../patches/controller-manager.yaml +- path: ../patches/apiserver.yaml +- path: ../patches/uami-md-0.yaml +- path: ../patches/uami-control-plane.yaml +- path: patches/azurecluster-edgezone.yaml +- path: patches/standardssd-disk.yaml +- path: patches/machine-type.yaml +- path: patches/kubernetes-version.yaml +- path: ../patches/cluster-label-calico.yaml +- path: ../patches/cluster-label-cloud-provider-azure.yaml diff --git a/templates/test/ci/prow-flatcar/kustomization.yaml b/templates/test/ci/prow-flatcar/kustomization.yaml index 1e6f735a8ca..83369b0df6c 100644 --- a/templates/test/ci/prow-flatcar/kustomization.yaml +++ b/templates/test/ci/prow-flatcar/kustomization.yaml @@ -1,13 +1,15 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../../../flavors/flatcar/ - - ../../../addons/cluster-api-helm/calico.yaml - - ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml - - ../../../addons/cluster-api-helm/cloud-provider-azure-flatcar.yaml -patchesStrategicMerge: - - ../patches/tags.yaml - - ../patches/controller-manager.yaml - - ../patches/cluster-label-calico.yaml - - ../patches/cluster-label-cloud-provider-azure-flatcar.yaml +- ../../../flavors/flatcar/ +- ../../../addons/cluster-api-helm/calico.yaml +- ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml +- ../../../addons/cluster-api-helm/cloud-provider-azure-flatcar.yaml +patches: +- path: ../patches/tags.yaml +- path: ../patches/controller-manager.yaml +- path: ../patches/cluster-label-calico.yaml +- path: ../patches/cluster-label-cloud-provider-azure-flatcar.yaml diff --git a/templates/test/ci/prow-ipv6/kustomization.yaml b/templates/test/ci/prow-ipv6/kustomization.yaml index 41c86f27d8b..b8fd5d00c6f 100644 --- a/templates/test/ci/prow-ipv6/kustomization.yaml +++ b/templates/test/ci/prow-ipv6/kustomization.yaml @@ -1,15 +1,17 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../../../flavors/ipv6 - - machine-pool-ipv6.yaml - - ../../../addons/cluster-api-helm/calico-ipv6.yaml - - ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml - - ../../../addons/cluster-api-helm/cloud-provider-azure.yaml - - ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml -patchesStrategicMerge: - - ../patches/tags.yaml - - ../patches/controller-manager.yaml - - patches/cluster-label-calico-ipv6.yaml - - ../patches/cluster-label-cloud-provider-azure.yaml +- ../../../flavors/ipv6 +- machine-pool-ipv6.yaml +- ../../../addons/cluster-api-helm/calico-ipv6.yaml +- ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml +- ../../../addons/cluster-api-helm/cloud-provider-azure.yaml +- ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml +patches: +- path: ../patches/tags.yaml +- path: ../patches/controller-manager.yaml +- path: patches/cluster-label-calico-ipv6.yaml +- path: ../patches/cluster-label-cloud-provider-azure.yaml diff --git a/templates/test/ci/prow-machine-pool-ci-version/kustomization.yaml b/templates/test/ci/prow-machine-pool-ci-version/kustomization.yaml index 64190027e68..73c7cb85615 100644 --- a/templates/test/ci/prow-machine-pool-ci-version/kustomization.yaml +++ b/templates/test/ci/prow-machine-pool-ci-version/kustomization.yaml @@ -1,37 +1,38 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../prow-machine-pool -patchesStrategicMerge: - - ../patches/control-plane-image-ci-version.yaml - - ../patches/controller-manager.yaml - - patches/machine-pool-ci-version.yaml - - ../patches/machine-pool-worker-counts.yaml - - patches/machine-pool-ci-version-windows.yaml +- ../prow-machine-pool patches: -- target: +- path: ../prow-ci-version/patches/oot-credential-provider-kcp.yaml + target: group: controlplane.cluster.x-k8s.io - version: v1beta1 kind: KubeadmControlPlane name: .*-control-plane - path: ../prow-ci-version/patches/oot-credential-provider-kcp.yaml -- target: - group: controlplane.cluster.x-k8s.io version: v1beta1 +- path: ../patches/control-plane-kubeadm-boostrap-ci-version.yaml + target: + group: controlplane.cluster.x-k8s.io kind: KubeadmControlPlane name: .*-control-plane namespace: default - path: ../patches/control-plane-kubeadm-boostrap-ci-version.yaml -- target: - group: bootstrap.cluster.x-k8s.io version: v1beta1 +- path: patches/kubeadm-bootstrap-windows-k8s-ci-binaries.yaml + target: + group: bootstrap.cluster.x-k8s.io kind: KubeadmConfig name: .*-mp-win namespace: default - path: patches/kubeadm-bootstrap-windows-k8s-ci-binaries.yaml + version: v1beta1 +- path: ../patches/control-plane-image-ci-version.yaml +- path: ../patches/controller-manager.yaml +- path: patches/machine-pool-ci-version.yaml +- path: ../patches/machine-pool-worker-counts.yaml +- path: patches/machine-pool-ci-version-windows.yaml configMapGenerator: - - name: cni-${CLUSTER_NAME}-calico-windows - behavior: merge - files: - - kube-proxy-patch=../patches/windows-kubeproxy-ci.yaml \ No newline at end of file +- behavior: merge + files: + - kube-proxy-patch=../patches/windows-kubeproxy-ci.yaml + name: cni-${CLUSTER_NAME}-calico-windows diff --git a/templates/test/ci/prow-machine-pool-flex/kustomization.yaml b/templates/test/ci/prow-machine-pool-flex/kustomization.yaml index 7a153b20c45..3337ba9fae5 100644 --- a/templates/test/ci/prow-machine-pool-flex/kustomization.yaml +++ b/templates/test/ci/prow-machine-pool-flex/kustomization.yaml @@ -1,7 +1,9 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../prow-machine-pool -patchesStrategicMerge: - - patches/vmss-flex.yaml \ No newline at end of file +- ../prow-machine-pool +patches: +- path: patches/vmss-flex.yaml diff --git a/templates/test/ci/prow-machine-pool/kustomization.yaml b/templates/test/ci/prow-machine-pool/kustomization.yaml index 4a9689db6c7..8dab1d642fb 100644 --- a/templates/test/ci/prow-machine-pool/kustomization.yaml +++ b/templates/test/ci/prow-machine-pool/kustomization.yaml @@ -1,37 +1,39 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../../../flavors/machinepool-windows - - ../prow/cni-resource-set.yaml - - ../../../addons/windows/csi-proxy/csi-proxy-resource-set.yaml - - ../../../addons/windows/containerd-logging/containerd-logger-resource-set.yaml - - ../../../addons/cluster-api-helm/calico.yaml - - ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml - - ../../../addons/cluster-api-helm/cloud-provider-azure.yaml - - ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml -patchesStrategicMerge: - - ../patches/azuremachinepool-vmextension.yaml - - ../patches/tags.yaml - - ../patches/controller-manager.yaml - - ../patches/machine-pool-worker-counts.yaml - - ../patches/windows-containerd-labels.yaml - - ../patches/cluster-label-calico.yaml - - ../patches/cluster-label-cloud-provider-azure.yaml +- ../../../flavors/machinepool-windows +- ../prow/cni-resource-set.yaml +- ../../../addons/windows/csi-proxy/csi-proxy-resource-set.yaml +- ../../../addons/windows/containerd-logging/containerd-logger-resource-set.yaml +- ../../../addons/cluster-api-helm/calico.yaml +- ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml +- ../../../addons/cluster-api-helm/cloud-provider-azure.yaml +- ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml configMapGenerator: - - name: cni-${CLUSTER_NAME}-calico-windows - files: - - windows-cni=../../../addons/windows/calico/calico.yaml - - proxy=../../../addons/windows/calico/kube-proxy-windows.yaml - - name: csi-proxy-addon - files: - - csi-proxy=../../../addons/windows/csi-proxy/csi-proxy.yaml - - name: containerd-logger-${CLUSTER_NAME} - files: - - containerd-windows-logger=../../../addons/windows/containerd-logging/containerd-logger.yaml +- files: + - windows-cni=../../../addons/windows/calico/calico.yaml + - proxy=../../../addons/windows/calico/kube-proxy-windows.yaml + name: cni-${CLUSTER_NAME}-calico-windows +- files: + - csi-proxy=../../../addons/windows/csi-proxy/csi-proxy.yaml + name: csi-proxy-addon +- files: + - containerd-windows-logger=../../../addons/windows/containerd-logging/containerd-logger.yaml + name: containerd-logger-${CLUSTER_NAME} generatorOptions: + annotations: + note: generated disableNameSuffixHash: true labels: type: generated - annotations: - note: generated +patches: +- path: ../patches/azuremachinepool-vmextension.yaml +- path: ../patches/tags.yaml +- path: ../patches/controller-manager.yaml +- path: ../patches/machine-pool-worker-counts.yaml +- path: ../patches/windows-containerd-labels.yaml +- path: ../patches/cluster-label-calico.yaml +- path: ../patches/cluster-label-cloud-provider-azure.yaml diff --git a/templates/test/ci/prow-nvidia-gpu/kustomization.yaml b/templates/test/ci/prow-nvidia-gpu/kustomization.yaml index 863832e74b7..4d1d3e9ee34 100644 --- a/templates/test/ci/prow-nvidia-gpu/kustomization.yaml +++ b/templates/test/ci/prow-nvidia-gpu/kustomization.yaml @@ -1,22 +1,23 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../../../flavors/nvidia-gpu - - ../../../addons/cluster-api-helm/calico.yaml - - ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml - - ../../../addons/cluster-api-helm/cloud-provider-azure.yaml - - ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml -patchesStrategicMerge: - - ../patches/tags.yaml - - ../patches/controller-manager.yaml - - ../patches/azurecluster-gpu.yaml - - ../patches/cluster-label-calico.yaml - - ../patches/cluster-label-cloud-provider-azure.yaml +- ../../../flavors/nvidia-gpu +- ../../../addons/cluster-api-helm/calico.yaml +- ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml +- ../../../addons/cluster-api-helm/cloud-provider-azure.yaml +- ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml patches: - path: patches/node-storage-type.yaml target: group: infrastructure.cluster.x-k8s.io - version: v1beta1 kind: AzureMachineTemplate - name: ".*-md-0" + name: .*-md-0 + version: v1beta1 +- path: ../patches/tags.yaml +- path: ../patches/controller-manager.yaml +- path: ../patches/azurecluster-gpu.yaml +- path: ../patches/cluster-label-calico.yaml +- path: ../patches/cluster-label-cloud-provider-azure.yaml diff --git a/templates/test/ci/prow-private/kustomization.yaml b/templates/test/ci/prow-private/kustomization.yaml index 0c5aa788163..9e7423fd5ed 100644 --- a/templates/test/ci/prow-private/kustomization.yaml +++ b/templates/test/ci/prow-private/kustomization.yaml @@ -1,33 +1,34 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../../../flavors/private - - cni-resource-set.yaml - - ../../../addons/cluster-api-helm/calico.yaml - - ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml - - ../../../addons/cluster-api-helm/cloud-provider-azure.yaml - - ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml -patchesStrategicMerge: - - ../patches/tags.yaml - - ../patches/controller-manager.yaml - - patches/bastion.yaml - - patches/vnet-peerings.yaml - - ../patches/uami-md-0.yaml - - ../patches/uami-control-plane.yaml - - ../patches/cluster-label-calico.yaml - - ../patches/cluster-label-cloud-provider-azure.yaml +- ../../../flavors/private +- cni-resource-set.yaml +- ../../../addons/cluster-api-helm/calico.yaml +- ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml +- ../../../addons/cluster-api-helm/cloud-provider-azure.yaml +- ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml patches: - - path: patches/user-assigned.yaml - target: - kind: AzureClusterIdentity +- path: patches/user-assigned.yaml + target: + kind: AzureClusterIdentity +- path: ../patches/tags.yaml +- path: ../patches/controller-manager.yaml +- path: patches/bastion.yaml +- path: patches/vnet-peerings.yaml +- path: ../patches/uami-md-0.yaml +- path: ../patches/uami-control-plane.yaml +- path: ../patches/cluster-label-calico.yaml +- path: ../patches/cluster-label-cloud-provider-azure.yaml configMapGenerator: - - name: cni-${CLUSTER_NAME}-calico - files: - - resources=../../../addons/calico.yaml +- files: + - resources=../../../addons/calico.yaml + name: cni-${CLUSTER_NAME}-calico generatorOptions: + annotations: + note: generated disableNameSuffixHash: true labels: type: generated - annotations: - note: generated diff --git a/templates/test/ci/prow-spot/kustomization.yaml b/templates/test/ci/prow-spot/kustomization.yaml index 0b03524945c..7f070371c74 100644 --- a/templates/test/ci/prow-spot/kustomization.yaml +++ b/templates/test/ci/prow-spot/kustomization.yaml @@ -1,19 +1,21 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../../../flavors/default - - ../prow/mhc.yaml - - ../../../addons/cluster-api-helm/calico.yaml - - ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml - - ../../../addons/cluster-api-helm/cloud-provider-azure.yaml - - ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml -patchesStrategicMerge: - - ../patches/tags.yaml - - ../patches/mhc.yaml - - ../patches/controller-manager.yaml - - patches/spot-vm-options.yaml - - ../patches/uami-md-0.yaml - - ../patches/uami-control-plane.yaml - - ../patches/cluster-label-calico.yaml - - ../patches/cluster-label-cloud-provider-azure.yaml +- ../../../flavors/default +- ../prow/mhc.yaml +- ../../../addons/cluster-api-helm/calico.yaml +- ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml +- ../../../addons/cluster-api-helm/cloud-provider-azure.yaml +- ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml +patches: +- path: ../patches/tags.yaml +- path: ../patches/mhc.yaml +- path: ../patches/controller-manager.yaml +- path: patches/spot-vm-options.yaml +- path: ../patches/uami-md-0.yaml +- path: ../patches/uami-control-plane.yaml +- path: ../patches/cluster-label-calico.yaml +- path: ../patches/cluster-label-cloud-provider-azure.yaml diff --git a/templates/test/ci/prow-topology/kustomization.yaml b/templates/test/ci/prow-topology/kustomization.yaml index 7b684347cce..d3ebfbe8531 100644 --- a/templates/test/ci/prow-topology/kustomization.yaml +++ b/templates/test/ci/prow-topology/kustomization.yaml @@ -1,30 +1,32 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../../../flavors/topology/cluster.yaml - - cni-resource-set.yaml - - ../../../addons/windows/csi-proxy/csi-proxy-resource-set.yaml - - ../../../addons/cluster-api-helm/calico.yaml - - ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml - - ../../../addons/cluster-api-helm/cloud-provider-azure.yaml - - ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml -patchesStrategicMerge: - - ../patches/windows-containerd-labels.yaml - - cluster.yaml - - ../patches/cluster-label-calico.yaml - - ../patches/cluster-label-cloud-provider-azure.yaml +- ../../../flavors/topology/cluster.yaml +- cni-resource-set.yaml +- ../../../addons/windows/csi-proxy/csi-proxy-resource-set.yaml +- ../../../addons/cluster-api-helm/calico.yaml +- ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml +- ../../../addons/cluster-api-helm/cloud-provider-azure.yaml +- ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml configMapGenerator: - - name: cni-${CLUSTER_NAME}-calico-windows - files: - - windows-cni=../../../addons/windows/calico/calico.yaml - - proxy=../../../addons/windows/calico/kube-proxy-windows.yaml - - name: csi-proxy-addon - files: - - csi-proxy=../../../addons/windows/csi-proxy/csi-proxy.yaml +- files: + - windows-cni=../../../addons/windows/calico/calico.yaml + - proxy=../../../addons/windows/calico/kube-proxy-windows.yaml + name: cni-${CLUSTER_NAME}-calico-windows +- files: + - csi-proxy=../../../addons/windows/csi-proxy/csi-proxy.yaml + name: csi-proxy-addon generatorOptions: + annotations: + note: generated disableNameSuffixHash: true labels: type: generated - annotations: - note: generated +patches: +- path: ../patches/windows-containerd-labels.yaml +- path: cluster.yaml +- path: ../patches/cluster-label-calico.yaml +- path: ../patches/cluster-label-cloud-provider-azure.yaml diff --git a/templates/test/ci/prow-workload-identity/kustomization.yaml b/templates/test/ci/prow-workload-identity/kustomization.yaml index f50d45ae608..ea3659361ec 100644 --- a/templates/test/ci/prow-workload-identity/kustomization.yaml +++ b/templates/test/ci/prow-workload-identity/kustomization.yaml @@ -1,19 +1,20 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../../../flavors/default - - ../../../addons/cluster-api-helm/calico.yaml - - ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml - - ../../../addons/cluster-api-helm/cloud-provider-azure.yaml - - ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml -patchesStrategicMerge: - - ../patches/azureclusteridentity-azwi.yaml - - ../patches/tags.yaml - - ../patches/controller-manager.yaml - - ../patches/apiserver.yaml - - ../patches/uami-md-0.yaml - - ../patches/uami-control-plane.yaml - - ../patches/cluster-label-calico.yaml - - ../patches/cluster-label-cloud-provider-azure.yaml - +- ../../../flavors/default +- ../../../addons/cluster-api-helm/calico.yaml +- ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml +- ../../../addons/cluster-api-helm/cloud-provider-azure.yaml +- ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml +patches: +- path: ../patches/azureclusteridentity-azwi.yaml +- path: ../patches/tags.yaml +- path: ../patches/controller-manager.yaml +- path: ../patches/apiserver.yaml +- path: ../patches/uami-md-0.yaml +- path: ../patches/uami-control-plane.yaml +- path: ../patches/cluster-label-calico.yaml +- path: ../patches/cluster-label-cloud-provider-azure.yaml diff --git a/templates/test/ci/prow/kustomization.yaml b/templates/test/ci/prow/kustomization.yaml index 6e71910bb01..58887c9f55d 100644 --- a/templates/test/ci/prow/kustomization.yaml +++ b/templates/test/ci/prow/kustomization.yaml @@ -1,67 +1,68 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../../../flavors/base - - ../../../flavors/default/machine-deployment.yaml - - ../../../flavors/windows/machine-deployment-windows.yaml - - mhc.yaml - - cni-resource-set.yaml - - ../../../azure-cluster-identity - - ../../../addons/windows/csi-proxy/csi-proxy-resource-set.yaml - - ../../../addons/windows/containerd-logging/containerd-logger-resource-set.yaml - - ../../../addons/cluster-api-helm/calico.yaml - - ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml - - ../../../addons/cluster-api-helm/cloud-provider-azure.yaml - - ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml -patchesStrategicMerge: - - ../patches/tags.yaml - - ../patches/mhc.yaml - - ../patches/controller-manager.yaml - - ../patches/windows-machine-deployment-replicas.yaml - - ../../../azure-cluster-identity/azurecluster-identity-ref.yaml - - ../patches/azuremachinetemplate-vmextension.yaml - - ../patches/windows-feature-gates.yaml - - ../patches/windows-containerd-labels.yaml - - ../patches/windows-server-version.yaml - - ../patches/cluster-label-calico.yaml - - ../patches/cluster-label-cloud-provider-azure.yaml +- ../../../flavors/base +- ../../../flavors/default/machine-deployment.yaml +- ../../../flavors/windows/machine-deployment-windows.yaml +- mhc.yaml +- cni-resource-set.yaml +- ../../../azure-cluster-identity +- ../../../addons/windows/csi-proxy/csi-proxy-resource-set.yaml +- ../../../addons/windows/containerd-logging/containerd-logger-resource-set.yaml +- ../../../addons/cluster-api-helm/calico.yaml +- ../../../addons/cluster-api-helm/azuredisk-csi-driver.yaml +- ../../../addons/cluster-api-helm/cloud-provider-azure.yaml +- ../../../addons/cluster-api-helm/cloud-provider-azure-ci.yaml patches: -- target: +- path: ../patches/windows-tmp-folder.yaml + target: group: bootstrap.cluster.x-k8s.io - version: v1beta1 kind: KubeadmConfigTemplate name: .*-md-win namespace: default - path: ../patches/windows-tmp-folder.yaml -- target: - group: bootstrap.cluster.x-k8s.io version: v1beta1 +- path: ../patches/kubeadm-bootstrap-windows-containerd.yaml + target: + group: bootstrap.cluster.x-k8s.io kind: KubeadmConfigTemplate name: .*-md-win namespace: default - path: ../patches/kubeadm-bootstrap-windows-containerd.yaml -- target: - group: bootstrap.cluster.x-k8s.io version: v1beta1 +- path: ../patches/windows-collect-hns-crashes.yaml + target: + group: bootstrap.cluster.x-k8s.io kind: KubeadmConfigTemplate name: .*-md-win namespace: default - path: ../patches/windows-collect-hns-crashes.yaml + version: v1beta1 +- path: ../patches/tags.yaml +- path: ../patches/mhc.yaml +- path: ../patches/controller-manager.yaml +- path: ../patches/windows-machine-deployment-replicas.yaml +- path: ../../../azure-cluster-identity/azurecluster-identity-ref.yaml +- path: ../patches/azuremachinetemplate-vmextension.yaml +- path: ../patches/windows-feature-gates.yaml +- path: ../patches/windows-containerd-labels.yaml +- path: ../patches/windows-server-version.yaml +- path: ../patches/cluster-label-calico.yaml +- path: ../patches/cluster-label-cloud-provider-azure.yaml configMapGenerator: - - name: cni-${CLUSTER_NAME}-calico-windows - files: - - windows-cni=../../../addons/windows/calico/calico.yaml - - proxy=../../../addons/windows/calico/kube-proxy-windows.yaml - - name: csi-proxy-addon - files: - - csi-proxy=../../../addons/windows/csi-proxy/csi-proxy.yaml - - name: containerd-logger-${CLUSTER_NAME} - files: - - containerd-windows-logger=../../../addons/windows/containerd-logging/containerd-logger.yaml +- files: + - windows-cni=../../../addons/windows/calico/calico.yaml + - proxy=../../../addons/windows/calico/kube-proxy-windows.yaml + name: cni-${CLUSTER_NAME}-calico-windows +- files: + - csi-proxy=../../../addons/windows/csi-proxy/csi-proxy.yaml + name: csi-proxy-addon +- files: + - containerd-windows-logger=../../../addons/windows/containerd-logging/containerd-logger.yaml + name: containerd-logger-${CLUSTER_NAME} generatorOptions: + annotations: + note: generated disableNameSuffixHash: true labels: type: generated - annotations: - note: generated diff --git a/templates/test/dev/cluster-template-custom-builds-machine-pool.yaml b/templates/test/dev/cluster-template-custom-builds-machine-pool.yaml index db8f02988d2..b4e17085da5 100644 --- a/templates/test/dev/cluster-template-custom-builds-machine-pool.yaml +++ b/templates/test/dev/cluster-template-custom-builds-machine-pool.yaml @@ -1,288 +1,498 @@ -apiVersion: cluster.x-k8s.io/v1beta1 -kind: Cluster +apiVersion: v1 +data: + kube-proxy-patch: |- + apiVersion: v1 + kind: ConfigMap + metadata: + name: windows-kubeproxy-ci + namespace: kube-system + data: + KUBEPROXY_PATH: "c:/k/kube-proxy.exe" + proxy: | + apiVersion: apps/v1 + kind: DaemonSet + metadata: + labels: + k8s-app: kube-proxy + name: kube-proxy-windows + namespace: kube-system + spec: + selector: + matchLabels: + k8s-app: kube-proxy-windows + template: + metadata: + labels: + k8s-app: kube-proxy-windows + spec: + serviceAccountName: kube-proxy + securityContext: + windowsOptions: + hostProcess: true + runAsUserName: "NT AUTHORITY\\system" + hostNetwork: true + containers: + - image: sigwindowstools/kube-proxy:${KUBERNETES_VERSION/+/_}-calico-hostprocess + args: ["$env:CONTAINER_SANDBOX_MOUNT_POINT/kube-proxy/start.ps1"] + workingDir: "$env:CONTAINER_SANDBOX_MOUNT_POINT/kube-proxy/" + name: kube-proxy + env: + - name: NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + - name: KUBEPROXY_PATH + valueFrom: + configMapKeyRef: + name: windows-kubeproxy-ci + key: KUBEPROXY_PATH + optional: true + volumeMounts: + - mountPath: /var/lib/kube-proxy + name: kube-proxy + nodeSelector: + kubernetes.io/os: windows + tolerations: + - key: CriticalAddonsOnly + operator: Exists + - operator: Exists + volumes: + - configMap: + name: kube-proxy + name: kube-proxy + updateStrategy: + type: RollingUpdate + windows-cni: "# strictAffinity required for windows\napiVersion: crd.projectcalico.org/v1\nkind: + IPAMConfig\nmetadata:\n name: default\nspec:\n autoAllocateBlocks: true\n strictAffinity: + true\n---\nkind: ConfigMap\napiVersion: v1\nmetadata:\n name: calico-static-rules\n + \ namespace: calico-system\n labels:\n tier: node\n app: calico\ndata:\n + \ static-rules.json: |\n {\n \"Provider\": \"azure\",\n \"Version\": + \"0.1\",\n \"Rules\": [\n {\n \"Name\": \"EndpointPolicy\",\n + \ \"Rule\": {\n \"Id\": \"wireserver\",\n \"Type\": + \"ACL\",\n \"Protocol\": 6,\n \"Action\": \"Block\",\n + \ \"Direction\": \"Out\",\n \"RemoteAddresses\": \"168.63.129.16/32\",\n + \ \"RemotePorts\": \"80\",\n \"Priority\": 200,\n \"RuleType\": + \"Switch\"\n }\n }\n ]\n } \n---\nkind: ConfigMap\napiVersion: + v1\nmetadata:\n name: calico-config-windows\n namespace: calico-system\n labels:\n + \ tier: node\n app: calico\ndata:\n veth_mtu: \"1350\"\n \n cni_network_config: + |\n {\n \"name\": \"Calico\",\n \"cniVersion\": \"0.3.1\",\n \"plugins\": + [\n {\n \"windows_use_single_network\": true,\n \"type\": + \"calico\",\n \"mode\": \"vxlan\",\n \"nodename\": \"__KUBERNETES_NODE_NAME__\",\n + \ \"nodename_file_optional\": true,\n \"log_file_path\": \"c:/cni.log\",\n + \ \"log_level\": \"debug\",\n\n \"vxlan_mac_prefix\": \"0E-2A\",\n + \ \"vxlan_vni\": 4096,\n \"mtu\": __CNI_MTU__,\n \"policy\": + {\n \"type\": \"k8s\"\n },\n\n \"log_level\": \"info\",\n\n + \ \"capabilities\": {\"dns\": true},\n \"DNS\": {\n \"Search\": + \ [\n \"svc.cluster.local\"\n ]\n },\n\n \"datastore_type\": + \"kubernetes\",\n\n \"kubernetes\": {\n \"kubeconfig\": \"__KUBECONFIG_FILEPATH__\"\n + \ },\n\n \"ipam\": {\n \"type\": \"calico-ipam\",\n + \ \"subnet\": \"usePodCidr\"\n },\n\n \"policies\": + \ [\n {\n \"Name\": \"EndpointPolicy\",\n \"Value\": + \ {\n \"Type\": \"OutBoundNAT\",\n \"ExceptionList\": + \ [\n \"__K8S_SERVICE_CIDR__\"\n ]\n }\n + \ },\n {\n \"Name\": \"EndpointPolicy\",\n + \ \"Value\": {\n \"Type\": \"SDNROUTE\",\n \"DestinationPrefix\": + \ \"__K8S_SERVICE_CIDR__\",\n \"NeedEncap\": true\n }\n + \ }\n ]\n }\n ]\n\n }\n---\napiVersion: apps/v1\nkind: + DaemonSet\nmetadata:\n name: calico-node-windows\n labels:\n tier: node\n + \ app: calico\n namespace: calico-system\nspec:\n selector:\n matchLabels:\n + \ app: calico\n template:\n metadata:\n labels:\n tier: node\n + \ app: calico\n spec:\n affinity:\n nodeAffinity:\n requiredDuringSchedulingIgnoredDuringExecution:\n + \ nodeSelectorTerms:\n - matchExpressions:\n - + key: kubernetes.io/os\n operator: In\n values:\n + \ - windows\n - key: kubernetes.io/arch\n + \ operator: In\n values:\n - + amd64\n securityContext:\n windowsOptions:\n hostProcess: + true\n runAsUserName: \"NT AUTHORITY\\\\system\"\n hostNetwork: + true\n serviceAccountName: calico-node\n tolerations:\n - operator: + Exists\n effect: NoSchedule\n # Mark the pod as a critical add-on + for rescheduling.\n - key: CriticalAddonsOnly\n operator: Exists\n + \ - effect: NoExecute\n operator: Exists\n initContainers:\n # + This container installs the CNI binaries\n # and CNI network config file + on each node.\n - name: install-cni\n image: sigwindowstools/calico-install:v3.26.1-hostprocess\n + \ args: [\"$env:CONTAINER_SANDBOX_MOUNT_POINT/calico/install.ps1\"]\n + \ imagePullPolicy: Always\n env:\n # Name of the CNI + config file to create.\n - name: CNI_CONF_NAME\n value: + \"10-calico.conflist\"\n # The CNI network config to install on each + node.\n - name: CNI_NETWORK_CONFIG\n valueFrom:\n configMapKeyRef:\n + \ name: calico-config-windows\n key: cni_network_config\n + \ # Set the hostname based on the k8s node name.\n - name: + KUBERNETES_NODE_NAME\n valueFrom:\n fieldRef:\n fieldPath: + spec.nodeName\n # CNI MTU Config variable\n - name: CNI_MTU\n + \ valueFrom:\n configMapKeyRef:\n name: + calico-config-windows\n key: veth_mtu\n # Prevents + the container from sleeping forever.\n - name: SLEEP\n value: + \"false\"\n - name: K8S_SERVICE_CIDR\n value: \"10.96.0.0/12\"\n + \ volumeMounts:\n - mountPath: /host/opt/cni/bin\n name: + cni-bin-dir\n - mountPath: /host/etc/cni/net.d\n name: + cni-net-dir\n - name: kubeadm-config\n mountPath: /etc/kubeadm-config/\n + \ securityContext:\n windowsOptions:\n hostProcess: + true\n runAsUserName: \"NT AUTHORITY\\\\system\"\n containers:\n + \ - name: calico-node-startup\n image: sigwindowstools/calico-node:v3.26.1-hostprocess\n + \ args: [\"$env:CONTAINER_SANDBOX_MOUNT_POINT/calico/node-service.ps1\"]\n + \ workingDir: \"$env:CONTAINER_SANDBOX_MOUNT_POINT/calico/\"\n imagePullPolicy: + Always\n volumeMounts:\n - name: calico-config-windows\n mountPath: + /etc/kube-calico-windows/\n env:\n - name: POD_NAME\n valueFrom:\n + \ fieldRef:\n apiVersion: v1\n fieldPath: + metadata.name\n - name: POD_NAMESPACE\n valueFrom:\n fieldRef:\n + \ apiVersion: v1\n fieldPath: metadata.namespace\n - + name: CNI_IPAM_TYPE\n value: \"calico-ipam\"\n - name: CALICO_NETWORKING_BACKEND\n + \ value: \"vxlan\"\n - name: KUBECONFIG\n value: \"C:/etc/cni/net.d/calico-kubeconfig\"\n + \ - name: VXLAN_VNI\n value: \"4096\"\n - name: calico-node-felix\n + \ image: sigwindowstools/calico-node:v3.26.1-hostprocess\n args: + [\"$env:CONTAINER_SANDBOX_MOUNT_POINT/calico/felix-service.ps1\"]\n imagePullPolicy: + Always\n workingDir: \"$env:CONTAINER_SANDBOX_MOUNT_POINT/calico/\"\n volumeMounts:\n + \ - name: calico-config-windows\n mountPath: /etc/kube-calico-windows/\n + \ - name: calico-static-rules\n mountPath: /calico/static-rules.json\n + \ subPath: static-rules.json\n env:\n - name: POD_NAME\n + \ valueFrom:\n fieldRef:\n apiVersion: v1\n fieldPath: + metadata.name\n - name: POD_NAMESPACE\n valueFrom:\n fieldRef:\n + \ apiVersion: v1\n fieldPath: metadata.namespace\n - + name: VXLAN_VNI\n value: \"4096\"\n - name: KUBECONFIG\n value: + \"C:/etc/cni/net.d/calico-kubeconfig\"\n volumes:\n - name: calico-config-windows\n + \ configMap:\n name: calico-config-windows\n - name: calico-static-rules\n + \ configMap:\n name: calico-static-rules\n # Used to install + CNI.\n - name: cni-bin-dir\n hostPath:\n path: /opt/cni/bin\n + \ - name: cni-net-dir\n hostPath:\n path: /etc/cni/net.d\n + \ - name: kubeadm-config\n configMap:\n name: kubeadm-config\n---\napiVersion: + apiextensions.k8s.io/v1\nkind: CustomResourceDefinition\nmetadata:\n name: ipamconfigs.crd.projectcalico.org\nspec:\n + \ group: crd.projectcalico.org\n names:\n kind: IPAMConfig\n listKind: + IPAMConfigList\n plural: ipamconfigs\n singular: ipamconfig\n preserveUnknownFields: + false\n scope: Cluster\n versions:\n - name: v1\n schema:\n openAPIV3Schema:\n + \ properties:\n apiVersion:\n description: 'APIVersion + defines the versioned schema of this representation\n of an object. + Servers should convert recognized schemas to the latest\n internal + value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'\n + \ type: string\n kind:\n description: 'Kind is a + string value representing the REST resource this\n object represents. + Servers may infer this from the endpoint the client\n submits requests + to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'\n + \ type: string\n metadata:\n type: object\n spec:\n + \ description: IPAMConfigSpec contains the specification for an IPAMConfig\n + \ resource.\n properties:\n autoAllocateBlocks:\n + \ type: boolean\n maxBlocksPerHost:\n description: + MaxBlocksPerHost, if non-zero, is the max number of blocks\n that + can be affine to each host.\n maximum: 2147483647\n minimum: + 0\n type: integer\n strictAffinity:\n type: + boolean\n required:\n - autoAllocateBlocks\n - + strictAffinity\n type: object\n type: object\n served: true\n + \ storage: true\nstatus:\n acceptedNames:\n kind: \"\"\n plural: \"\"\n + \ conditions: []\n storedVersions: []\n" +kind: ConfigMap +metadata: + annotations: + note: generated + labels: + type: generated + name: cni-${CLUSTER_NAME}-calico-windows + namespace: default +--- +apiVersion: v1 +data: + containerd-windows-logger: | + apiVersion: apps/v1 + kind: DaemonSet + metadata: + labels: + k8s-app: containerd-logger + name: containerd-logger + namespace: kube-system + spec: + selector: + matchLabels: + k8s-app: containerd-logger + template: + metadata: + labels: + k8s-app: containerd-logger + spec: + securityContext: + windowsOptions: + hostProcess: true + runAsUserName: "NT AUTHORITY\\system" + hostNetwork: true + containers: + - image: ghcr.io/kubernetes-sigs/sig-windows/eventflow-logger:v0.1.0 + args: [ "config.json" ] + name: containerd-logger + imagePullPolicy: Always + volumeMounts: + - name: containerd-logger-config + mountPath: /config.json + subPath: config.json + nodeSelector: + kubernetes.io/os: windows + tolerations: + - key: CriticalAddonsOnly + operator: Exists + - operator: Exists + volumes: + - configMap: + name: containerd-logger-config + name: containerd-logger-config + updateStrategy: + type: RollingUpdate + --- + kind: ConfigMap + apiVersion: v1 + metadata: + name: containerd-logger-config + namespace: kube-system + data: + config.json: | + { + "inputs": [ + { + "type": "ETW", + "sessionNamePrefix": "containerd", + "cleanupOldSessions": true, + "reuseExistingSession": true, + "providers": [ + { + "providerName": "Microsoft.Virtualization.RunHCS", + "providerGuid": "0B52781F-B24D-5685-DDF6-69830ED40EC3", + "level": "Verbose" + }, + { + "providerName": "ContainerD", + "providerGuid": "2acb92c0-eb9b-571a-69cf-8f3410f383ad", + "level": "Verbose" + } + ] + } + ], + "filters": [ + { + "type": "drop", + "include": "ProviderName == Microsoft.Virtualization.RunHCS && name == Stats && hasnoproperty error" + }, + { + "type": "drop", + "include": "ProviderName == Microsoft.Virtualization.RunHCS && name == hcsshim::LayerID && hasnoproperty error" + }, + { + "type": "drop", + "include": "ProviderName == Microsoft.Virtualization.RunHCS && name == hcsshim::NameToGuid && hasnoproperty error" + }, + { + "type": "drop", + "include": "ProviderName == Microsoft.Virtualization.RunHCS && name == containerd.task.v2.Task.Stats && hasnoproperty error" + }, + { + "type": "drop", + "include": "ProviderName == Microsoft.Virtualization.RunHCS && name == containerd.task.v2.Task.State && hasnoproperty error" + }, + { + "type": "drop", + "include": "ProviderName == Microsoft.Virtualization.RunHCS && name == HcsGetProcessProperties && hasnoproperty error" + }, + { + "type": "drop", + "include": "ProviderName == Microsoft.Virtualization.RunHCS && name == HcsGetComputeSystemProperties && hasnoproperty error" + } + ], + "outputs": [ + { + "type": "StdOutput" + } + ], + "schemaVersion": "2016-08-11" + } +kind: ConfigMap metadata: + annotations: + note: generated labels: - cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL:=azure} - cni: calico - cni-windows: ${CLUSTER_NAME}-calico - containerd-logger: enabled - csi-proxy: enabled - windows: enabled - name: ${CLUSTER_NAME} + type: generated + name: containerd-logger-${CLUSTER_NAME} namespace: default -spec: - clusterNetwork: - pods: - cidrBlocks: - - 192.168.0.0/16 - controlPlaneRef: - apiVersion: controlplane.cluster.x-k8s.io/v1beta1 - kind: KubeadmControlPlane - name: ${CLUSTER_NAME}-control-plane - infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 - kind: AzureCluster - name: ${CLUSTER_NAME} --- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 -kind: AzureCluster +apiVersion: v1 +data: + csi-proxy: | + apiVersion: apps/v1 + kind: DaemonSet + metadata: + labels: + k8s-app: csi-proxy + name: csi-proxy + namespace: kube-system + spec: + selector: + matchLabels: + k8s-app: csi-proxy + template: + metadata: + labels: + k8s-app: csi-proxy + spec: + nodeSelector: + "kubernetes.io/os": windows + securityContext: + windowsOptions: + hostProcess: true + runAsUserName: "NT AUTHORITY\\SYSTEM" + hostNetwork: true + containers: + - name: csi-proxy + image: ghcr.io/kubernetes-sigs/sig-windows/csi-proxy:v1.0.2 +kind: ConfigMap metadata: - name: ${CLUSTER_NAME} + annotations: + note: generated + labels: + type: generated + name: csi-proxy-addon namespace: default -spec: - additionalTags: - buildProvenance: ${BUILD_PROVENANCE} - creationTimestamp: ${TIMESTAMP} - jobName: ${JOB_NAME} - identityRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 - kind: AzureClusterIdentity - name: ${CLUSTER_IDENTITY_NAME} - location: ${AZURE_LOCATION} - networkSpec: - subnets: - - name: control-plane-subnet - role: control-plane - - name: node-subnet - role: node - vnet: - name: ${AZURE_VNET_NAME:=${CLUSTER_NAME}-vnet} - resourceGroup: ${AZURE_RESOURCE_GROUP:=${CLUSTER_NAME}} - subscriptionID: ${AZURE_SUBSCRIPTION_ID} --- -apiVersion: controlplane.cluster.x-k8s.io/v1beta1 -kind: KubeadmControlPlane +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy metadata: - annotations: - controlplane.cluster.x-k8s.io/skip-kube-proxy: "true" - name: ${CLUSTER_NAME}-control-plane + name: azuredisk-csi-driver-chart namespace: default spec: - kubeadmConfigSpec: - clusterConfiguration: - apiServer: - extraArgs: - cloud-provider: external - timeoutForControlPlane: 20m - controllerManager: - extraArgs: - allocate-node-cidrs: "false" - cloud-provider: external - cluster-name: ${CLUSTER_NAME} - v: "4" - etcd: - local: - dataDir: /var/lib/etcddisk/etcd - extraArgs: - quota-backend-bytes: "8589934592" - kubernetesVersion: ci/${CI_VERSION} - diskSetup: - filesystems: - - device: /dev/disk/azure/scsi1/lun0 - extraOpts: - - -E - - lazy_itable_init=1,lazy_journal_init=1 - filesystem: ext4 - label: etcd_disk - - device: ephemeral0.1 - filesystem: ext4 - label: ephemeral0 - replaceFS: ntfs - partitions: - - device: /dev/disk/azure/scsi1/lun0 - layout: true - overwrite: false - tableType: gpt - files: - - content: | - #!/bin/bash - - set -o nounset - set -o pipefail - set -o errexit - - systemctl stop kubelet - declare -a BINARIES=("kubeadm" "kubectl" "kubelet") - for BINARY in "$${BINARIES[@]}"; do - echo "* installing package: $${BINARY} ${KUBE_GIT_VERSION}" - curl --retry 10 --retry-delay 5 -w "response status code is %{http_code}" "https://${AZURE_STORAGE_ACCOUNT}.blob.core.windows.net/${AZURE_BLOB_CONTAINER_NAME}/${KUBE_GIT_VERSION}/bin/linux/amd64/$${BINARY}" --output "/usr/bin/$${BINARY}" - done - systemctl restart kubelet - - # prepull images from gcr.io/k8s-staging-ci-images and retag it to - # registry.k8s.io so kubeadm can fetch correct images no matter what - declare -a IMAGES=("kube-apiserver" "kube-controller-manager" "kube-proxy" "kube-scheduler") - [[ $(id -u) != 0 ]] && SUDO="sudo" || SUDO="" - IMAGE_REGISTRY_PREFIX=registry.k8s.io - for IMAGE in "$${IMAGES[@]}"; do - $${SUDO} ctr -n k8s.io images tag $$IMAGE_REGISTRY_PREFIX/$$IMAGE-amd64:"${CI_VERSION//+/_}" $$IMAGE_REGISTRY_PREFIX/$$IMAGE:"${CI_VERSION//+/_}" - $${SUDO} ctr -n k8s.io images tag $$IMAGE_REGISTRY_PREFIX/$$IMAGE-amd64:"${CI_VERSION//+/_}" gcr.io/k8s-staging-ci-images/$$IMAGE:"${CI_VERSION//+/_}" - done - - echo "kubeadm version: $(kubeadm version -o=short)" - echo "kubectl version: $(kubectl version --client=true)" - echo "kubelet version: $(kubelet --version)" - owner: root:root - path: /tmp/replace-k8s-binaries.sh - permissions: "0744" - - content: | - #!/bin/bash - - set -o nounset - set -o pipefail - set -o errexit - - curl -L --retry 10 --retry-delay 5 https://github.com/mikefarah/yq/releases/download/v4.6.1/yq_linux_amd64.tar.gz --output /tmp/yq_linux_amd64.tar.gz - tar -xzvf /tmp/yq_linux_amd64.tar.gz -C /tmp && mv /tmp/yq_linux_amd64 /usr/bin/yq - rm /tmp/yq_linux_amd64.tar.gz - - export KUBECONFIG=/etc/kubernetes/admin.conf - kubectl -n kube-system set image daemonset/kube-proxy kube-proxy="${REGISTRY}/kube-proxy:${KUBE_IMAGE_TAG}" - systemctl stop kubelet - yq e '.spec.containers[0].image = "${REGISTRY}/kube-apiserver:${KUBE_IMAGE_TAG}"' -i /etc/kubernetes/manifests/kube-apiserver.yaml - yq e '.spec.containers[0].image = "${REGISTRY}/kube-controller-manager:${KUBE_IMAGE_TAG}"' -i /etc/kubernetes/manifests/kube-controller-manager.yaml - yq e '.spec.containers[0].image = "${REGISTRY}/kube-scheduler:${KUBE_IMAGE_TAG}"' -i /etc/kubernetes/manifests/kube-scheduler.yaml - systemctl restart kubelet - owner: root:root - path: /tmp/replace-k8s-components.sh - permissions: "0744" - - contentFrom: - secret: - key: control-plane-azure.json - name: ${CLUSTER_NAME}-control-plane-azure-json - owner: root:root - path: /etc/kubernetes/azure.json - permissions: "0644" - - content: | - #!/bin/bash - - set -o nounset - set -o pipefail - set -o errexit - [[ $(id -u) != 0 ]] && SUDO="sudo" || SUDO="" - - echo "Use OOT credential provider" - mkdir -p /var/lib/kubelet/credential-provider - curl --retry 10 --retry-delay 5 -w "response status code is %{http_code}" -Lo /var/lib/kubelet/credential-provider/acr-credential-provider "https://${AZURE_STORAGE_ACCOUNT}.blob.core.windows.net/${AZURE_BLOB_CONTAINER_NAME}/${IMAGE_TAG_ACR_CREDENTIAL_PROVIDER}/azure-acr-credential-provider" - chmod 755 /var/lib/kubelet/credential-provider/acr-credential-provider - curl --retry 10 --retry-delay 5 -w "response status code is %{http_code}" -Lo /var/lib/kubelet/credential-provider-config.yaml "https://${AZURE_STORAGE_ACCOUNT}.blob.core.windows.net/${AZURE_BLOB_CONTAINER_NAME}/${IMAGE_TAG_ACR_CREDENTIAL_PROVIDER}/credential-provider-config.yaml" - chmod 644 /var/lib/kubelet/credential-provider-config.yaml - owner: root:root - path: /tmp/oot-cred-provider.sh - permissions: "0744" - initConfiguration: - nodeRegistration: - kubeletExtraArgs: - cloud-provider: external - image-credential-provider-bin-dir: /var/lib/kubelet/credential-provider - image-credential-provider-config: /var/lib/kubelet/credential-provider-config.yaml - name: '{{ ds.meta_data["local_hostname"] }}' - joinConfiguration: - nodeRegistration: - kubeletExtraArgs: - cloud-provider: external - image-credential-provider-bin-dir: /var/lib/kubelet/credential-provider - image-credential-provider-config: /var/lib/kubelet/credential-provider-config.yaml - name: '{{ ds.meta_data["local_hostname"] }}' - mounts: - - - LABEL=etcd_disk - - /var/lib/etcddisk - postKubeadmCommands: - - bash -c /tmp/replace-k8s-components.sh - preKubeadmCommands: - - bash -c /tmp/replace-k8s-binaries.sh - - bash -c /tmp/oot-cred-provider.sh - verbosity: 5 - machineTemplate: - infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 - kind: AzureMachineTemplate - name: ${CLUSTER_NAME}-control-plane - replicas: ${CONTROL_PLANE_MACHINE_COUNT:=1} - version: ${KUBERNETES_VERSION} + chartName: azuredisk-csi-driver + clusterSelector: + matchLabels: + azuredisk-csi: "true" + namespace: kube-system + releaseName: azuredisk-csi-driver-oot + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/azuredisk-csi-driver/master/charts + valuesTemplate: |- + controller: + replicas: 1 + runOnControlPlane: true + windows: + useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }} --- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 -kind: AzureMachineTemplate +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy metadata: - name: ${CLUSTER_NAME}-control-plane + name: calico namespace: default spec: - template: - spec: - dataDisks: - - diskSizeGB: 256 - lun: 0 - nameSuffix: etcddisk - image: - marketplace: - offer: capi - publisher: cncf-upstream - sku: ubuntu-2204-gen1 - version: latest - osDisk: - diskSizeGB: 128 - osType: Linux - sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""} - vmSize: ${AZURE_CONTROL_PLANE_MACHINE_TYPE} + chartName: tigera-operator + clusterSelector: + matchLabels: + cni: calico + namespace: tigera-operator + releaseName: projectcalico + repoURL: https://docs.tigera.io/calico/charts + valuesTemplate: |- + installation: + cni: + type: Calico + calicoNetwork: + bgp: Disabled + mtu: 1350 + ipPools: + ipPools:{{range $i, $cidr := .Cluster.spec.clusterNetwork.pods.cidrBlocks }} + - cidr: {{ $cidr }} + encapsulation: VXLAN{{end}} + registry: mcr.microsoft.com/oss + # Image and registry configuration for the tigera/operator pod. + tigeraOperator: + image: tigera/operator + registry: mcr.microsoft.com/oss + calicoctl: + image: mcr.microsoft.com/oss/calico/ctl + version: ${CALICO_VERSION} --- -apiVersion: cluster.x-k8s.io/v1beta1 -kind: MachinePool +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy metadata: - name: ${CLUSTER_NAME}-mp-0 + name: cloud-provider-azure-chart namespace: default spec: - clusterName: ${CLUSTER_NAME} - replicas: ${WORKER_MACHINE_COUNT:=2} - template: - spec: - bootstrap: - configRef: - apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 - kind: KubeadmConfig - name: ${CLUSTER_NAME}-mp-0 - clusterName: ${CLUSTER_NAME} - infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 - kind: AzureMachinePool - name: ${CLUSTER_NAME}-mp-0 - version: ${KUBERNETES_VERSION} + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure + releaseName: cloud-provider-azure-oot + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: | + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + logVerbosity: 4 --- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 -kind: AzureMachinePool +apiVersion: addons.cluster.x-k8s.io/v1alpha1 +kind: HelmChartProxy metadata: - name: ${CLUSTER_NAME}-mp-0 + name: cloud-provider-azure-chart-ci namespace: default spec: - location: ${AZURE_LOCATION} - strategy: - rollingUpdate: - deletePolicy: Oldest - maxSurge: 25% - maxUnavailable: 1 - type: RollingUpdate - template: - image: - marketplace: - offer: capi - publisher: cncf-upstream - sku: ubuntu-2204-gen1 - version: latest - osDisk: - diskSizeGB: 30 - managedDisk: - storageAccountType: Premium_LRS - osType: Linux - sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""} - vmExtensions: - - name: CustomScript - protectedSettings: - commandToExecute: | - #!/bin/sh - echo "This script is a no-op used for extension testing purposes ..." - touch test_file - publisher: Microsoft.Azure.Extensions - version: "2.1" - vmSize: ${AZURE_NODE_MACHINE_TYPE} + chartName: cloud-provider-azure + clusterSelector: + matchLabels: + cloud-provider: azure-ci + releaseName: cloud-provider-azure-oot + repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo + valuesTemplate: | + infra: + clusterName: {{ .Cluster.metadata.name }} + cloudControllerManager: + cloudConfig: ${CLOUD_CONFIG:-"/etc/kubernetes/azure.json"} + cloudConfigSecretName: ${CONFIG_SECRET_NAME:-""} + clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} + imageName: "${CCM_IMAGE_NAME:-""}" + imageRepository: "${IMAGE_REGISTRY:-""}" + imageTag: "${IMAGE_TAG_CCM:-""}" + logVerbosity: ${CCM_LOG_VERBOSITY:-4} + replicas: ${CCM_COUNT:-1} + enableDynamicReloading: ${ENABLE_DYNAMIC_RELOADING:-false} + cloudNodeManager: + imageName: "${CNM_IMAGE_NAME:-""}" + imageRepository: "${IMAGE_REGISTRY:-""}" + imageTag: "${IMAGE_TAG_CNM:-""}" +--- +apiVersion: addons.cluster.x-k8s.io/v1beta1 +kind: ClusterResourceSet +metadata: + name: ${CLUSTER_NAME}-calico-windows + namespace: default +spec: + clusterSelector: + matchLabels: + cni-windows: ${CLUSTER_NAME}-calico + resources: + - kind: ConfigMap + name: cni-${CLUSTER_NAME}-calico-windows + strategy: ApplyOnce +--- +apiVersion: addons.cluster.x-k8s.io/v1beta1 +kind: ClusterResourceSet +metadata: + name: containerd-logger-${CLUSTER_NAME} + namespace: default +spec: + clusterSelector: + matchLabels: + containerd-logger: enabled + resources: + - kind: ConfigMap + name: containerd-logger-${CLUSTER_NAME} + strategy: ApplyOnce +--- +apiVersion: addons.cluster.x-k8s.io/v1beta1 +kind: ClusterResourceSet +metadata: + name: csi-proxy + namespace: default +spec: + clusterSelector: + matchLabels: + csi-proxy: enabled + resources: + - kind: ConfigMap + name: csi-proxy-addon + strategy: ApplyOnce --- apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfig @@ -345,70 +555,7 @@ spec: name: '{{ ds.meta_data["local_hostname"] }}' preKubeadmCommands: - bash -c /tmp/oot-cred-provider.sh - - bash -c /tmp/replace-k8s-binaries.sh ---- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 -kind: AzureClusterIdentity -metadata: - labels: - clusterctl.cluster.x-k8s.io/move-hierarchy: "true" - name: ${CLUSTER_IDENTITY_NAME} - namespace: default -spec: - allowedNamespaces: {} - clientID: ${AZURE_CLIENT_ID} - clientSecret: - name: ${AZURE_CLUSTER_IDENTITY_SECRET_NAME} - namespace: ${AZURE_CLUSTER_IDENTITY_SECRET_NAMESPACE} - tenantID: ${AZURE_TENANT_ID} - type: ServicePrincipal ---- -apiVersion: cluster.x-k8s.io/v1beta1 -kind: MachinePool -metadata: - name: ${CLUSTER_NAME}-mp-win - namespace: default -spec: - clusterName: ${CLUSTER_NAME} - replicas: ${WINDOWS_WORKER_MACHINE_COUNT:-0} - template: - spec: - bootstrap: - configRef: - apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 - kind: KubeadmConfig - name: ${CLUSTER_NAME}-mp-win - clusterName: ${CLUSTER_NAME} - infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 - kind: AzureMachinePool - name: ${CLUSTER_NAME}-mp-win - version: ${KUBERNETES_VERSION} ---- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 -kind: AzureMachinePool -metadata: - annotations: - runtime: containerd - windowsServerVersion: ${WINDOWS_SERVER_VERSION:=""} - name: ${CLUSTER_NAME}-mp-win - namespace: default -spec: - location: ${AZURE_LOCATION} - template: - image: - marketplace: - offer: capi-windows - publisher: cncf-upstream - sku: ${WINDOWS_SERVER_VERSION:=windows-2019}-containerd-gen1 - version: latest - osDisk: - diskSizeGB: 128 - managedDisk: - storageAccountType: Premium_LRS - osType: Windows - sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""} - vmSize: ${AZURE_NODE_MACHINE_TYPE} + - bash -c /tmp/replace-k8s-binaries.sh --- apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfig @@ -487,498 +634,333 @@ spec: sshAuthorizedKeys: - ${AZURE_SSH_PUBLIC_KEY:=""} --- -apiVersion: addons.cluster.x-k8s.io/v1beta1 -kind: ClusterResourceSet -metadata: - name: ${CLUSTER_NAME}-calico-windows - namespace: default -spec: - clusterSelector: - matchLabels: - cni-windows: ${CLUSTER_NAME}-calico - resources: - - kind: ConfigMap - name: cni-${CLUSTER_NAME}-calico-windows - strategy: ApplyOnce ---- -apiVersion: addons.cluster.x-k8s.io/v1beta1 -kind: ClusterResourceSet -metadata: - name: csi-proxy - namespace: default -spec: - clusterSelector: - matchLabels: - csi-proxy: enabled - resources: - - kind: ConfigMap - name: csi-proxy-addon - strategy: ApplyOnce ---- -apiVersion: addons.cluster.x-k8s.io/v1beta1 -kind: ClusterResourceSet +apiVersion: cluster.x-k8s.io/v1beta1 +kind: Cluster metadata: - name: containerd-logger-${CLUSTER_NAME} + labels: + cloud-provider: ${CLOUD_PROVIDER_AZURE_LABEL:=azure} + cni: calico + cni-windows: ${CLUSTER_NAME}-calico + containerd-logger: enabled + csi-proxy: enabled + windows: enabled + name: ${CLUSTER_NAME} namespace: default spec: - clusterSelector: - matchLabels: - containerd-logger: enabled - resources: - - kind: ConfigMap - name: containerd-logger-${CLUSTER_NAME} - strategy: ApplyOnce + clusterNetwork: + pods: + cidrBlocks: + - 192.168.0.0/16 + controlPlaneRef: + apiVersion: controlplane.cluster.x-k8s.io/v1beta1 + kind: KubeadmControlPlane + name: ${CLUSTER_NAME}-control-plane + infrastructureRef: + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + kind: AzureCluster + name: ${CLUSTER_NAME} --- -apiVersion: addons.cluster.x-k8s.io/v1alpha1 -kind: HelmChartProxy +apiVersion: cluster.x-k8s.io/v1beta1 +kind: MachinePool metadata: - name: calico + name: ${CLUSTER_NAME}-mp-0 namespace: default spec: - chartName: tigera-operator - clusterSelector: - matchLabels: - cni: calico - namespace: tigera-operator - releaseName: projectcalico - repoURL: https://docs.tigera.io/calico/charts - valuesTemplate: |- - installation: - cni: - type: Calico - calicoNetwork: - bgp: Disabled - mtu: 1350 - ipPools: - ipPools:{{range $i, $cidr := .Cluster.spec.clusterNetwork.pods.cidrBlocks }} - - cidr: {{ $cidr }} - encapsulation: VXLAN{{end}} - registry: mcr.microsoft.com/oss - # Image and registry configuration for the tigera/operator pod. - tigeraOperator: - image: tigera/operator - registry: mcr.microsoft.com/oss - calicoctl: - image: mcr.microsoft.com/oss/calico/ctl - version: ${CALICO_VERSION} + clusterName: ${CLUSTER_NAME} + replicas: ${WORKER_MACHINE_COUNT:=2} + template: + spec: + bootstrap: + configRef: + apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 + kind: KubeadmConfig + name: ${CLUSTER_NAME}-mp-0 + clusterName: ${CLUSTER_NAME} + infrastructureRef: + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + kind: AzureMachinePool + name: ${CLUSTER_NAME}-mp-0 + version: ${KUBERNETES_VERSION} --- -apiVersion: addons.cluster.x-k8s.io/v1alpha1 -kind: HelmChartProxy +apiVersion: cluster.x-k8s.io/v1beta1 +kind: MachinePool metadata: - name: azuredisk-csi-driver-chart + name: ${CLUSTER_NAME}-mp-win namespace: default spec: - chartName: azuredisk-csi-driver - clusterSelector: - matchLabels: - azuredisk-csi: "true" - namespace: kube-system - releaseName: azuredisk-csi-driver-oot - repoURL: https://raw.githubusercontent.com/kubernetes-sigs/azuredisk-csi-driver/master/charts - valuesTemplate: |- - controller: - replicas: 1 - runOnControlPlane: true - windows: - useHostProcessContainers: {{ hasKey .Cluster.metadata.labels "cni-windows" }} + clusterName: ${CLUSTER_NAME} + replicas: ${WINDOWS_WORKER_MACHINE_COUNT:-0} + template: + spec: + bootstrap: + configRef: + apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 + kind: KubeadmConfig + name: ${CLUSTER_NAME}-mp-win + clusterName: ${CLUSTER_NAME} + infrastructureRef: + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + kind: AzureMachinePool + name: ${CLUSTER_NAME}-mp-win + version: ${KUBERNETES_VERSION} --- -apiVersion: addons.cluster.x-k8s.io/v1alpha1 -kind: HelmChartProxy +apiVersion: controlplane.cluster.x-k8s.io/v1beta1 +kind: KubeadmControlPlane metadata: - name: cloud-provider-azure-chart + annotations: + controlplane.cluster.x-k8s.io/skip-kube-proxy: "true" + name: ${CLUSTER_NAME}-control-plane namespace: default spec: - chartName: cloud-provider-azure - clusterSelector: - matchLabels: - cloud-provider: azure - releaseName: cloud-provider-azure-oot - repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo - valuesTemplate: | - infra: - clusterName: {{ .Cluster.metadata.name }} - cloudControllerManager: - clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} - logVerbosity: 4 + kubeadmConfigSpec: + clusterConfiguration: + apiServer: + extraArgs: + cloud-provider: external + timeoutForControlPlane: 20m + controllerManager: + extraArgs: + allocate-node-cidrs: "false" + cloud-provider: external + cluster-name: ${CLUSTER_NAME} + v: "4" + etcd: + local: + dataDir: /var/lib/etcddisk/etcd + extraArgs: + quota-backend-bytes: "8589934592" + kubernetesVersion: ci/${CI_VERSION} + diskSetup: + filesystems: + - device: /dev/disk/azure/scsi1/lun0 + extraOpts: + - -E + - lazy_itable_init=1,lazy_journal_init=1 + filesystem: ext4 + label: etcd_disk + - device: ephemeral0.1 + filesystem: ext4 + label: ephemeral0 + replaceFS: ntfs + partitions: + - device: /dev/disk/azure/scsi1/lun0 + layout: true + overwrite: false + tableType: gpt + files: + - content: | + #!/bin/bash + + set -o nounset + set -o pipefail + set -o errexit + + systemctl stop kubelet + declare -a BINARIES=("kubeadm" "kubectl" "kubelet") + for BINARY in "$${BINARIES[@]}"; do + echo "* installing package: $${BINARY} ${KUBE_GIT_VERSION}" + curl --retry 10 --retry-delay 5 -w "response status code is %{http_code}" "https://${AZURE_STORAGE_ACCOUNT}.blob.core.windows.net/${AZURE_BLOB_CONTAINER_NAME}/${KUBE_GIT_VERSION}/bin/linux/amd64/$${BINARY}" --output "/usr/bin/$${BINARY}" + done + systemctl restart kubelet + + # prepull images from gcr.io/k8s-staging-ci-images and retag it to + # registry.k8s.io so kubeadm can fetch correct images no matter what + declare -a IMAGES=("kube-apiserver" "kube-controller-manager" "kube-proxy" "kube-scheduler") + [[ $(id -u) != 0 ]] && SUDO="sudo" || SUDO="" + IMAGE_REGISTRY_PREFIX=registry.k8s.io + for IMAGE in "$${IMAGES[@]}"; do + $${SUDO} ctr -n k8s.io images tag $$IMAGE_REGISTRY_PREFIX/$$IMAGE-amd64:"${CI_VERSION//+/_}" $$IMAGE_REGISTRY_PREFIX/$$IMAGE:"${CI_VERSION//+/_}" + $${SUDO} ctr -n k8s.io images tag $$IMAGE_REGISTRY_PREFIX/$$IMAGE-amd64:"${CI_VERSION//+/_}" gcr.io/k8s-staging-ci-images/$$IMAGE:"${CI_VERSION//+/_}" + done + + echo "kubeadm version: $(kubeadm version -o=short)" + echo "kubectl version: $(kubectl version --client=true)" + echo "kubelet version: $(kubelet --version)" + owner: root:root + path: /tmp/replace-k8s-binaries.sh + permissions: "0744" + - content: | + #!/bin/bash + + set -o nounset + set -o pipefail + set -o errexit + + curl -L --retry 10 --retry-delay 5 https://github.com/mikefarah/yq/releases/download/v4.6.1/yq_linux_amd64.tar.gz --output /tmp/yq_linux_amd64.tar.gz + tar -xzvf /tmp/yq_linux_amd64.tar.gz -C /tmp && mv /tmp/yq_linux_amd64 /usr/bin/yq + rm /tmp/yq_linux_amd64.tar.gz + + export KUBECONFIG=/etc/kubernetes/admin.conf + kubectl -n kube-system set image daemonset/kube-proxy kube-proxy="${REGISTRY}/kube-proxy:${KUBE_IMAGE_TAG}" + systemctl stop kubelet + yq e '.spec.containers[0].image = "${REGISTRY}/kube-apiserver:${KUBE_IMAGE_TAG}"' -i /etc/kubernetes/manifests/kube-apiserver.yaml + yq e '.spec.containers[0].image = "${REGISTRY}/kube-controller-manager:${KUBE_IMAGE_TAG}"' -i /etc/kubernetes/manifests/kube-controller-manager.yaml + yq e '.spec.containers[0].image = "${REGISTRY}/kube-scheduler:${KUBE_IMAGE_TAG}"' -i /etc/kubernetes/manifests/kube-scheduler.yaml + systemctl restart kubelet + owner: root:root + path: /tmp/replace-k8s-components.sh + permissions: "0744" + - contentFrom: + secret: + key: control-plane-azure.json + name: ${CLUSTER_NAME}-control-plane-azure-json + owner: root:root + path: /etc/kubernetes/azure.json + permissions: "0644" + initConfiguration: + nodeRegistration: + kubeletExtraArgs: + cloud-provider: external + image-credential-provider-bin-dir: /var/lib/kubelet/credential-provider + image-credential-provider-config: /var/lib/kubelet/credential-provider-config.yaml + name: '{{ ds.meta_data["local_hostname"] }}' + joinConfiguration: + nodeRegistration: + kubeletExtraArgs: + cloud-provider: external + image-credential-provider-bin-dir: /var/lib/kubelet/credential-provider + image-credential-provider-config: /var/lib/kubelet/credential-provider-config.yaml + name: '{{ ds.meta_data["local_hostname"] }}' + mounts: + - - LABEL=etcd_disk + - /var/lib/etcddisk + postKubeadmCommands: + - bash -c /tmp/replace-k8s-components.sh + preKubeadmCommands: + - bash -c /tmp/replace-k8s-binaries.sh + verbosity: 5 + machineTemplate: + infrastructureRef: + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + kind: AzureMachineTemplate + name: ${CLUSTER_NAME}-control-plane + replicas: ${CONTROL_PLANE_MACHINE_COUNT:=1} + version: ${KUBERNETES_VERSION} --- -apiVersion: addons.cluster.x-k8s.io/v1alpha1 -kind: HelmChartProxy +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +kind: AzureCluster metadata: - name: cloud-provider-azure-chart-ci + name: ${CLUSTER_NAME} namespace: default spec: - chartName: cloud-provider-azure - clusterSelector: - matchLabels: - cloud-provider: azure-ci - releaseName: cloud-provider-azure-oot - repoURL: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo - valuesTemplate: | - infra: - clusterName: {{ .Cluster.metadata.name }} - cloudControllerManager: - cloudConfig: ${CLOUD_CONFIG:-"/etc/kubernetes/azure.json"} - cloudConfigSecretName: ${CONFIG_SECRET_NAME:-""} - clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }} - imageName: "${CCM_IMAGE_NAME:-""}" - imageRepository: "${IMAGE_REGISTRY:-""}" - imageTag: "${IMAGE_TAG_CCM:-""}" - logVerbosity: ${CCM_LOG_VERBOSITY:-4} - replicas: ${CCM_COUNT:-1} - enableDynamicReloading: ${ENABLE_DYNAMIC_RELOADING:-false} - cloudNodeManager: - imageName: "${CNM_IMAGE_NAME:-""}" - imageRepository: "${IMAGE_REGISTRY:-""}" - imageTag: "${IMAGE_TAG_CNM:-""}" ---- -apiVersion: v1 -data: - kube-proxy-patch: |- - apiVersion: v1 - kind: ConfigMap - metadata: - name: windows-kubeproxy-ci - namespace: kube-system - data: - KUBEPROXY_PATH: "c:/k/kube-proxy.exe" - proxy: | - apiVersion: apps/v1 - kind: DaemonSet - metadata: - labels: - k8s-app: kube-proxy - name: kube-proxy-windows - namespace: kube-system - spec: - selector: - matchLabels: - k8s-app: kube-proxy-windows - template: - metadata: - labels: - k8s-app: kube-proxy-windows - spec: - serviceAccountName: kube-proxy - securityContext: - windowsOptions: - hostProcess: true - runAsUserName: "NT AUTHORITY\\system" - hostNetwork: true - containers: - - image: sigwindowstools/kube-proxy:${KUBERNETES_VERSION/+/_}-calico-hostprocess - args: ["$env:CONTAINER_SANDBOX_MOUNT_POINT/kube-proxy/start.ps1"] - workingDir: "$env:CONTAINER_SANDBOX_MOUNT_POINT/kube-proxy/" - name: kube-proxy - env: - - name: NODE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: spec.nodeName - - name: POD_IP - valueFrom: - fieldRef: - fieldPath: status.podIP - - name: KUBEPROXY_PATH - valueFrom: - configMapKeyRef: - name: windows-kubeproxy-ci - key: KUBEPROXY_PATH - optional: true - volumeMounts: - - mountPath: /var/lib/kube-proxy - name: kube-proxy - nodeSelector: - kubernetes.io/os: windows - tolerations: - - key: CriticalAddonsOnly - operator: Exists - - operator: Exists - volumes: - - configMap: - name: kube-proxy - name: kube-proxy - updateStrategy: - type: RollingUpdate - windows-cni: "# strictAffinity required for windows\napiVersion: crd.projectcalico.org/v1\nkind: - IPAMConfig\nmetadata:\n name: default\nspec:\n autoAllocateBlocks: true\n strictAffinity: - true\n---\nkind: ConfigMap\napiVersion: v1\nmetadata:\n name: calico-static-rules\n - \ namespace: calico-system\n labels:\n tier: node\n app: calico\ndata:\n - \ static-rules.json: |\n {\n \"Provider\": \"azure\",\n \"Version\": - \"0.1\",\n \"Rules\": [\n {\n \"Name\": \"EndpointPolicy\",\n - \ \"Rule\": {\n \"Id\": \"wireserver\",\n \"Type\": - \"ACL\",\n \"Protocol\": 6,\n \"Action\": \"Block\",\n - \ \"Direction\": \"Out\",\n \"RemoteAddresses\": \"168.63.129.16/32\",\n - \ \"RemotePorts\": \"80\",\n \"Priority\": 200,\n \"RuleType\": - \"Switch\"\n }\n }\n ]\n } \n---\nkind: ConfigMap\napiVersion: - v1\nmetadata:\n name: calico-config-windows\n namespace: calico-system\n labels:\n - \ tier: node\n app: calico\ndata:\n veth_mtu: \"1350\"\n \n cni_network_config: - |\n {\n \"name\": \"Calico\",\n \"cniVersion\": \"0.3.1\",\n \"plugins\": - [\n {\n \"windows_use_single_network\": true,\n \"type\": - \"calico\",\n \"mode\": \"vxlan\",\n \"nodename\": \"__KUBERNETES_NODE_NAME__\",\n - \ \"nodename_file_optional\": true,\n \"log_file_path\": \"c:/cni.log\",\n - \ \"log_level\": \"debug\",\n\n \"vxlan_mac_prefix\": \"0E-2A\",\n - \ \"vxlan_vni\": 4096,\n \"mtu\": __CNI_MTU__,\n \"policy\": - {\n \"type\": \"k8s\"\n },\n\n \"log_level\": \"info\",\n\n - \ \"capabilities\": {\"dns\": true},\n \"DNS\": {\n \"Search\": - \ [\n \"svc.cluster.local\"\n ]\n },\n\n \"datastore_type\": - \"kubernetes\",\n\n \"kubernetes\": {\n \"kubeconfig\": \"__KUBECONFIG_FILEPATH__\"\n - \ },\n\n \"ipam\": {\n \"type\": \"calico-ipam\",\n - \ \"subnet\": \"usePodCidr\"\n },\n\n \"policies\": - \ [\n {\n \"Name\": \"EndpointPolicy\",\n \"Value\": - \ {\n \"Type\": \"OutBoundNAT\",\n \"ExceptionList\": - \ [\n \"__K8S_SERVICE_CIDR__\"\n ]\n }\n - \ },\n {\n \"Name\": \"EndpointPolicy\",\n - \ \"Value\": {\n \"Type\": \"SDNROUTE\",\n \"DestinationPrefix\": - \ \"__K8S_SERVICE_CIDR__\",\n \"NeedEncap\": true\n }\n - \ }\n ]\n }\n ]\n\n }\n---\napiVersion: apps/v1\nkind: - DaemonSet\nmetadata:\n name: calico-node-windows\n labels:\n tier: node\n - \ app: calico\n namespace: calico-system\nspec:\n selector:\n matchLabels:\n - \ app: calico\n template:\n metadata:\n labels:\n tier: node\n - \ app: calico\n spec:\n affinity:\n nodeAffinity:\n requiredDuringSchedulingIgnoredDuringExecution:\n - \ nodeSelectorTerms:\n - matchExpressions:\n - - key: kubernetes.io/os\n operator: In\n values:\n - \ - windows\n - key: kubernetes.io/arch\n - \ operator: In\n values:\n - - amd64\n securityContext:\n windowsOptions:\n hostProcess: - true\n runAsUserName: \"NT AUTHORITY\\\\system\"\n hostNetwork: - true\n serviceAccountName: calico-node\n tolerations:\n - operator: - Exists\n effect: NoSchedule\n # Mark the pod as a critical add-on - for rescheduling.\n - key: CriticalAddonsOnly\n operator: Exists\n - \ - effect: NoExecute\n operator: Exists\n initContainers:\n # - This container installs the CNI binaries\n # and CNI network config file - on each node.\n - name: install-cni\n image: sigwindowstools/calico-install:v3.26.1-hostprocess\n - \ args: [\"$env:CONTAINER_SANDBOX_MOUNT_POINT/calico/install.ps1\"]\n - \ imagePullPolicy: Always\n env:\n # Name of the CNI - config file to create.\n - name: CNI_CONF_NAME\n value: - \"10-calico.conflist\"\n # The CNI network config to install on each - node.\n - name: CNI_NETWORK_CONFIG\n valueFrom:\n configMapKeyRef:\n - \ name: calico-config-windows\n key: cni_network_config\n - \ # Set the hostname based on the k8s node name.\n - name: - KUBERNETES_NODE_NAME\n valueFrom:\n fieldRef:\n fieldPath: - spec.nodeName\n # CNI MTU Config variable\n - name: CNI_MTU\n - \ valueFrom:\n configMapKeyRef:\n name: - calico-config-windows\n key: veth_mtu\n # Prevents - the container from sleeping forever.\n - name: SLEEP\n value: - \"false\"\n - name: K8S_SERVICE_CIDR\n value: \"10.96.0.0/12\"\n - \ volumeMounts:\n - mountPath: /host/opt/cni/bin\n name: - cni-bin-dir\n - mountPath: /host/etc/cni/net.d\n name: - cni-net-dir\n - name: kubeadm-config\n mountPath: /etc/kubeadm-config/\n - \ securityContext:\n windowsOptions:\n hostProcess: - true\n runAsUserName: \"NT AUTHORITY\\\\system\"\n containers:\n - \ - name: calico-node-startup\n image: sigwindowstools/calico-node:v3.26.1-hostprocess\n - \ args: [\"$env:CONTAINER_SANDBOX_MOUNT_POINT/calico/node-service.ps1\"]\n - \ workingDir: \"$env:CONTAINER_SANDBOX_MOUNT_POINT/calico/\"\n imagePullPolicy: - Always\n volumeMounts:\n - name: calico-config-windows\n mountPath: - /etc/kube-calico-windows/\n env:\n - name: POD_NAME\n valueFrom:\n - \ fieldRef:\n apiVersion: v1\n fieldPath: - metadata.name\n - name: POD_NAMESPACE\n valueFrom:\n fieldRef:\n - \ apiVersion: v1\n fieldPath: metadata.namespace\n - - name: CNI_IPAM_TYPE\n value: \"calico-ipam\"\n - name: CALICO_NETWORKING_BACKEND\n - \ value: \"vxlan\"\n - name: KUBECONFIG\n value: \"C:/etc/cni/net.d/calico-kubeconfig\"\n - \ - name: VXLAN_VNI\n value: \"4096\"\n - name: calico-node-felix\n - \ image: sigwindowstools/calico-node:v3.26.1-hostprocess\n args: - [\"$env:CONTAINER_SANDBOX_MOUNT_POINT/calico/felix-service.ps1\"]\n imagePullPolicy: - Always\n workingDir: \"$env:CONTAINER_SANDBOX_MOUNT_POINT/calico/\"\n volumeMounts:\n - \ - name: calico-config-windows\n mountPath: /etc/kube-calico-windows/\n - \ - name: calico-static-rules\n mountPath: /calico/static-rules.json\n - \ subPath: static-rules.json\n env:\n - name: POD_NAME\n - \ valueFrom:\n fieldRef:\n apiVersion: v1\n fieldPath: - metadata.name\n - name: POD_NAMESPACE\n valueFrom:\n fieldRef:\n - \ apiVersion: v1\n fieldPath: metadata.namespace\n - - name: VXLAN_VNI\n value: \"4096\"\n - name: KUBECONFIG\n value: - \"C:/etc/cni/net.d/calico-kubeconfig\"\n volumes:\n - name: calico-config-windows\n - \ configMap:\n name: calico-config-windows\n - name: calico-static-rules\n - \ configMap:\n name: calico-static-rules\n # Used to install - CNI.\n - name: cni-bin-dir\n hostPath:\n path: /opt/cni/bin\n - \ - name: cni-net-dir\n hostPath:\n path: /etc/cni/net.d\n - \ - name: kubeadm-config\n configMap:\n name: kubeadm-config\n---\napiVersion: - apiextensions.k8s.io/v1\nkind: CustomResourceDefinition\nmetadata:\n name: ipamconfigs.crd.projectcalico.org\nspec:\n - \ group: crd.projectcalico.org\n names:\n kind: IPAMConfig\n listKind: - IPAMConfigList\n plural: ipamconfigs\n singular: ipamconfig\n preserveUnknownFields: - false\n scope: Cluster\n versions:\n - name: v1\n schema:\n openAPIV3Schema:\n - \ properties:\n apiVersion:\n description: 'APIVersion - defines the versioned schema of this representation\n of an object. - Servers should convert recognized schemas to the latest\n internal - value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'\n - \ type: string\n kind:\n description: 'Kind is a - string value representing the REST resource this\n object represents. - Servers may infer this from the endpoint the client\n submits requests - to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'\n - \ type: string\n metadata:\n type: object\n spec:\n - \ description: IPAMConfigSpec contains the specification for an IPAMConfig\n - \ resource.\n properties:\n autoAllocateBlocks:\n - \ type: boolean\n maxBlocksPerHost:\n description: - MaxBlocksPerHost, if non-zero, is the max number of blocks\n that - can be affine to each host.\n maximum: 2147483647\n minimum: - 0\n type: integer\n strictAffinity:\n type: - boolean\n required:\n - autoAllocateBlocks\n - - strictAffinity\n type: object\n type: object\n served: true\n - \ storage: true\nstatus:\n acceptedNames:\n kind: \"\"\n plural: \"\"\n - \ conditions: []\n storedVersions: []\n" -kind: ConfigMap + additionalTags: + buildProvenance: ${BUILD_PROVENANCE} + creationTimestamp: ${TIMESTAMP} + jobName: ${JOB_NAME} + identityRef: + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + kind: AzureClusterIdentity + name: ${CLUSTER_IDENTITY_NAME} + location: ${AZURE_LOCATION} + networkSpec: + subnets: + - name: control-plane-subnet + role: control-plane + - name: node-subnet + role: node + vnet: + name: ${AZURE_VNET_NAME:=${CLUSTER_NAME}-vnet} + resourceGroup: ${AZURE_RESOURCE_GROUP:=${CLUSTER_NAME}} + subscriptionID: ${AZURE_SUBSCRIPTION_ID} +--- +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +kind: AzureClusterIdentity metadata: - annotations: - note: generated labels: - type: generated - name: cni-${CLUSTER_NAME}-calico-windows + clusterctl.cluster.x-k8s.io/move-hierarchy: "true" + name: ${CLUSTER_IDENTITY_NAME} namespace: default +spec: + allowedNamespaces: {} + clientID: ${AZURE_CLIENT_ID} + clientSecret: + name: ${AZURE_CLUSTER_IDENTITY_SECRET_NAME} + namespace: ${AZURE_CLUSTER_IDENTITY_SECRET_NAMESPACE} + tenantID: ${AZURE_TENANT_ID} + type: ServicePrincipal --- -apiVersion: v1 -data: - csi-proxy: | - apiVersion: apps/v1 - kind: DaemonSet - metadata: - labels: - k8s-app: csi-proxy - name: csi-proxy - namespace: kube-system - spec: - selector: - matchLabels: - k8s-app: csi-proxy - template: - metadata: - labels: - k8s-app: csi-proxy - spec: - nodeSelector: - "kubernetes.io/os": windows - securityContext: - windowsOptions: - hostProcess: true - runAsUserName: "NT AUTHORITY\\SYSTEM" - hostNetwork: true - containers: - - name: csi-proxy - image: ghcr.io/kubernetes-sigs/sig-windows/csi-proxy:v1.0.2 -kind: ConfigMap +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +kind: AzureMachinePool metadata: - annotations: - note: generated - labels: - type: generated - name: csi-proxy-addon + name: ${CLUSTER_NAME}-mp-0 namespace: default +spec: + location: ${AZURE_LOCATION} + strategy: + rollingUpdate: + deletePolicy: Oldest + maxSurge: 25% + maxUnavailable: 1 + type: RollingUpdate + template: + image: + marketplace: + offer: capi + publisher: cncf-upstream + sku: ubuntu-2204-gen1 + version: latest + osDisk: + diskSizeGB: 30 + managedDisk: + storageAccountType: Premium_LRS + osType: Linux + sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""} + vmExtensions: + - name: CustomScript + protectedSettings: + commandToExecute: | + #!/bin/sh + echo "This script is a no-op used for extension testing purposes ..." + touch test_file + publisher: Microsoft.Azure.Extensions + version: "2.1" + vmSize: ${AZURE_NODE_MACHINE_TYPE} --- -apiVersion: v1 -data: - containerd-windows-logger: | - apiVersion: apps/v1 - kind: DaemonSet - metadata: - labels: - k8s-app: containerd-logger - name: containerd-logger - namespace: kube-system - spec: - selector: - matchLabels: - k8s-app: containerd-logger - template: - metadata: - labels: - k8s-app: containerd-logger - spec: - securityContext: - windowsOptions: - hostProcess: true - runAsUserName: "NT AUTHORITY\\system" - hostNetwork: true - containers: - - image: ghcr.io/kubernetes-sigs/sig-windows/eventflow-logger:v0.1.0 - args: [ "config.json" ] - name: containerd-logger - imagePullPolicy: Always - volumeMounts: - - name: containerd-logger-config - mountPath: /config.json - subPath: config.json - nodeSelector: - kubernetes.io/os: windows - tolerations: - - key: CriticalAddonsOnly - operator: Exists - - operator: Exists - volumes: - - configMap: - name: containerd-logger-config - name: containerd-logger-config - updateStrategy: - type: RollingUpdate - --- - kind: ConfigMap - apiVersion: v1 - metadata: - name: containerd-logger-config - namespace: kube-system - data: - config.json: | - { - "inputs": [ - { - "type": "ETW", - "sessionNamePrefix": "containerd", - "cleanupOldSessions": true, - "reuseExistingSession": true, - "providers": [ - { - "providerName": "Microsoft.Virtualization.RunHCS", - "providerGuid": "0B52781F-B24D-5685-DDF6-69830ED40EC3", - "level": "Verbose" - }, - { - "providerName": "ContainerD", - "providerGuid": "2acb92c0-eb9b-571a-69cf-8f3410f383ad", - "level": "Verbose" - } - ] - } - ], - "filters": [ - { - "type": "drop", - "include": "ProviderName == Microsoft.Virtualization.RunHCS && name == Stats && hasnoproperty error" - }, - { - "type": "drop", - "include": "ProviderName == Microsoft.Virtualization.RunHCS && name == hcsshim::LayerID && hasnoproperty error" - }, - { - "type": "drop", - "include": "ProviderName == Microsoft.Virtualization.RunHCS && name == hcsshim::NameToGuid && hasnoproperty error" - }, - { - "type": "drop", - "include": "ProviderName == Microsoft.Virtualization.RunHCS && name == containerd.task.v2.Task.Stats && hasnoproperty error" - }, - { - "type": "drop", - "include": "ProviderName == Microsoft.Virtualization.RunHCS && name == containerd.task.v2.Task.State && hasnoproperty error" - }, - { - "type": "drop", - "include": "ProviderName == Microsoft.Virtualization.RunHCS && name == HcsGetProcessProperties && hasnoproperty error" - }, - { - "type": "drop", - "include": "ProviderName == Microsoft.Virtualization.RunHCS && name == HcsGetComputeSystemProperties && hasnoproperty error" - } - ], - "outputs": [ - { - "type": "StdOutput" - } - ], - "schemaVersion": "2016-08-11" - } -kind: ConfigMap +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +kind: AzureMachinePool metadata: annotations: - note: generated - labels: - type: generated - name: containerd-logger-${CLUSTER_NAME} + runtime: containerd + windowsServerVersion: ${WINDOWS_SERVER_VERSION:=""} + name: ${CLUSTER_NAME}-mp-win + namespace: default +spec: + location: ${AZURE_LOCATION} + template: + image: + marketplace: + offer: capi-windows + publisher: cncf-upstream + sku: ${WINDOWS_SERVER_VERSION:=windows-2019}-containerd-gen1 + version: latest + osDisk: + diskSizeGB: 128 + managedDisk: + storageAccountType: Premium_LRS + osType: Windows + sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""} + vmSize: ${AZURE_NODE_MACHINE_TYPE} +--- +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +kind: AzureMachineTemplate +metadata: + name: ${CLUSTER_NAME}-control-plane namespace: default +spec: + template: + spec: + dataDisks: + - diskSizeGB: 256 + lun: 0 + nameSuffix: etcddisk + image: + marketplace: + offer: capi + publisher: cncf-upstream + sku: ubuntu-2204-gen1 + version: latest + osDisk: + diskSizeGB: 128 + osType: Linux + sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""} + vmSize: ${AZURE_CONTROL_PLANE_MACHINE_TYPE} diff --git a/templates/test/dev/custom-builds-machine-pool/kustomization.yaml b/templates/test/dev/custom-builds-machine-pool/kustomization.yaml index f499bad3e86..d950ee00331 100644 --- a/templates/test/dev/custom-builds-machine-pool/kustomization.yaml +++ b/templates/test/dev/custom-builds-machine-pool/kustomization.yaml @@ -1,32 +1,33 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization namespace: default resources: - - ../../../test/ci/prow-machine-pool -patchesStrategicMerge: - - ../patches/control-plane-custom-builds.yaml - - patches/machine-pool-deployment-pr-version-windows.yaml - - patches/custom-builds.yaml +- ../../../test/ci/prow-machine-pool patches: - - target: - group: controlplane.cluster.x-k8s.io - version: v1beta1 - kind: KubeadmControlPlane - name: .*-control-plane - path: ../../../test/ci/prow-ci-version/patches/oot-credential-provider-kcp.yaml - - target: - group: bootstrap.cluster.x-k8s.io - version: v1beta1 - kind: KubeadmConfig - name: .*-mp-win - namespace: default - path: patches/kubeadm-bootstrap-machine-pool-windows-k8s-pr-binaries.yaml +- path: ../../../test/ci/prow-ci-version/patches/oot-credential-provider-kcp.yaml + target: + group: controlplane.cluster.x-k8s.io + kind: KubeadmControlPlane + name: .*-control-plane + version: v1beta1 +- path: patches/kubeadm-bootstrap-machine-pool-windows-k8s-pr-binaries.yaml + target: + group: bootstrap.cluster.x-k8s.io + kind: KubeadmConfig + name: .*-mp-win + namespace: default + version: v1beta1 +- path: ../patches/control-plane-custom-builds.yaml +- path: patches/machine-pool-deployment-pr-version-windows.yaml +- path: patches/custom-builds.yaml configMapGenerator: - - name: cni-${CLUSTER_NAME}-calico-windows - behavior: merge - files: - - kube-proxy-patch=../../../test/ci/patches/windows-kubeproxy-ci.yaml +- behavior: merge + files: + - kube-proxy-patch=../../../test/ci/patches/windows-kubeproxy-ci.yaml + name: cni-${CLUSTER_NAME}-calico-windows generatorOptions: + annotations: + note: generated disableNameSuffixHash: true labels: type: generated - annotations: - note: generated diff --git a/templates/test/dev/custom-builds/kustomization.yaml b/templates/test/dev/custom-builds/kustomization.yaml index 5ed8c67c348..cae8769abc4 100644 --- a/templates/test/dev/custom-builds/kustomization.yaml +++ b/templates/test/dev/custom-builds/kustomization.yaml @@ -1,67 +1,70 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +sortOptions: + order: fifo namespace: default resources: - - ../../../test/ci/prow - - ../../../addons/metrics-server/metrics-server-resource-set.yaml -patchesStrategicMerge: - - patches/machine-deployment-pr-version.yaml - - patches/machine-deployment-pr-version-windows.yaml - - ../../../test/ci/patches/windows-feature-gates.yaml - - ../../../test/ci/patches/windows-containerd-labels.yaml - - ../../../test/ci/patches/windows-machine-deployment-replicas.yaml - - ../../../test/ci/patches/metrics-server-enabled-cluster.yaml - - ../../../test/ci/patches/controller-manager-featuregates.yaml +- ../../../test/ci/prow +- ../../../addons/metrics-server/metrics-server-resource-set.yaml patches: -- target: +- path: ../../../test/ci/prow-ci-version/patches/oot-credential-provider.yaml + target: group: bootstrap.cluster.x-k8s.io - version: v1beta1 kind: KubeadmConfigTemplate name: .*-md-0 namespace: default - path: ../../../test/ci/prow-ci-version/patches/oot-credential-provider.yaml -- target: - group: bootstrap.cluster.x-k8s.io version: v1beta1 +- path: ../../../test/ci/prow-ci-version/patches/oot-credential-provider-win.yaml + target: + group: bootstrap.cluster.x-k8s.io kind: KubeadmConfigTemplate name: .*-md-win namespace: default - path: ../../../test/ci/prow-ci-version/patches/oot-credential-provider-win.yaml -- target: - group: controlplane.cluster.x-k8s.io version: v1beta1 +- path: ../../../test/ci/prow-ci-version/patches/oot-credential-provider-kcp.yaml + target: + group: controlplane.cluster.x-k8s.io kind: KubeadmControlPlane name: .*-control-plane - path: ../../../test/ci/prow-ci-version/patches/oot-credential-provider-kcp.yaml -- target: - group: bootstrap.cluster.x-k8s.io version: v1beta1 +- path: patches/kubeadm-bootstrap.yaml + target: + group: bootstrap.cluster.x-k8s.io kind: KubeadmConfigTemplate name: .*-md-0 namespace: default - path: patches/kubeadm-bootstrap.yaml -- target: - group: controlplane.cluster.x-k8s.io version: v1beta1 +- path: patches/kubeadm-controlplane-bootstrap.yaml + target: + group: controlplane.cluster.x-k8s.io kind: KubeadmControlPlane name: .*-control-plane - path: patches/kubeadm-controlplane-bootstrap.yaml -- target: - group: bootstrap.cluster.x-k8s.io version: v1beta1 +- path: patches/kubeadm-bootstrap-windows-k8s-pr-binaries.yaml + target: + group: bootstrap.cluster.x-k8s.io kind: KubeadmConfigTemplate name: .*-md-win namespace: default - path: patches/kubeadm-bootstrap-windows-k8s-pr-binaries.yaml + version: v1beta1 +- path: patches/machine-deployment-pr-version.yaml +- path: patches/machine-deployment-pr-version-windows.yaml +- path: ../../../test/ci/patches/windows-feature-gates.yaml +- path: ../../../test/ci/patches/windows-containerd-labels.yaml +- path: ../../../test/ci/patches/windows-machine-deployment-replicas.yaml +- path: ../../../test/ci/patches/metrics-server-enabled-cluster.yaml +- path: ../../../test/ci/patches/controller-manager-featuregates.yaml configMapGenerator: - - name: cni-${CLUSTER_NAME}-calico-windows - behavior: merge - files: - - kube-proxy-patch=../../../test/ci/patches/windows-kubeproxy-ci.yaml - - name: metrics-server-${CLUSTER_NAME} - files: - - metrics-server=../../../addons/metrics-server/metrics-server.yaml +- behavior: merge + files: + - kube-proxy-patch=../../../test/ci/patches/windows-kubeproxy-ci.yaml + name: cni-${CLUSTER_NAME}-calico-windows +- files: + - metrics-server=../../../addons/metrics-server/metrics-server.yaml + name: metrics-server-${CLUSTER_NAME} generatorOptions: + annotations: + note: generated disableNameSuffixHash: true labels: type: generated - annotations: - note: generated diff --git a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-kcp-remediation/kustomization.yaml b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-kcp-remediation/kustomization.yaml index 51627e8f298..4c39bc8ceca 100644 --- a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-kcp-remediation/kustomization.yaml +++ b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-kcp-remediation/kustomization.yaml @@ -1,4 +1,6 @@ -bases: +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: - ../bases/cluster-with-kcp.yaml - ../bases/md.yaml - mhc.yaml @@ -7,7 +9,6 @@ bases: - ../../../../../../templates/addons/cluster-api-helm/azuredisk-csi-driver.yaml - ../../../../../../templates/addons/cluster-api-helm/cloud-provider-azure.yaml - ../../../../../../templates/addons/cluster-api-helm/cloud-provider-azure-ci.yaml - -patchesStrategicMerge: -- ../../../../../../templates/azure-cluster-identity/azurecluster-identity-ref.yaml -- ../../../../../../templates/test/ci/patches/cluster-label-calico.yaml +patches: +- path: ../../../../../../templates/azure-cluster-identity/azurecluster-identity-ref.yaml +- path: ../../../../../../templates/test/ci/patches/cluster-label-calico.yaml diff --git a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-kcp-scale-in/kustomization.yaml b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-kcp-scale-in/kustomization.yaml index 839becbc484..a3b9c1ce8df 100644 --- a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-kcp-scale-in/kustomization.yaml +++ b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-kcp-scale-in/kustomization.yaml @@ -1,4 +1,6 @@ -bases: +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: - ../bases/cluster-with-kcp.yaml - ../bases/md.yaml - ../../../../../../templates/azure-cluster-identity/azure-cluster-identity.yaml @@ -6,9 +8,8 @@ bases: - ../../../../../../templates/addons/cluster-api-helm/azuredisk-csi-driver.yaml - ../../../../../../templates/addons/cluster-api-helm/cloud-provider-azure.yaml - ../../../../../../templates/addons/cluster-api-helm/cloud-provider-azure-ci.yaml - -patchesStrategicMerge: -- ./cluster-with-kcp.yaml -- ../../../../../../templates/azure-cluster-identity/azurecluster-identity-ref.yaml -- ../../../../../../templates/test/ci/patches/cluster-label-calico.yaml -- ../../../../../../templates/test/ci/patches/cluster-label-cloud-provider-azure.yaml +patches: +- path: ./cluster-with-kcp.yaml +- path: ../../../../../../templates/azure-cluster-identity/azurecluster-identity-ref.yaml +- path: ../../../../../../templates/test/ci/patches/cluster-label-calico.yaml +- path: ../../../../../../templates/test/ci/patches/cluster-label-cloud-provider-azure.yaml diff --git a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-machine-pool/kustomization.yaml b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-machine-pool/kustomization.yaml index ace1f63adb7..2bd173aca13 100644 --- a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-machine-pool/kustomization.yaml +++ b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-machine-pool/kustomization.yaml @@ -1,3 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization resources: - ../bases/cluster-with-kcp.yaml - ../bases/mp.yaml @@ -6,8 +8,7 @@ resources: - ../../../../../../templates/addons/cluster-api-helm/azuredisk-csi-driver.yaml - ../../../../../../templates/addons/cluster-api-helm/cloud-provider-azure.yaml - ../../../../../../templates/addons/cluster-api-helm/cloud-provider-azure-ci.yaml - -patchesStrategicMerge: -- ../../../../../../templates/azure-cluster-identity/azurecluster-identity-ref.yaml -- ../../../../../../templates/test/ci/patches/cluster-label-calico.yaml -- ../../../../../../templates/test/ci/patches/cluster-label-cloud-provider-azure.yaml +patches: +- path: ../../../../../../templates/azure-cluster-identity/azurecluster-identity-ref.yaml +- path: ../../../../../../templates/test/ci/patches/cluster-label-calico.yaml +- path: ../../../../../../templates/test/ci/patches/cluster-label-cloud-provider-azure.yaml diff --git a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-md-remediation/kustomization.yaml b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-md-remediation/kustomization.yaml index 1de86072e7a..b8b0f7dcc58 100644 --- a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-md-remediation/kustomization.yaml +++ b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-md-remediation/kustomization.yaml @@ -1,4 +1,6 @@ -bases: +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: - ../bases/cluster-with-kcp.yaml - ../bases/md.yaml - mhc.yaml @@ -7,9 +9,8 @@ bases: - ../../../../../../templates/addons/cluster-api-helm/azuredisk-csi-driver.yaml - ../../../../../../templates/addons/cluster-api-helm/cloud-provider-azure.yaml - ../../../../../../templates/addons/cluster-api-helm/cloud-provider-azure-ci.yaml - -patchesStrategicMerge: -- ./md.yaml -- ../../../../../../templates/azure-cluster-identity/azurecluster-identity-ref.yaml -- ../../../../../../templates/test/ci/patches/cluster-label-calico.yaml -- ../../../../../../templates/test/ci/patches/cluster-label-cloud-provider-azure.yaml +patches: +- path: ./md.yaml +- path: ../../../../../../templates/azure-cluster-identity/azurecluster-identity-ref.yaml +- path: ../../../../../../templates/test/ci/patches/cluster-label-calico.yaml +- path: ../../../../../../templates/test/ci/patches/cluster-label-cloud-provider-azure.yaml diff --git a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-node-drain/kustomization.yaml b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-node-drain/kustomization.yaml index fe6f31be6d0..e9dee7298d3 100644 --- a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-node-drain/kustomization.yaml +++ b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-node-drain/kustomization.yaml @@ -1,4 +1,6 @@ -bases: +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: - ../bases/cluster-with-kcp.yaml - ../bases/md.yaml - ../../../../../../templates/azure-cluster-identity/azure-cluster-identity.yaml @@ -6,10 +8,9 @@ bases: - ../../../../../../templates/addons/cluster-api-helm/azuredisk-csi-driver.yaml - ../../../../../../templates/addons/cluster-api-helm/cloud-provider-azure.yaml - ../../../../../../templates/addons/cluster-api-helm/cloud-provider-azure-ci.yaml - -patchesStrategicMerge: -- ./md.yaml -- ./cluster-with-kcp.yaml -- ../../../../../../templates/azure-cluster-identity/azurecluster-identity-ref.yaml -- ../../../../../../templates/test/ci/patches/cluster-label-calico.yaml -- ../../../../../../templates/test/ci/patches/cluster-label-cloud-provider-azure.yaml +patches: +- path: ./md.yaml +- path: ./cluster-with-kcp.yaml +- path: ../../../../../../templates/azure-cluster-identity/azurecluster-identity-ref.yaml +- path: ../../../../../../templates/test/ci/patches/cluster-label-calico.yaml +- path: ../../../../../../templates/test/ci/patches/cluster-label-cloud-provider-azure.yaml diff --git a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-upgrades/kustomization.yaml b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-upgrades/kustomization.yaml index 5cb009e75f2..7bb4066f1cb 100644 --- a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-upgrades/kustomization.yaml +++ b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template-upgrades/kustomization.yaml @@ -1,8 +1,9 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization resources: - - ../bases/cluster-with-kcp.yaml - - ../bases/md.yaml - - ../bases/mp.yaml - - ../../../../../../templates/azure-cluster-identity/azure-cluster-identity.yaml - -patchesStrategicMerge: - - ../../../../../../templates/azure-cluster-identity/azurecluster-identity-ref.yaml +- ../bases/cluster-with-kcp.yaml +- ../bases/md.yaml +- ../bases/mp.yaml +- ../../../../../../templates/azure-cluster-identity/azure-cluster-identity.yaml +patches: +- path: ../../../../../../templates/azure-cluster-identity/azurecluster-identity-ref.yaml diff --git a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template/kustomization.yaml b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template/kustomization.yaml index 25b33489267..f4e4cd6714d 100644 --- a/test/e2e/data/infrastructure-azure/v1beta1/cluster-template/kustomization.yaml +++ b/test/e2e/data/infrastructure-azure/v1beta1/cluster-template/kustomization.yaml @@ -1,4 +1,6 @@ -bases: +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: - ../bases/cluster-with-kcp.yaml - ../bases/md.yaml - ../../../../../../templates/azure-cluster-identity/azure-cluster-identity.yaml @@ -6,8 +8,7 @@ bases: - ../../../../../../templates/addons/cluster-api-helm/azuredisk-csi-driver.yaml - ../../../../../../templates/addons/cluster-api-helm/cloud-provider-azure.yaml - ../../../../../../templates/addons/cluster-api-helm/cloud-provider-azure-ci.yaml - -patchesStrategicMerge: -- ../../../../../../templates/azure-cluster-identity/azurecluster-identity-ref.yaml -- ../../../../../../templates/test/ci/patches/cluster-label-calico.yaml -- ../../../../../../templates/test/ci/patches/cluster-label-cloud-provider-azure.yaml +patches: +- path: ../../../../../../templates/azure-cluster-identity/azurecluster-identity-ref.yaml +- path: ../../../../../../templates/test/ci/patches/cluster-label-calico.yaml +- path: ../../../../../../templates/test/ci/patches/cluster-label-cloud-provider-azure.yaml