Skip to content

Commit

Permalink
add ASO install
Browse files Browse the repository at this point in the history
  • Loading branch information
nojnhuh committed Apr 24, 2023
1 parent 7fbd4c0 commit fe9d16a
Show file tree
Hide file tree
Showing 14 changed files with 117 additions and 52 deletions.
10 changes: 10 additions & 0 deletions config/aso/credentials.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: Secret
metadata:
name: aso-controller-settings
type: Opaque
data:
AZURE_SUBSCRIPTION_ID: ${AZURE_SUBSCRIPTION_ID_B64:=""}
AZURE_TENANT_ID: ${AZURE_TENANT_ID_B64:=""}
AZURE_CLIENT_ID: ${AZURE_CLIENT_ID_B64:=""}
AZURE_CLIENT_SECRET: ${AZURE_CLIENT_SECRET_B64:=""}
53 changes: 53 additions & 0 deletions config/aso/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
namespace: capz-system
resources:
- https://github.com/Azure/azure-service-operator/releases/download/v2.0.0/azureserviceoperator_v2.0.0.yaml
- https://github.com/Azure/azure-service-operator/releases/download/v2.0.0/azureserviceoperator_customresourcedefinitions_v2.0.0.yaml
- credentials.yaml

patches:
- patch: |- # default kustomization includes a namespace already
$patch: delete
apiVersion: v1
kind: Namespace
metadata:
name: capz-system
- patch: |- # CAPZ will manage ASO's CRDs
- op: test
path: /spec/template/spec/containers/0/args/4
value: --crd-pattern=*
- op: remove
path: /spec/template/spec/containers/0/args/4
target:
group: apps
version: v1
kind: Deployment
name: azureserviceoperator-controller-manager
replacements:
- source:
kind: Certificate
group: cert-manager.io
version: v1
name: azureserviceoperator-serving-cert
fieldPath: metadata.namespace
targets:
- select:
version: v1
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
File renamed without changes.
53 changes: 53 additions & 0 deletions config/capz/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
namespace: capz-system

namePrefix: capz-

resources:
- namespace.yaml
- credentials.yaml
- aad-pod-identity-deployment.yaml

bases:
- ../crd
- ../rbac
- ../manager
- ../webhook
- ../certmanager

patchesStrategicMerge:
- manager_image_patch.yaml
- manager_pull_policy.yaml
- manager_credentials_patch.yaml
- manager_webhook_patch.yaml
- webhookcainjection_patch.yaml

vars:
- name: CERTIFICATE_NAMESPACE # namespace of the certificate CR
objref:
kind: Certificate
group: cert-manager.io
version: v1
name: serving-cert # this name should match the one in certificate.yaml
fieldref:
fieldpath: metadata.namespace
- name: CERTIFICATE_NAME
objref:
kind: Certificate
group: cert-manager.io
version: v1
name: serving-cert # this name should match the one in certificate.yaml
- name: SERVICE_NAMESPACE # namespace of the service
objref:
kind: Service
version: v1
name: webhook-service
fieldref:
fieldpath: metadata.namespace
- name: SERVICE_NAME
objref:
kind: Service
version: v1
name: webhook-service

configurations:
- kustomizeconfig.yaml
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
53 changes: 1 addition & 52 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,57 +1,6 @@
namespace: capz-system

namePrefix: capz-

# Labels to add to all resources and selectors.
commonLabels:
cluster.x-k8s.io/provider: "infrastructure-azure"

resources:
- namespace.yaml
- credentials.yaml
- aad-pod-identity-deployment.yaml

bases:
- ../crd
- ../rbac
- ../manager
- ../webhook
- ../certmanager

patchesStrategicMerge:
- manager_image_patch.yaml
- manager_pull_policy.yaml
- manager_credentials_patch.yaml
- manager_webhook_patch.yaml
- webhookcainjection_patch.yaml

vars:
- name: CERTIFICATE_NAMESPACE # namespace of the certificate CR
objref:
kind: Certificate
group: cert-manager.io
version: v1
name: serving-cert # this name should match the one in certificate.yaml
fieldref:
fieldpath: metadata.namespace
- name: CERTIFICATE_NAME
objref:
kind: Certificate
group: cert-manager.io
version: v1
name: serving-cert # this name should match the one in certificate.yaml
- name: SERVICE_NAMESPACE # namespace of the service
objref:
kind: Service
version: v1
name: webhook-service
fieldref:
fieldpath: metadata.namespace
- name: SERVICE_NAME
objref:
kind: Service
version: v1
name: webhook-service

configurations:
- kustomizeconfig.yaml
- ../capz

0 comments on commit fe9d16a

Please sign in to comment.