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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
140 changes: 70 additions & 70 deletions config/aso/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,79 +7,79 @@ resources:
- 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
- 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

# 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
- 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
5 changes: 2 additions & 3 deletions config/capz/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: capz-system

namePrefix: capz-

# Labels to add to all resources and selectors.
Expand Down Expand Up @@ -51,7 +52,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 +79,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 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- certificate.yaml
- certificate.yaml
configurations:
- kustomizeconfig.yaml
- kustomizeconfig.yaml
133 changes: 67 additions & 66 deletions config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,79 +1,80 @@
# 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
# [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
# [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
- 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
38 changes: 20 additions & 18 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../capz
- ../capz

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

replacements:
- source:
kind: Deployment
name: capz-controller-manager
fieldPath: spec.template.spec.containers.[name=manager].image
options:
delimiter: ':'
index: 1
targets:
- select:
kind: Secret
name: aso-controller-settings
fieldPaths:
- stringData.AZURE_USER_AGENT_SUFFIX
options:
delimiter: '/'
index: 1
- source:
fieldPath: spec.template.spec.containers.[name=manager].image
kind: Deployment
name: capz-controller-manager
options:
delimiter: ':'
index: 1
targets:
- fieldPaths:
- stringData.AZURE_USER_AGENT_SUFFIX
options:
delimiter: /
index: 1
select:
kind: Secret
name: aso-controller-settings
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