Skip to content

Commit

Permalink
feat(azure): adopt composition for azure
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Haar <[email protected]>
  • Loading branch information
haarchri committed Feb 29, 2024
1 parent 954bd25 commit 12cec68
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 12 deletions.
5 changes: 0 additions & 5 deletions apis/definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions apis/space-init/composition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 2 additions & 5 deletions crossplane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
3 changes: 3 additions & 0 deletions examples/aws-host-space.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
31 changes: 31 additions & 0 deletions examples/azure-host-space.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 12cec68

Please sign in to comment.