-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(caas): backport from caas (#116)
Signed-off-by: Christopher Haar <christopher.haar@upbound.io>
- Loading branch information
Showing
35 changed files
with
1,379 additions
and
838 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
apiVersion: apiextensions.crossplane.io/v1 | ||
kind: CompositeResourceDefinition | ||
metadata: | ||
name: xapps.aws.platformref.upbound.io | ||
spec: | ||
defaultCompositeDeletePolicy: Foreground | ||
group: aws.platformref.upbound.io | ||
names: | ||
kind: XApp | ||
plural: xapps | ||
claimNames: | ||
kind: App | ||
plural: apps | ||
versions: | ||
- name: v1alpha1 | ||
served: true | ||
referenceable: true | ||
schema: | ||
openAPIV3Schema: | ||
type: object | ||
properties: | ||
spec: | ||
type: object | ||
properties: | ||
parameters: | ||
type: object | ||
description: App configuration parameters. | ||
properties: | ||
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 | ||
helm: | ||
type: object | ||
description: Configuration for operators. | ||
properties: | ||
chart: | ||
type: object | ||
description: Configuration for the Helm Chart | ||
properties: | ||
name: | ||
type: string | ||
description: chart name | ||
repo: | ||
type: string | ||
description: chart repo | ||
version: | ||
type: string | ||
description: chart version | ||
passwordSecretRef: | ||
type: object | ||
description: "A reference to the Secret object containing database credentials" | ||
properties: | ||
namespace: | ||
type: string | ||
name: | ||
type: string | ||
required: | ||
- namespace | ||
- name | ||
required: | ||
- providerConfigName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
apiVersion: apiextensions.crossplane.io/v1 | ||
kind: Composition | ||
metadata: | ||
name: xclusters.aws.platformref.upbound.io | ||
spec: | ||
writeConnectionSecretsToNamespace: upbound-system | ||
compositeTypeRef: | ||
apiVersion: aws.platformref.upbound.io/v1alpha1 | ||
kind: XCluster | ||
resources: | ||
- base: | ||
apiVersion: aws.platformref.upbound.io/v1alpha1 | ||
kind: XNetwork | ||
patches: | ||
- fromFieldPath: spec.parameters.id | ||
toFieldPath: spec.parameters.id | ||
- fromFieldPath: spec.parameters.region | ||
toFieldPath: spec.parameters.region | ||
- fromFieldPath: spec.parameters.deletionPolicy | ||
toFieldPath: spec.parameters.deletionPolicy | ||
- fromFieldPath: spec.parameters.providerConfigName | ||
toFieldPath: spec.parameters.providerConfigName | ||
- fromFieldPath: spec.parameters.networkSelector | ||
toFieldPath: spec.compositionSelector.matchLabels[type] | ||
- type: ToCompositeFieldPath | ||
fromFieldPath: status.subnetIds | ||
toFieldPath: status.subnetIds | ||
policy: | ||
fromFieldPath: Required | ||
name: compositeNetworkEKS | ||
- base: | ||
apiVersion: aws.platformref.upbound.io/v1alpha1 | ||
kind: XEKS | ||
connectionDetails: | ||
- fromConnectionSecretKey: kubeconfig | ||
name: compositeClusterEKS | ||
patches: | ||
- fromFieldPath: spec.parameters.id | ||
toFieldPath: metadata.labels[xeks.aws.platformref.upbound.io/cluster-id] | ||
- fromFieldPath: spec.parameters.id | ||
toFieldPath: spec.parameters.id | ||
- fromFieldPath: spec.parameters.region | ||
toFieldPath: spec.parameters.region | ||
- fromFieldPath: spec.parameters.deletionPolicy | ||
toFieldPath: spec.parameters.deletionPolicy | ||
- fromFieldPath: spec.parameters.providerConfigName | ||
toFieldPath: spec.parameters.providerConfigName | ||
- fromFieldPath: spec.parameters.id | ||
toFieldPath: metadata.annotations[crossplane.io/external-name] | ||
- fromFieldPath: metadata.uid | ||
toFieldPath: spec.writeConnectionSecretToRef.name | ||
transforms: | ||
- type: string | ||
string: | ||
fmt: "%s-eks" | ||
- fromFieldPath: spec.writeConnectionSecretToRef.namespace | ||
toFieldPath: spec.writeConnectionSecretToRef.namespace | ||
- fromFieldPath: spec.parameters.version | ||
toFieldPath: spec.parameters.version | ||
- fromFieldPath: spec.parameters.nodes.count | ||
toFieldPath: spec.parameters.nodes.count | ||
- fromFieldPath: spec.parameters.nodes.instanceType | ||
toFieldPath: spec.parameters.nodes.instanceType | ||
- fromFieldPath: spec.parameters.iam.roleArn | ||
toFieldPath: spec.parameters.iam.roleArn | ||
- fromFieldPath: spec.parameters.iam.userArn | ||
toFieldPath: spec.parameters.iam.userArn | ||
- fromFieldPath: status.subnetIds | ||
toFieldPath: spec.parameters.subnetIds | ||
policy: | ||
fromFieldPath: Required | ||
- base: | ||
apiVersion: aws.platformref.upbound.io/v1alpha1 | ||
kind: XServices | ||
name: compositeClusterServices | ||
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] | ||
|
||
- name: usageXEksByXService | ||
base: | ||
apiVersion: apiextensions.crossplane.io/v1alpha1 | ||
kind: Usage | ||
spec: | ||
of: | ||
apiVersion: aws.platformref.upbound.io/v1alpha1 | ||
kind: XEKS | ||
resourceSelector: | ||
matchControllerRef: true | ||
by: | ||
apiVersion: aws.platformref.upbound.io/v1alpha1 | ||
kind: XServices | ||
resourceSelector: | ||
matchControllerRef: true |
Oops, something went wrong.