Skip to content

Commit

Permalink
chore: upgrade to spaces 1.3.0 (#7)
Browse files Browse the repository at this point in the history
* chore: upgrade to spaces 1.3.0

* bump uxp to v1.15.2-up.1

* bump configurations versions

* fix package versions and update e2e

* revert e2e fix

* rename examples to match official-providers-ci

* Revert "rename examples to match official-providers-ci"

This reverts commit 63e2b1b.

* hardcode examples in make command

* revert makefile e2e command

* use datasource for awsIamRole

* feat(render): change render in makefile, cleanup examples with datasource

Signed-off-by: Christopher Haar <[email protected]>

---------

Signed-off-by: Christopher Haar <[email protected]>
Co-authored-by: Christopher Haar <[email protected]>
  • Loading branch information
markandersontrocme and haarchri authored May 10, 2024
1 parent 54cf4a4 commit 1b262cb
Show file tree
Hide file tree
Showing 12 changed files with 65 additions and 31 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ init

*.xpkg
kubeconfig
examples/datasource.yaml
21 changes: 14 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PLATFORMS ?= linux_amd64
# ====================================================================================
# Setup Kubernetes tools

UP_VERSION = v0.24.1
UP_VERSION = v0.29.0
UP_CHANNEL = stable
UPTEST_VERSION = v0.11.1

Expand Down Expand Up @@ -75,12 +75,19 @@ uptest: $(UPTEST) $(KUBECTL) $(KUTTL)
e2e: build controlplane.up local.xpkg.deploy.configuration.$(PROJECT_NAME) uptest

render:
crossplane beta render examples/xr/aws-hostcluster.yaml apis/cluster/composition.yaml examples/functions.yaml -r
crossplane beta render examples/xr/azure-hostcluster.yaml apis/cluster/composition.yaml examples/functions.yaml -r
crossplane beta render examples/xr/gcp-hostcluster.yaml apis/cluster/composition.yaml examples/functions.yaml -r
crossplane beta render examples/xr/space-init.yaml apis/space-init/composition.yaml examples/functions.yaml -r
crossplane beta render examples/xr/space-core.yaml apis/space-core/composition.yaml examples/functions.yaml -r
crossplane beta render examples/aws-host-space.yaml apis/composition.yaml examples/functions.yaml -r
@indir="./examples"; \
for file in $$(find $$indir -type f -name '*.yaml' ); do \
doc_count=$$(grep -c '^---' "$$file"); \
if [[ $$doc_count -gt 0 ]]; then \
continue; \
fi; \
COMPOSITION=$$(yq eval '.metadata.annotations."render.crossplane.io/composition-path"' $$file); \
FUNCTION=$$(yq eval '.metadata.annotations."render.crossplane.io/function-path"' $$file); \
if [[ "$$COMPOSITION" == "null" || "$$FUNCTION" == "null" ]]; then \
continue; \
fi; \
crossplane beta render $$file $$COMPOSITION $$FUNCTION -x -r; \
done

yamllint:
@$(INFO) running yamllint
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
# platform-ref-upbound-spaces
# Upbound Spaces Reference Platform

This repository contains a reference Upbound Spaces Configuration for
[Crossplane](https://www.crossplane.io/). It's a great starting point for
building a self hosted spaces cluster in AWS, GCP, or Azure.

This platform offers APIs for setting up a fully configured Upbound Spaces
cluster in your cloud provider of choice, with managed kubernetes secure
networking, and a GitOps System.
4 changes: 2 additions & 2 deletions apis/composition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
apiVersion: pt.fn.crossplane.io/v1beta1
kind: Resources
resources:
- name: aws-kubernetes-cluster
- name: managed-kubernetes-cluster
base:
apiVersion: spaces.platformref.upbound.io/v1alpha1
kind: XCluster
Expand Down Expand Up @@ -166,7 +166,7 @@ spec:
kind: Input
rules:
- sequence:
- aws-kubernetes-cluster
- managed-kubernetes-cluster
- spaces-init
- sequence:
- spaces-init
Expand Down
10 changes: 5 additions & 5 deletions apis/definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ spec:
version: "6.34.2"
crossplane:
enabled: true
version: "v1.14.6-up.1"
version: "v1.15.2-up.1"
providers: []
properties:
argocd:
Expand Down Expand Up @@ -208,7 +208,7 @@ spec:
type: object
default:
enabled: true
version: "v1.14.6-up.1"
version: "v1.15.2-up.1"
providers: []
properties:
enabled:
Expand All @@ -218,7 +218,7 @@ spec:
version:
type: string
description: "Specifies the version of Crossplane to use."
default: "v1.14.6-up.1"
default: "v1.15.2-up.1"
providers:
type: array
items:
Expand All @@ -245,7 +245,7 @@ spec:
type: object
description: "Defines the configuration for spaces."
default:
version: "1.2.3"
version: "1.3.0"
account: ""
clusterType: ""
dns:
Expand All @@ -257,7 +257,7 @@ spec:
version:
type: string
description: "The version of the space configuration."
default: "1.2.3"
default: "1.3.0"
dns:
type: object
properties:
Expand Down
18 changes: 9 additions & 9 deletions crossplane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,30 @@ spec:
dependsOn:
- configuration: xpkg.upbound.io/upbound/configuration-aws-network
# renovate: datasource=github-releases depName=upbound/configuration-aws-network
version: "v0.11.0"
version: "v0.12.0"
- configuration: xpkg.upbound.io/upbound/configuration-aws-eks
# renovate: datasource=github-releases depName=upbound/configuration-aws-eks
version: "v0.9.0"
version: "v0.11.0"
- configuration: xpkg.upbound.io/upbound/configuration-azure-network
# renovate: datasource=github-releases depName=upbound/configuration-azure-network
version: "v0.7.0"
version: "v0.8.0"
- configuration: xpkg.upbound.io/upbound/configuration-azure-aks
# renovate: datasource=github-releases depName=upbound/configuration-azure-aks
version: "v0.6.0"
version: "v0.7.0"
- configuration: xpkg.upbound.io/upbound/configuration-gcp-network
# renovate: datasource=github-releases depName=upbound/configuration-gcp-network
version: "v0.3.0"
version: "v0.5.0"
- configuration: xpkg.upbound.io/upbound/configuration-gcp-gke
# renovate: datasource=github-releases depName=upbound/configuration-gcp-gke
version: "v0.3.0"
version: "v0.5.0"
- configuration: xpkg.upbound.io/upbound/configuration-gitops-argocd
# renovate: datasource=github-releases depName=upbound/configuration-gitops-argocd
version: "v0.6.0"
version: "v0.8.0"
- function: xpkg.upbound.io/upboundcare/function-conditional-patch-and-transform
version: "v0.4.0"
- function: xpkg.upbound.io/crossplane-contrib/function-patch-and-transform
# renovate: datasource=github-releases depName=crossplane-contrib/function-patch-and-transform
version: "v0.3.0"
version: "v0.4.0"
- function: xpkg.upbound.io/crossplane-contrib/function-auto-ready
# renovate: datasource=github-releases depName=crossplane-contrib/function-auto-ready
version: "v0.2.1"
Expand All @@ -46,4 +46,4 @@ spec:
version: "v0.4.1"
- function: xpkg.upbound.io/crossplane-contrib/function-sequencer
# renovate: datasource=github-releases depName=crossplane-contrib/function-sequencer
version: "v0.1.0"
version: "v0.1.2"
5 changes: 4 additions & 1 deletion examples/aws-host-space.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ kind: Space
metadata:
name: hostcluster
namespace: default
annotations:
render.crossplane.io/composition-path: apis/composition.yaml
render.crossplane.io/function-path: examples/functions.yaml
spec:
compositeDeletePolicy: Foreground
parameters:
Expand All @@ -21,7 +24,7 @@ spec:
# arn:aws:iam::123456789:role/aws-reserved/sso.amazonaws.com/AWSReservedSSO_AdministratorAccess_d703c73ed340fde7
# To this:
# arn:aws:iam::123456789:role/AWSReservedSSO_AdministratorAccess_d703c73ed340fde7
roleArn: arn:aws:iam::123456789:role/AWSReservedSSO_AdministratorAccess_d703c73ed340fde7
roleArn: ${data.awsAdminRoleArn}
operators:
externaldns:
aws:
Expand Down
5 changes: 4 additions & 1 deletion examples/xr/aws-hostcluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ kind: Cluster
metadata:
name: aws-spaces-hostcluster
namespace: default
annotations:
render.crossplane.io/composition-path: apis/cluster/composition.yaml
render.crossplane.io/function-path: examples/functions.yaml
spec:
compositeDeletePolicy: Foreground
parameters:
Expand All @@ -19,7 +22,7 @@ spec:
# To this:
# arn:aws:iam::123456789:role/AWSReservedSSO_AdministratorAccess_d703c73ed340fde7
# roleArn: arn:aws:iam::123456789:role/AWSReservedSSO_AdministratorAccess_d703c73ed340fde7
roleArn: arn:aws:iam::609897127049:role/AWSReservedSSO_AdministratorAccess_d703c73ed340fde7
roleArn: ${data.awsAdminRoleArn}
nodes:
count: 5
instanceType: m5.2xlarge
Expand Down
3 changes: 3 additions & 0 deletions examples/xr/azure-hostcluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ kind: Cluster
metadata:
name: azure-spaces-hostcluster
namespace: default
annotations:
render.crossplane.io/composition-path: apis/cluster/composition.yaml
render.crossplane.io/function-path: examples/functions.yaml
spec:
compositeDeletePolicy: Foreground
parameters:
Expand Down
3 changes: 3 additions & 0 deletions examples/xr/gcp-hostcluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ kind: Cluster
metadata:
name: gcp-spaces-hostcluster
namespace: default
annotations:
render.crossplane.io/composition-path: apis/cluster/composition.yaml
render.crossplane.io/function-path: examples/functions.yaml
spec:
compositeDeletePolicy: Foreground
parameters:
Expand Down
7 changes: 5 additions & 2 deletions examples/xr/space-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ apiVersion: spaces.platformref.upbound.io/v1alpha1
kind: XCore
metadata:
name: space-base
annotations:
render.crossplane.io/composition-path: apis/space-core/composition.yaml
render.crossplane.io/function-path: examples/functions.yaml
spec:
parameters:
providerConfigName: aws-spaces-hostcluster
spaces:
version: 1.2.1
version: 1.3.0
dns:
spacesRouterDomain: platform-ref-upbound-spaces.upboundrocks.cloud
spacesRouterDomain: platform-ref-upbound-spaces.${data.route53ZoneName}
clusterType: eks
account: platform-ref
pullSecretRef:
Expand Down
9 changes: 6 additions & 3 deletions examples/xr/space-init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ apiVersion: spaces.platformref.upbound.io/v1alpha1
kind: XInit
metadata:
name: space-base
annotations:
render.crossplane.io/composition-path: apis/space-init/composition.yaml
render.crossplane.io/function-path: examples/functions.yaml
spec:
parameters:
providerConfigName: aws-spaces-hostcluster
Expand All @@ -15,12 +18,12 @@ spec:
externaldns:
aws:
enabled: true
route53ZoneId: Z0115025YFQ7ZQF6BJ6N
route53ZoneName: upboundrocks.cloud
route53ZoneId: ${data.route53ZoneId}
route53ZoneName: ${data.route53ZoneName}
version: "6.34.2"
crossplane:
enabled: true
version: v1.14.6-up.1
version: v1.15.2-up.1
providers:
- name: provider-helm
package: xpkg.upbound.io/crossplane-contrib/provider-helm:v0.17.0
Expand Down

0 comments on commit 1b262cb

Please sign in to comment.