From 12cec6859d4e39265b56681f422d8f50997c29f9 Mon Sep 17 00:00:00 2001 From: Christopher Haar Date: Thu, 29 Feb 2024 09:58:02 +0100 Subject: [PATCH] feat(azure): adopt composition for azure Signed-off-by: Christopher Haar --- apis/definition.yaml | 5 ----- apis/space-init/composition.yaml | 10 ++++++++-- crossplane.yaml | 7 ++----- examples/aws-host-space.yaml | 3 +++ examples/azure-host-space.yaml | 31 +++++++++++++++++++++++++++++++ 5 files changed, 44 insertions(+), 12 deletions(-) create mode 100644 examples/azure-host-space.yaml diff --git a/apis/definition.yaml b/apis/definition.yaml index cd79d42..83aa364 100644 --- a/apis/definition.yaml +++ b/apis/definition.yaml @@ -81,18 +81,13 @@ spec: nodes: type: object description: Cluster node configuration parameters. - default: - count: 5 - instanceType: m5.2xlarge properties: count: type: integer description: Desired node count, from 1 to 100. - default: 5 instanceType: type: string description: instance types associated with the Node Group. - default: m5.2xlarge required: - count - instanceType diff --git a/apis/space-init/composition.yaml b/apis/space-init/composition.yaml index 8de4cba..bbada2e 100644 --- a/apis/space-init/composition.yaml +++ b/apis/space-init/composition.yaml @@ -325,7 +325,10 @@ spec: fromFieldPath: Optional - name: external-dns-irsa - condition: observed.composite.resource.spec.parameters.operators.externaldns.aws.enabled == true + condition: | + "externaldns" in observed.composite.resource.spec.parameters.operators && + "aws" in observed.composite.resource.spec.parameters.operators.externaldns && + observed.composite.resource.spec.parameters.operators.externaldns.aws.enabled == true base: apiVersion: aws.platform.upbound.io/v1alpha1 kind: XIRSA @@ -374,7 +377,10 @@ spec: toFieldPath: spec.parameters.policyDocument - name: external-dns - condition: observed.composite.resource.spec.parameters.operators.externaldns.aws.enabled == true + condition: | + "externaldns" in observed.composite.resource.spec.parameters.operators && + "aws" in observed.composite.resource.spec.parameters.operators.externaldns && + observed.composite.resource.spec.parameters.operators.externaldns.aws.enabled == true base: apiVersion: helm.crossplane.io/v1beta1 kind: Release diff --git a/crossplane.yaml b/crossplane.yaml index f7b99cc..d086e0c 100644 --- a/crossplane.yaml +++ b/crossplane.yaml @@ -20,10 +20,10 @@ spec: version: "v0.9.0" - configuration: xpkg.upbound.io/upbound/configuration-azure-network # renovate: datasource=github-releases depName=upbound/configuration-azure-network - version: "v0.6.0" + version: "v0.7.0" - configuration: xpkg.upbound.io/upbound/configuration-azure-aks # renovate: datasource=github-releases depName=upbound/configuration-azure-aks - version: "v0.5.0" + version: "v0.6.0" - configuration: xpkg.upbound.io/upbound/configuration-gcp-network # renovate: datasource=github-releases depName=upbound/configuration-gcp-network version: "v0.3.0" @@ -44,6 +44,3 @@ spec: - function: xpkg.upbound.io/crossplane-contrib/function-sequencer # renovate: datasource=github-releases depName=crossplane-contrib/function-sequencer version: "v0.1.0" - - provider: xpkg.upbound.io/upbound/provider-aws-elb - # renovate: datasource=github-releases depName=upbound/provider-aws - version: "v1.1.0" diff --git a/examples/aws-host-space.yaml b/examples/aws-host-space.yaml index cccd5be..d6e7214 100644 --- a/examples/aws-host-space.yaml +++ b/examples/aws-host-space.yaml @@ -10,6 +10,9 @@ spec: id: hostcluster region: us-west-2 version: "1.27" + nodes: + count: 5 + instanceType: m5.2xlarge iam: # Important: Please specify an iamRoleArn to access the AWS EKS Cluster deployed as part of CNOE. # Without specifying a valid roleArn, you will not be able to log in to the EKS cluster. diff --git a/examples/azure-host-space.yaml b/examples/azure-host-space.yaml new file mode 100644 index 0000000..6185652 --- /dev/null +++ b/examples/azure-host-space.yaml @@ -0,0 +1,31 @@ +apiVersion: spaces.platformref.upbound.io/v1alpha1 +kind: Space +metadata: + name: hostcluster-aks + namespace: default +spec: + compositeDeletePolicy: Foreground + parameters: + cloud: azure + id: hostcluster-aks + region: westus + version: "1.28" + nodes: + count: 1 + instanceType: standard_d8s_v3 + operators: + crossplane: + providers: + - name: provider-helm + package: xpkg.upbound.io/crossplane-contrib/provider-helm:v0.17.0 + localRbac: true + - name: provider-kubernetes + package: xpkg.upbound.io/crossplane-contrib/provider-kubernetes:v0.12.1 + localRbac: true + spaces: + dns: + spacesRouterDomain: platform-ref-upbound-spaces-aks.upboundrocks.cloud + clusterType: aks + account: platform-ref + writeConnectionSecretToRef: + name: hostcluster-aks-kubeconfig