-
Notifications
You must be signed in to change notification settings - Fork 134
/
Copy pathapp-database-redis.yaml
43 lines (43 loc) · 1.17 KB
/
app-database-redis.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
apiVersion: apiextensions.crossplane.io/v1
kind: Composition
metadata:
name: keyvalue.db.local.salaboy.com
labels:
type: dev
provider: aws
kind: keyvalue
spec:
writeConnectionSecretsToNamespace: crossplane-system
compositeTypeRef:
apiVersion: salaboy.com/v1alpha1
kind: Database
resources:
- name: redis
base:
apiVersion: cache.aws.crossplane.io/v1alpha1
kind: CacheCluster
metadata:
annotations:
crossplane.io/external-name: # patched
spec:
providerConfigRef:
name: default
forProvider:
region: us-west-2
numCacheNodes: 1
cacheNodeType: cache.t3.micro
engine: redis
writeConnectionSecretToRef:
namespace: crossplane-system
name: redis
patches:
- fromFieldPath: metadata.name
toFieldPath: metadata.annotations[crossplane.io/external-name]
policy:
fromFieldPath: Required
- fromFieldPath: metadata.name
toFieldPath: metadata.name
transforms:
- type: string
string:
fmt: "%s-redis"