kind: Composition
apiVersion: apiextensions.crossplane.io/v1
metadata:
name: xvaults.sec.upbound.io
creationTimestamp: null
spec:
compositeTypeRef:
apiVersion: sec.upbound.io/v1alpha1
kind: XVault
mode: Pipeline
pipeline:
- step: patch-and-transform
functionRef:
name: upbound-function-patch-and-transform
input:
apiVersion: pt.fn.crossplane.io/v1beta1
kind: Resources
resources:
- base:
apiVersion: sec.upbound.io/v1alpha1
kind: XVaultInstall
name: xVaultInstall
patches:
- fromFieldPath: spec.parameters.id
toFieldPath: spec.parameters.id
transforms:
- string:
fmt: "%s-install"
type: Format
type: string
type: FromCompositeFieldPath
- fromFieldPath: status.xVaultInstall
policy:
fromFieldPath: Required
toFieldPath: status.vaultXVaultInstall
type: ToCompositeFieldPath
- fromFieldPath: spec.parameters.providerConfigName
toFieldPath: spec.parameters.providerConfigName
type: FromCompositeFieldPath
- base:
apiVersion: sec.upbound.io/v1alpha1
kind: XAuth
name: xVaultAuth
patches:
- fromFieldPath: spec.parameters.id
toFieldPath: spec.parameters.id
transforms:
- string:
fmt: "%s-auth"
type: Format
type: string
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.dataJsonSecretRef
toFieldPath: spec.parameters.dataJsonSecretRef
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.user
toFieldPath: spec.parameters.user
type: FromCompositeFieldPath
- fromFieldPath: status.vaultXVaultInstall.state
policy:
fromFieldPath: Required
toFieldPath: spec.parameters.vaultDeployedState
type: FromCompositeFieldPath
- base:
apiVersion: sec.upbound.io/v1alpha1
kind: XSecret
spec:
parameters:
providerConfigName: vault-provider-config
name: xVaultSecrets
patches:
- fromFieldPath: spec.parameters.id
toFieldPath: spec.parameters.id
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.transitKeyName
toFieldPath: spec.parameters.transitKeyName
type: FromCompositeFieldPath
- fromFieldPath: status.vaultXVaultInstall.state
policy:
fromFieldPath: Required
toFieldPath: spec.parameters.vaultDeployedState
type: FromCompositeFieldPath
- base:
apiVersion: sec.upbound.io/v1alpha1
kind: XPolicy
spec:
parameters:
providerConfigName: vault-provider-config
name: xVaultPolicies
patches:
- fromFieldPath: spec.parameters.id
toFieldPath: spec.parameters.id
type: FromCompositeFieldPath
- fromFieldPath: status.vaultXVaultInstall.state
policy:
fromFieldPath: Required
toFieldPath: spec.parameters.vaultDeployedState
type: FromCompositeFieldPath
- base:
apiVersion: sec.upbound.io/v1alpha1
kind: XVaultUser
spec:
parameters:
id: configuration-vault-user
name: xVaultUser
patches:
- fromFieldPath: spec.parameters.providerConfigName
toFieldPath: spec.parameters.providerConfigName
type: FromCompositeFieldPath
- base:
apiVersion: apiextensions.crossplane.io/v1alpha1
kind: Usage
spec:
by:
apiVersion: sec.upbound.io/v1alpha1
kind: XAuth
resourceSelector:
matchControllerRef: true
of:
apiVersion: sec.upbound.io/v1alpha1
kind: XVaultInstall
resourceSelector:
matchControllerRef: true
name: usageXVaultInstallByXAuth
readinessChecks:
- type: None
- base:
apiVersion: apiextensions.crossplane.io/v1alpha1
kind: Usage
spec:
by:
apiVersion: sec.upbound.io/v1alpha1
kind: XPolicy
resourceSelector:
matchControllerRef: true
of:
apiVersion: sec.upbound.io/v1alpha1
kind: XVaultInstall
resourceSelector:
matchControllerRef: true
name: usageXVaultInstallByXPolicy
readinessChecks:
- type: None
- base:
apiVersion: apiextensions.crossplane.io/v1alpha1
kind: Usage
spec:
by:
apiVersion: sec.upbound.io/v1alpha1
kind: XSecret
resourceSelector:
matchControllerRef: true
of:
apiVersion: sec.upbound.io/v1alpha1
kind: XVaultInstall
resourceSelector:
matchControllerRef: true
name: usageXVaultInstallByXSecret
readinessChecks:
- type: None
- base:
apiVersion: apiextensions.crossplane.io/v1alpha1
kind: Usage
spec:
by:
apiVersion: sec.upbound.io/v1alpha1
kind: XAuth
resourceSelector:
matchControllerRef: true
of:
apiVersion: sec.upbound.io/v1alpha1
kind: XSecret
resourceSelector:
matchControllerRef: true
name: usageXSecretByXAuth
readinessChecks:
- type: None
- base:
apiVersion: apiextensions.crossplane.io/v1alpha1
kind: Usage
spec:
by:
apiVersion: sec.upbound.io/v1alpha1
kind: XAuth
resourceSelector:
matchControllerRef: true
of:
apiVersion: sec.upbound.io/v1alpha1
kind: XVaultUser
resourceSelector:
matchControllerRef: true
name: usageXVaultUserByXAuth
readinessChecks:
- type: None
© 2022 Upbound, Inc.
Discover the building blocksfor your internal cloud platform.