-
Notifications
You must be signed in to change notification settings - Fork 430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add ASO install #3450
add ASO install #3450
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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:=""} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just curious, is there a reason we want to add the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I admit this was a shameless copy-paste from here and didn't really consider whether it's necessary or not: cluster-api-provider-azure/config/default/credentials.yaml Lines 7 to 8 in fec6314
It looks like ASO will get stuck in a crash loop either way when the vars aren't defined, but with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the CAPZ manager credentials, the idea is that you can optionally define global credentials but it's also possible to define per Cluster credentials via AzureClusterIdentity, so we don't want the credentials to be required when installing CAPZ as they aren't actually required until you create your first cluster (without the defaulting to "", which is what There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So I think with |
||||||
AZURE_CLIENT_ID: ${AZURE_CLIENT_ID_B64:=""} | ||||||
AZURE_CLIENT_SECRET: ${AZURE_CLIENT_SECRET_B64:=""} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: do we want a line break at the end? Not sure if it's better to use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like that doesn't affect the output at all. |
||
$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 | ||
- patch: |- # remove permissions to manage CRDs | ||
$patch: delete | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: azureserviceoperator-crd-manager-role | ||
- patch: |- | ||
$patch: delete | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: azureserviceoperator-crd-manager-rolebinding | ||
|
||
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,2 @@ | ||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this temporary until we can use workload identity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking auth for ASO would essentially mirror the AzureClusterIdentity for the Cluster, which could also be Service Principal. Or would it make sense to always configure ASO to use workload identity? I still don't have a clear idea of exactly how workload identity works so I couldn't quite figure out how to get that set up based on the docs: https://azure.github.io/azure-service-operator/guide/authentication/#azure-workload-identity
I was also thinking having a default set of credentials here would make it easy for users to get started using ASO directly even if CAPZ can work around relying on the credentials here.