From 670b24b75a18751c6d822e854c3bcdc0a1c59523 Mon Sep 17 00:00:00 2001 From: Christopher Haar Date: Fri, 5 Jan 2024 10:24:40 +0100 Subject: [PATCH] feat(split): split services and switch to oss and gitops flux configurations Signed-off-by: Christopher Haar --- .github/renovate.json5 | 42 +++ .github/workflows/yamllint.yaml | 15 + .yamllint | 5 + Makefile | 11 +- apis/cluster/aks/composition.yaml | 40 ++- apis/cluster/aks/definition.yaml | 140 ++++----- apis/cluster/composition.yaml | 77 +++-- apis/cluster/definition.yaml | 283 ++++++++++-------- apis/cluster/services/definition.yaml | 84 ------ apis/cluster/services/flux/composition.yaml | 98 ------ .../services/prometheus/composition.yaml | 45 --- crossplane.yaml | 22 +- examples/cluster-claim.yaml | 9 + test/setup.sh | 1 + 14 files changed, 408 insertions(+), 464 deletions(-) create mode 100644 .github/renovate.json5 create mode 100644 .github/workflows/yamllint.yaml create mode 100644 .yamllint delete mode 100644 apis/cluster/services/definition.yaml delete mode 100644 apis/cluster/services/flux/composition.yaml delete mode 100644 apis/cluster/services/prometheus/composition.yaml diff --git a/.github/renovate.json5 b/.github/renovate.json5 new file mode 100644 index 0000000..f43c59f --- /dev/null +++ b/.github/renovate.json5 @@ -0,0 +1,42 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended", + "helpers:pinGitHubActionDigests", + ":semanticCommits" + ], + "rebaseWhen": "conflicted", + "prConcurrentLimit": 5, + "baseBranches": ["main"], + "labels": ["automated"], + "customManagers": [ + { + "customType": "regex", + "description": "Bump up version in the Makefile", + "fileMatch": ["^Makefile$"], + "matchStrings": [ + "UP_VERSION = (?.*?)\\n" + ], + "datasourceTemplate": "github-releases", + "depNameTemplate": "upbound/up", + }, { + "customType": "regex", + "description": "Bump uptest version in the Makefile", + "fileMatch": ["^Makefile$"], + "matchStrings": [ + "UPTEST_VERSION = (?.*?)\\n" + ], + "datasourceTemplate": "github-releases", + "depNameTemplate": "upbound/uptest", + }, { + "customType": "regex", + "description": "Bump providers/functions/configurations in crossplane.yaml", + "fileMatch": ["crossplane.yaml"], + "matchStrings": [ + "#\\s*renovate:\\s*datasource=(?[^\\s]+)\\s+depName=(?[^\\s]+)\\s*\\n\\s*version:\\s*\"(?[^\"]+)\"" + ], + "datasourceTemplate": "{{{datasource}}}", + "depNameTemplate": "{{{depName}}}", + } + ], +} diff --git a/.github/workflows/yamllint.yaml b/.github/workflows/yamllint.yaml new file mode 100644 index 0000000..16a78d3 --- /dev/null +++ b/.github/workflows/yamllint.yaml @@ -0,0 +1,15 @@ +name: yamllint +on: [pull_request] +jobs: + yamllint: + name: runner / yamllint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: yamllint + uses: reviewdog/action-yamllint@v1.9.0 + with: + reporter: github-pr-review + filter_mode: nofilter + yamllint_flags: 'apis/' + fail_on_error: true diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..de7998c --- /dev/null +++ b/.yamllint @@ -0,0 +1,5 @@ +extends: default + +rules: + line-length: disable + document-start: disable \ No newline at end of file diff --git a/Makefile b/Makefile index 7798d70..4f2954f 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ PLATFORMS ?= linux_amd64 UP_VERSION = v0.21.0 UP_CHANNEL = stable -UPTEST_VERSION = v0.6.1 +UPTEST_VERSION = v0.9.0 -include build/makelib/k8s_tools.mk # ==================================================================================== @@ -62,11 +62,16 @@ build.init: $(UP) # - UPTEST_CLOUD_CREDENTIALS, cloud credentials for the provider being tested, e.g. export UPTEST_CLOUD_CREDENTIALS=$(cat azure.json) uptest: $(UPTEST) $(KUBECTL) $(KUTTL) @$(INFO) running automated tests - @KUBECTL=$(KUBECTL) KUTTL=$(KUTTL) $(UPTEST) e2e examples/cluster-claim.yaml,examples/postgres-claim.yaml,examples/mariadb-claim.yaml,examples/app-claim.yaml --setup-script=test/setup.sh --default-timeout=2400 || $(FAIL) + @KUBECTL=$(KUBECTL) KUTTL=$(KUTTL) CROSSPLANE_NAMESPACE=$(CROSSPLANE_NAMESPACE) $(UPTEST) e2e examples/cluster-claim.yaml,examples/postgres-claim.yaml,examples/mariadb-claim.yaml,examples/app-claim.yaml --setup-script=test/setup.sh --default-timeout=2400 || $(FAIL) @$(OK) running automated tests # This target requires the following environment variables to be set: # - UPTEST_CLOUD_CREDENTIALS, cloud credentials for the provider being tested, e.g. export UPTEST_CLOUD_CREDENTIALS=$(cat azure.json) e2e: build controlplane.up local.xpkg.deploy.configuration.$(PROJECT_NAME) uptest -.PHONY: uptest e2e +yamllint: + @$(INFO) running yamllint + @yamllint ./apis || $(FAIL) + @$(OK) running yamllint + +.PHONY: uptest e2e yamllint diff --git a/apis/cluster/aks/composition.yaml b/apis/cluster/aks/composition.yaml index 50b4988..040635f 100644 --- a/apis/cluster/aks/composition.yaml +++ b/apis/cluster/aks/composition.yaml @@ -47,9 +47,9 @@ spec: - fromFieldPath: spec.parameters.id toFieldPath: metadata.name transforms: - - type: string - string: - fmt: "%s-aks" + - type: string + string: + fmt: "%s-aks" - fromFieldPath: spec.parameters.id toFieldPath: spec.forProvider.resourceGroupNameSelector.matchLabels[azure.platform.upbound.io/network-id] - fromFieldPath: spec.parameters.id @@ -65,9 +65,9 @@ spec: - fromFieldPath: metadata.uid toFieldPath: spec.writeConnectionSecretToRef.name transforms: - - type: string - string: - fmt: "%s-akscluster" + - type: string + string: + fmt: "%s-akscluster" connectionDetails: - fromConnectionSecretKey: kubeconfig - name: providerConfigHelm @@ -87,8 +87,30 @@ spec: - fromFieldPath: metadata.uid toFieldPath: spec.credentials.secretRef.name transforms: - - type: string - string: - fmt: "%s-akscluster" + - type: string + string: + fmt: "%s-akscluster" + readinessChecks: + - type: None + - name: providerConfigKubernetes + base: + apiVersion: kubernetes.crossplane.io/v1alpha1 + kind: ProviderConfig + spec: + credentials: + source: Secret + secretRef: + key: kubeconfig + patches: + - fromFieldPath: spec.parameters.id + toFieldPath: metadata.name + - fromFieldPath: spec.writeConnectionSecretToRef.namespace + toFieldPath: spec.credentials.secretRef.namespace + - fromFieldPath: metadata.uid + toFieldPath: spec.credentials.secretRef.name + transforms: + - type: string + string: + fmt: "%s-akscluster" readinessChecks: - type: None diff --git a/apis/cluster/aks/definition.yaml b/apis/cluster/aks/definition.yaml index 1069b2a..d1632d8 100644 --- a/apis/cluster/aks/definition.yaml +++ b/apis/cluster/aks/definition.yaml @@ -8,74 +8,74 @@ spec: kind: XAKS plural: xaks connectionSecretKeys: - - kubeconfig + - kubeconfig versions: - - name: v1alpha1 - served: true - referenceable: true - schema: - openAPIV3Schema: - type: object - properties: - spec: - type: object - properties: - parameters: - type: object - description: AKS configuration parameters. - properties: - id: - type: string - description: ID of this Cluster that other objects will use to refer to it. - region: - type: string - description: Region is the region you'd like your resource to be created in. - deletionPolicy: - description: Delete the external resources when the Claim/XR is deleted. Defaults to Delete - enum: - - Delete - - Orphan - type: string - default: Delete - providerConfigName: - description: Crossplane ProviderConfig to use for provisioning this resources - type: string - default: default - version: - description: Kubernetes version - type: string - enum: - - "1.27.3" - - "1.26.6" - - "1.25.11" - default: "1.27.3" - nodes: - type: object - description: AKS node configuration parameters. - properties: - count: - type: integer - description: Desired node count - instanceType: - type: string - description: instance types associated with the Node Group. - default: Standard_B2s - required: - - count - - instanceType - required: - - id - - region - - deletionPolicy - - providerConfigName - - nodes - required: - - parameters - status: - description: A Status represents the observed state - properties: - aks: - description: Freeform field containing status information for aks - type: object - x-kubernetes-preserve-unknown-fields: true - type: object + - name: v1alpha1 + served: true + referenceable: true + schema: + openAPIV3Schema: + type: object + properties: + spec: + type: object + properties: + parameters: + type: object + description: AKS configuration parameters. + properties: + id: + type: string + description: ID of this Cluster that other objects will use to refer to it. + region: + type: string + description: Region is the region you'd like your resource to be created in. + deletionPolicy: + description: Delete the external resources when the Claim/XR is deleted. Defaults to Delete + enum: + - Delete + - Orphan + type: string + default: Delete + providerConfigName: + description: Crossplane ProviderConfig to use for provisioning this resources + type: string + default: default + version: + description: Kubernetes version + type: string + enum: + - "1.27.3" + - "1.26.6" + - "1.25.11" + default: "1.27.3" + nodes: + type: object + description: AKS node configuration parameters. + properties: + count: + type: integer + description: Desired node count + instanceType: + type: string + description: instance types associated with the Node Group. + default: Standard_B2s + required: + - count + - instanceType + required: + - id + - region + - deletionPolicy + - providerConfigName + - nodes + required: + - parameters + status: + description: A Status represents the observed state + properties: + aks: + description: Freeform field containing status information for aks + type: object + x-kubernetes-preserve-unknown-fields: true + type: object diff --git a/apis/cluster/composition.yaml b/apis/cluster/composition.yaml index e6b471b..e47c78c 100644 --- a/apis/cluster/composition.yaml +++ b/apis/cluster/composition.yaml @@ -54,43 +54,72 @@ spec: toFieldPath: spec.parameters.nodes.count - fromFieldPath: spec.parameters.nodes.instanceType toFieldPath: spec.parameters.nodes.instanceType - - name: compositeClusterServices + + - name: XOss base: - apiVersion: azure.platformref.upbound.io/v1alpha1 - kind: XServices + apiVersion: observe.platform.upbound.io/v1alpha1 + kind: XOss patches: - - fromFieldPath: spec.parameters.deletionPolicy - toFieldPath: spec.deletionPolicy - - fromFieldPath: spec.parameters.id - toFieldPath: spec.providerConfigRef.name - - fromFieldPath: spec.parameters.services.operators.flux.version - toFieldPath: spec.operators.flux.version - - fromFieldPath: spec.parameters.services.operators.prometheus.version - toFieldPath: spec.operators.prometheus.version - - fromFieldPath: spec.parameters.gitops.url - toFieldPath: spec.gitops.url - - fromFieldPath: spec.parameters.gitops.path - toFieldPath: spec.gitops.path - - fromFieldPath: spec.parameters.gitops.kubeConfigSecretRef.name - toFieldPath: spec.gitops.kubeConfigSecretRef.name - - fromFieldPath: spec.parameters.gitops.kubeConfigSecretRef.namespace - toFieldPath: spec.gitops.kubeConfigSecretRef.namespace - - fromFieldPath: spec.parameters.serviceSelector - toFieldPath: spec.compositionSelector.matchLabels[type] + - type: FromCompositeFieldPath + fromFieldPath: spec.parameters.deletionPolicy + toFieldPath: spec.parameters.deletionPolicy + - type: FromCompositeFieldPath + fromFieldPath: spec.parameters.id + toFieldPath: spec.parameters.id + - type: FromCompositeFieldPath + fromFieldPath: spec.parameters.operators.prometheus.version + toFieldPath: spec.parameters.operators.prometheus.version - - name: usageXAksByXService + - name: XFlux + base: + apiVersion: gitops.platform.upbound.io/v1alpha1 + kind: XFlux + patches: + - type: FromCompositeFieldPath + fromFieldPath: spec.parameters.deletionPolicy + toFieldPath: spec.parameters.deletionPolicy + - type: FromCompositeFieldPath + fromFieldPath: spec.parameters.id + toFieldPath: spec.parameters.providerConfigName + - type: FromCompositeFieldPath + fromFieldPath: spec.parameters.operators.flux.version + toFieldPath: spec.parameters.operators.flux.version + - type: FromCompositeFieldPath + fromFieldPath: spec.parameters.operators.flux-sync.version + toFieldPath: spec.parameters.operators.flux-sync.version + - type: FromCompositeFieldPath + fromFieldPath: spec.parameters.gitops + toFieldPath: spec.parameters.source + + - name: usageXEksByXFlux base: apiVersion: apiextensions.crossplane.io/v1alpha1 kind: Usage spec: + by: + apiVersion: gitops.platform.upbound.io/v1alpha1 + kind: XFlux + resourceSelector: + matchControllerRef: true of: apiVersion: azure.platformref.upbound.io/v1alpha1 kind: XAKS resourceSelector: matchControllerRef: true + + - name: usageXEksByXOss + base: + apiVersion: apiextensions.crossplane.io/v1alpha1 + kind: Usage + spec: by: + apiVersion: observe.platform.upbound.io/v1alpha1 + kind: XOss + resourceSelector: + matchControllerRef: true + of: apiVersion: azure.platformref.upbound.io/v1alpha1 - kind: XServices + kind: XAKS resourceSelector: matchControllerRef: true @@ -100,7 +129,7 @@ spec: kind: Usage spec: of: - apiVersion: aws.platform.upbound.io/v1alpha1 + apiVersion: azure.platformref.upbound.io/v1alpha1 kind: XAKS resourceSelector: matchControllerRef: true diff --git a/apis/cluster/definition.yaml b/apis/cluster/definition.yaml index 1a5d3a4..330bc47 100644 --- a/apis/cluster/definition.yaml +++ b/apis/cluster/definition.yaml @@ -16,128 +16,163 @@ spec: kind: Cluster plural: clusters connectionSecretKeys: - - kubeconfig + - kubeconfig versions: - - name: v1alpha1 - served: true - referenceable: true - schema: - openAPIV3Schema: - type: object - properties: - spec: - type: object - properties: - parameters: - type: object - description: Cluster configuration parameters. - properties: - id: - type: string - description: ID of this Cluster that other objects will use to refer to it. - region: - type: string - description: Region is the region you'd like your resource to be created in. - networkSelector: - type: string - description: NetworkSelector employs a specific type of network architecture. - enum: - - basic - default: basic - serviceSelector: - type: string - description: ServiceSelector employs a specific type of service architecture. - enum: - - default - - gitops - default: default - deletionPolicy: - description: Delete the external resources when the Claim/XR is deleted. Defaults to Delete - enum: - - Delete - - Orphan - type: string - default: Delete - providerConfigName: - description: Crossplane ProviderConfig to use for provisioning this resources - type: string - default: default - version: - type: string - description: Kubernetes version of the Cluster - enum: - - "1.27.3" - - "1.26.6" - - "1.25.11" - default: "1.27.3" - nodes: - type: object - description: Cluster node configuration parameters. - properties: - count: - type: integer - description: Desired node count, from 1 to 100. - instanceType: - type: string - description: instance types associated with the Node Group. - default: Standard_B2s - required: - - count - - instanceType - gitops: - type: object - description: GitOps configure gitops system - properties: - url: - type: string - description: Url for GitOps Sync. - path: - type: string - description: path in Repo for GitOps Sync. - kubeConfigSecretRef: - type: object - description: location for kubeconfig - properties: - name: - type: string - description: Name of the secret. - namespace: - type: string - description: Namespace of the secret. - required: - - name - - namespace - required: - - url - services: - type: object - description: Services configuration parameters. - properties: - operators: - type: object - description: Configuration for operators. - properties: - flux: - type: object - description: Configuration for the Flux GitOps operator. - properties: - version: - type: string - description: Flux operator version to run. - default: "2.9.2" - prometheus: - type: object - description: Configuration for the Prometheus operator. - properties: - version: - type: string - description: Prometheus operator version to run. - default: "41.4.1" - required: - - nodes - - id - - region - - deletionPolicy - - providerConfigName - required: - - parameters + - name: v1alpha1 + served: true + referenceable: true + schema: + openAPIV3Schema: + type: object + properties: + spec: + type: object + properties: + parameters: + type: object + description: Cluster configuration parameters. + properties: + id: + type: string + description: ID of this Cluster that other objects will use to refer to it. + region: + type: string + description: Region is the region you'd like your resource to be created in. + networkSelector: + type: string + description: NetworkSelector employs a specific type of network architecture. + enum: + - basic + default: basic + deletionPolicy: + description: Delete the external resources when the Claim/XR is deleted. Defaults to Delete + enum: + - Delete + - Orphan + type: string + default: Delete + providerConfigName: + description: Crossplane ProviderConfig to use for provisioning this resources + type: string + default: default + version: + type: string + description: Kubernetes version of the Cluster + enum: + - "1.27.3" + - "1.26.6" + - "1.25.11" + default: "1.27.3" + nodes: + type: object + description: Cluster node configuration parameters. + properties: + count: + type: integer + description: Desired node count, from 1 to 100. + instanceType: + type: string + description: instance types associated with the Node Group. + default: Standard_B2s + required: + - count + - instanceType + operators: + description: Configuration for operators. + type: object + default: + flux: + version: "2.10.6" + flux-sync: + version: "1.7.2" + prometheus: + version: "52.1.0" + properties: + flux: + description: Configuration for the Flux GitOps operator. + type: object + properties: + version: + description: flux helm-chart version to run. + type: string + default: "2.10.6" + required: + - version + flux-sync: + description: Configuration for the Flux Sync Helm-Chart. + type: object + properties: + version: + description: flux sync helm-chart version to run. + type: string + default: "1.7.2" + required: + - version + prometheus: + description: Configuration for the Prometheus Helm-Chart. + type: object + properties: + version: + description: prometheus helm-chart version to run. + type: string + default: "52.1.0" + required: + - version + gitops: + description: GitOps configure gitops system + type: object + properties: + git: + type: object + properties: + interval: + default: "5m0s" + description: Interval at which the GitRepository URL is checked for + updates. This interval is approximate and may be subject to jitter + to ensure efficient use of resources. + pattern: ^([0-9]+(\.[0-9]+)?(ms|s|m|h))+$ + type: string + timeout: + default: "60s" + description: Timeout for Git operations like cloning, defaults to + 60s. + pattern: ^([0-9]+(\.[0-9]+)?(ms|s|m))+$ + type: string + url: + description: URL specifies the Git repository URL, it can be an HTTP/S + or SSH address. + pattern: ^(http|https|ssh)://.*$ + type: string + path: + type: string + default: "/" + ref: + description: Reference specifies the Git reference to resolve and + monitor for changes. + type: object + properties: + name: + description: "Name of the reference to check out; takes precedence + over Branch, Tag and SemVer. \n It must be a valid Git reference: + https://git-scm.com/docs/git-check-ref-format#_description Examples: + \"refs/heads/main\", \"refs/tags/v0.1.0\", \"refs/pull/420/head\", + \"refs/merge-requests/1/head\"" + type: string + required: + - interval + - timeout + - url + - path + - ref + required: + - git + required: + - deletionPolicy + - gitops + - id + - nodes + - operators + - providerConfigName + - region + required: + - parameters diff --git a/apis/cluster/services/definition.yaml b/apis/cluster/services/definition.yaml deleted file mode 100644 index 18781d0..0000000 --- a/apis/cluster/services/definition.yaml +++ /dev/null @@ -1,84 +0,0 @@ -apiVersion: apiextensions.crossplane.io/v1 -kind: CompositeResourceDefinition -metadata: - name: xservices.azure.platformref.upbound.io -spec: - group: azure.platformref.upbound.io - names: - kind: XServices - plural: xservices - versions: - - name: v1alpha1 - served: true - referenceable: true - schema: - openAPIV3Schema: - type: object - properties: - spec: - type: object - properties: - deletionPolicy: - description: Delete the external resources when the Claim/XR is deleted. Defaults to Delete - enum: - - Delete - - Orphan - type: string - default: Delete - gitops: - type: object - description: GitOps configure gitops system - properties: - url: - type: string - description: Url for GitOps Sync. - path: - type: string - description: path in Repo for GitOps Sync. - kubeConfigSecretRef: - type: object - description: location for kubeconfig - properties: - name: - type: string - description: Name of the secret. - namespace: - type: string - description: Namespace of the secret. - required: - - name - - namespace - required: - - url - operators: - type: object - description: Configuration for operators. - properties: - flux: - type: object - description: Configuration for the Flux GitOps operator. - properties: - version: - type: string - description: Flux operator version to run. - default: "2.9.2" - prometheus: - type: object - description: Configuration for the Prometheus operator. - properties: - version: - type: string - description: Prometheus operator version to run. - default: "41.4.1" - providerConfigRef: - type: object - description: "A reference to the ProviderConfig of the cluster that services should be deployed to." - properties: - name: - type: string - description: "Name of the Kubernetes provider configuration. This will typically be the name of the cluster with a five character suffix appended." - required: - - name - required: - - providerConfigRef - - deletionPolicy diff --git a/apis/cluster/services/flux/composition.yaml b/apis/cluster/services/flux/composition.yaml deleted file mode 100644 index cc7d46f..0000000 --- a/apis/cluster/services/flux/composition.yaml +++ /dev/null @@ -1,98 +0,0 @@ -apiVersion: apiextensions.crossplane.io/v1 -kind: Composition -metadata: - name: xservicesflux.azure.platformref.upbound.io - labels: - type: gitops -spec: - writeConnectionSecretsToNamespace: upbound-system - compositeTypeRef: - apiVersion: azure.platformref.upbound.io/v1alpha1 - kind: XServices - patchSets: - - name: Common - patches: - - type: FromCompositeFieldPath - fromFieldPath: metadata.labels - toFieldPath: metadata.labels - - type: FromCompositeFieldPath - fromFieldPath: metadata.annotations - toFieldPath: metadata.annotations - - type: FromCompositeFieldPath - fromFieldPath: spec.providerConfigRef.name - toFieldPath: spec.providerConfigRef.name - - type: FromCompositeFieldPath - fromFieldPath: spec.deletionPolicy - toFieldPath: spec.deletionPolicy - resources: - - name: releaseFlux - base: - apiVersion: helm.crossplane.io/v1beta1 - kind: Release - spec: - rollbackLimit: 3 - forProvider: - namespace: flux-system - chart: - name: flux2 - url: https://github.com/fluxcd-community/helm-charts/releases/download/flux2-2.9.2/flux2-2.9.2.tgz - version: 2.9.2 - values: - imageAutomationController: - create: false - imageReflectionController: - create: false - patches: - - type: PatchSet - patchSetName: Common - - fromFieldPath: spec.operators.flux.version - toFieldPath: spec.forProvider.chart.version - - type: CombineFromComposite - combine: - variables: - - fromFieldPath: spec.operators.flux.version - - fromFieldPath: spec.operators.flux.version - strategy: string - string: - fmt: https://github.com/fluxcd-community/helm-charts/releases/download/flux2-%s/flux2-%s.tgz - toFieldPath: spec.forProvider.chart.url - - name: syncFlux - base: - apiVersion: helm.crossplane.io/v1beta1 - kind: Release - spec: - rollbackLimit: 3 - forProvider: - namespace: flux-system - chart: - name: flux2-sync - repository: https://fluxcd-community.github.io/helm-charts - version: "1.6.2" - values: - gitRepository: - spec: - timeout: 20s - interval: 10m0s - gitImplementation: go-git - ref: - branch: main - kustomization: - spec: - interval: 10m - sourceRef: - kind: GitRepository - patches: - - type: PatchSet - patchSetName: Common - - fromFieldPath: spec.providerConfigRef.name - toFieldPath: metadata.annotations[crossplane.io/external-name] - - fromFieldPath: spec.gitops.url - toFieldPath: spec.forProvider.values.gitRepository.spec.url - - fromFieldPath: spec.providerConfigRef.name - toFieldPath: spec.forProvider.values.kustomization.spec.path - transforms: - - type: string - string: - fmt: "./infrastructure/%s" - - fromFieldPath: spec.gitops.path - toFieldPath: spec.forProvider.values.kustomization.spec.path diff --git a/apis/cluster/services/prometheus/composition.yaml b/apis/cluster/services/prometheus/composition.yaml deleted file mode 100644 index 9ee94d2..0000000 --- a/apis/cluster/services/prometheus/composition.yaml +++ /dev/null @@ -1,45 +0,0 @@ -apiVersion: apiextensions.crossplane.io/v1 -kind: Composition -metadata: - name: xservices.azure.platformref.upbound.io - labels: - type: default -spec: - writeConnectionSecretsToNamespace: upbound-system - compositeTypeRef: - apiVersion: azure.platformref.upbound.io/v1alpha1 - kind: XServices - patchSets: - - name: Common - patches: - - type: FromCompositeFieldPath - fromFieldPath: metadata.labels - toFieldPath: metadata.labels - - type: FromCompositeFieldPath - fromFieldPath: metadata.annotations - toFieldPath: metadata.annotations - - type: FromCompositeFieldPath - fromFieldPath: spec.providerConfigRef.name - toFieldPath: spec.providerConfigRef.name - - type: FromCompositeFieldPath - fromFieldPath: spec.deletionPolicy - toFieldPath: spec.deletionPolicy - resources: - - name: releasePrometheus - base: - apiVersion: helm.crossplane.io/v1beta1 - kind: Release - spec: - rollbackLimit: 3 - forProvider: - namespace: operators - chart: - name: kube-prometheus-stack - repository: https://prometheus-community.github.io/helm-charts - version: "41.4.1" - values: {} - patches: - - type: PatchSet - patchSetName: Common - - fromFieldPath: spec.operators.prometheus.version - toFieldPath: spec.forProvider.chart.version diff --git a/crossplane.yaml b/crossplane.yaml index b7ca5fe..d155c27 100644 --- a/crossplane.yaml +++ b/crossplane.yaml @@ -34,15 +34,23 @@ metadata: customize to meet the exact needs of your organization! spec: crossplane: - version: ">=v1.12.1-0" + version: ">=v1.14.1-0" dependsOn: - - provider: xpkg.upbound.io/upbound/provider-family-azure - version: "v0.37.1" - provider: xpkg.upbound.io/upbound/provider-azure-containerservice - version: "v0.37.1" + # renovate: datasource=github-releases depName=upbound/provider-azure + version: "v0.41.0" - configuration: xpkg.upbound.io/upbound/configuration-azure-network - version: "v0.2.0" + # renovate: datasource=github-releases depName=upbound/configuration-azure-network + version: "v0.3.0" - configuration: xpkg.upbound.io/upbound/configuration-azure-database - version: "v0.2.0" + # renovate: datasource=github-releases depName=upbound/configuration-azure-database + version: "v0.4.0" - configuration: xpkg.upbound.io/upbound/configuration-app - version: "v0.1.0" + # renovate: datasource=github-releases depName=upbound/configuration-app + version: "v0.2.0" + - configuration: xpkg.upbound.io/upbound/configuration-observability-oss + # renovate: datasource=github-releases depName=upbound/configuration-observability-oss + version: "v0.2.0" + - configuration: xpkg.upbound.io/upbound/configuration-gitops-flux + # renovate: datasource=github-releases depName=upbound/configuration-gitops-flux + version: "v0.2.0" diff --git a/examples/cluster-claim.yaml b/examples/cluster-claim.yaml index af4dd7d..838b4e8 100644 --- a/examples/cluster-claim.yaml +++ b/examples/cluster-claim.yaml @@ -12,5 +12,14 @@ spec: nodes: count: 3 instanceType: Standard_B2s + gitops: + git: + url: https://github.com/upbound/platform-ref-azure/ + ref: + # refs/heads/main + # refs/tags/v0.1.0 + # refs/pull/420/head + # refs/merge-requests/1/head + name: refs/heads/main writeConnectionSecretToRef: name: platform-ref-azure-kubeconfig diff --git a/test/setup.sh b/test/setup.sh index c1e8c34..992df77 100755 --- a/test/setup.sh +++ b/test/setup.sh @@ -5,6 +5,7 @@ echo "Running setup.sh" echo "Waiting until all configuration packages are healthy/installed..." "${KUBECTL}" wait configuration.pkg --all --for=condition=Healthy --timeout 5m "${KUBECTL}" wait configuration.pkg --all --for=condition=Installed --timeout 5m +"${KUBECTL}" wait configurationrevisions.pkg --all --for=condition=Healthy --timeout 5m echo "Creating cloud credential secret..." "${KUBECTL}" -n upbound-system create secret generic azure-creds --from-literal=credentials="${UPTEST_CLOUD_CREDENTIALS}" \