Skip to content

Commit

Permalink
change usage to work between composites
Browse files Browse the repository at this point in the history
Signed-off-by: Steven Borrelli <steve@borrelli.org>
  • Loading branch information
stevendborrelli committed Sep 7, 2023
1 parent 4623d0d commit c60cc75
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 36 deletions.
15 changes: 15 additions & 0 deletions package/cluster/composition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,18 @@ spec:
toFieldPath: spec.operators.universal-crossplane.version
- fromFieldPath: spec.id
toFieldPath: spec.operators.universal-crossplane.clusterRef
- name: usage-of-eks-by-services
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
1 change: 1 addition & 0 deletions package/cluster/definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: CompositeResourceDefinition
metadata:
name: xclusters.aws.platformref.upbound.io
spec:
defaultCompositeDeletePolicy: Foreground
group: aws.platformref.upbound.io
names:
kind: XCluster
Expand Down
72 changes: 36 additions & 36 deletions package/cluster/services/composition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,24 @@ spec:
fromFieldPath: metadata.name
toFieldPath: status.releaseNamePrometheus

- name: release-promotheus-uses-xeks
base:
apiVersion: apiextensions.crossplane.io/v1alpha1
kind: Usage
spec:
of:
apiVersion: aws.platformref.upbound.io/v1alpha1
kind: XEKS
by:
apiVersion: helm.crossplane.io/v1beta1
kind: Release
patches:
- fromFieldPath: metadata.labels[crossplane.io/claim-name]
toFieldPath: spec.of.resourceSelector.matchLabels[crossplane.io/claim-name]
- fromFieldPath: metadata.labels[crossplane.io/claim-namespace]
toFieldPath: spec.of.resourceSelector.matchLabels[crossplane.io/claim-namespace]
- fromFieldPath: status.releaseNamePrometheus
toFieldPath: spec.by.resourceRef.name
# - name: release-promotheus-uses-xeks
# base:
# apiVersion: apiextensions.crossplane.io/v1alpha1
# kind: Usage
# spec:
# of:
# apiVersion: aws.platformref.upbound.io/v1alpha1
# kind: XEKS
# by:
# apiVersion: helm.crossplane.io/v1beta1
# kind: Release
# patches:
# - fromFieldPath: metadata.labels[crossplane.io/claim-name]
# toFieldPath: spec.of.resourceSelector.matchLabels[crossplane.io/claim-name]
# - fromFieldPath: metadata.labels[crossplane.io/claim-namespace]
# toFieldPath: spec.of.resourceSelector.matchLabels[crossplane.io/claim-namespace]
# - fromFieldPath: status.releaseNamePrometheus
# toFieldPath: spec.by.resourceRef.name

- name: irsaCrossplane
base:
Expand Down Expand Up @@ -146,21 +146,21 @@ spec:
fromFieldPath: metadata.name
toFieldPath: status.releaseNameUXP

- name: release-uxp-uses-xeks
base:
apiVersion: apiextensions.crossplane.io/v1alpha1
kind: Usage
spec:
of:
apiVersion: aws.platformref.upbound.io/v1alpha1
kind: XEKS
by:
apiVersion: helm.crossplane.io/v1beta1
kind: Release
patches:
- fromFieldPath: metadata.labels[crossplane.io/claim-name]
toFieldPath: spec.of.resourceSelector.matchLabels[crossplane.io/claim-name]
- fromFieldPath: metadata.labels[crossplane.io/claim-namespace]
toFieldPath: spec.of.resourceSelector.matchLabels[crossplane.io/claim-namespace]
- fromFieldPath: status.releaseNameUXP
toFieldPath: spec.by.resourceRef.name
# - name: release-uxp-uses-xeks
# base:
# apiVersion: apiextensions.crossplane.io/v1alpha1
# kind: Usage
# spec:
# of:
# apiVersion: aws.platformref.upbound.io/v1alpha1
# kind: XEKS
# by:
# apiVersion: helm.crossplane.io/v1beta1
# kind: Release
# patches:
# - fromFieldPath: metadata.labels[crossplane.io/claim-name]
# toFieldPath: spec.of.resourceSelector.matchLabels[crossplane.io/claim-name]
# - fromFieldPath: metadata.labels[crossplane.io/claim-namespace]
# toFieldPath: spec.of.resourceSelector.matchLabels[crossplane.io/claim-namespace]
# - fromFieldPath: status.releaseNameUXP
# toFieldPath: spec.by.resourceRef.name

0 comments on commit c60cc75

Please sign in to comment.