Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 70 additions & 73 deletions config/aso/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 2 additions & 8 deletions config/capz/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -16,18 +15,15 @@ resources:
- ../manager
- ../webhook
- ../certmanager

patches:
- path: manager_image_patch.yaml
- path: manager_pull_policy.yaml
- path: manager_credentials_patch.yaml
- path: manager_webhook_patch.yaml
- path: validatingwebhookcainjection_patch.yaml
- path: mutatingwebhookcainjection_patch.yaml

configurations:
- kustomizeconfig.yaml

replacements:
- source: # CERTIFICATE_NAMESPACE
fieldPath: metadata.namespace
Expand All @@ -51,7 +47,6 @@ replacements:
index: 1
select:
annotationSelector: cert-manager.io/inject-ca-from

- source: # SERVICE_NAMESPACE
fieldPath: metadata.namespace
kind: Service
Expand Down Expand Up @@ -79,7 +74,6 @@ replacements:
name: serving-cert
namespace: system
version: v1

- source: # SERVICE_NAME
kind: Service
name: webhook-service
Expand Down
6 changes: 4 additions & 2 deletions config/certmanager/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
resources:
- certificate.yaml
- certificate.yaml
configurations:
- kustomizeconfig.yaml
- kustomizeconfig.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
136 changes: 67 additions & 69 deletions config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../capz

- ../capz
components:
- ../aso

replacements:
- source:
kind: Deployment
Expand Down
3 changes: 1 addition & 2 deletions config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- manager.yaml

- manager.yaml
10 changes: 5 additions & 5 deletions config/rbac/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -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
Loading