-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtaskdef.yaml
88 lines (87 loc) · 2.93 KB
/
taskdef.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Copyright dmaganto.infra, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
apiVersion: apiextensions.crossplane.io/v1
kind: Composition
metadata:
name: ecstaskdef.microservices.dmaganto.infra
labels:
dmaganto.infra/provider: upbound
dmaganto.infra/taskdef-type: tenant
spec:
compositeTypeRef:
apiVersion: microservices.dmaganto.infra/v1alpha1
kind: XECSTaskdef
patchSets:
- name: common-parameters
patches:
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.providerConfigName
toFieldPath: spec.providerConfigRef.name
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.deletionPolicy
toFieldPath: spec.deletionPolicy
- fromFieldPath: spec.resourceConfig.region
toFieldPath: spec.forProvider.region
type: FromCompositeFieldPath
- fromFieldPath: spec.resourceConfig.tenant
toFieldPath: metadata.labels["tenant"]
type: FromCompositeFieldPath
resources:
- name: taskdefinition
base:
apiVersion: ecs.aws.upbound.io/v1beta1
kind: TaskDefinition
metadata:
spec:
forProvider:
containerDefinitions:
networkMode: awsvpc
family:
region:
requiresCompatibilities:
- FARGATE
memory:
cpu:
patches:
- type: PatchSet
patchSetName: common-parameters
- fromFieldPath: spec.parameters.containerDefinitions
toFieldPath: spec.forProvider.containerDefinitions
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.family
toFieldPath: spec.forProvider.family
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.memory
toFieldPath: spec.forProvider.memory
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.cpu
toFieldPath: spec.forProvider.cpu
type: FromCompositeFieldPath
- type: CombineFromComposite
combine:
variables:
- fromFieldPath: spec.parameters.family
- fromFieldPath: spec.parameters.task_id
strategy: string
string:
fmt: "%s-%s"
toFieldPath: metadata.name
- type: CombineFromComposite
combine:
variables:
- fromFieldPath: spec.resourceConfig.tenant
- fromFieldPath: spec.parameters.family
- fromFieldPath: spec.parameters.task_id
strategy: string
string:
fmt: "%s-%s-%s"
toFieldPath: metadata.labels["taskdefinition"]
readinessChecks:
- type: MatchCondition
matchCondition:
status: 'True'
type: Ready
- type: MatchCondition
matchCondition:
type: Synced
status: 'True'