-
Notifications
You must be signed in to change notification settings - Fork 9
/
generator.yaml
78 lines (78 loc) · 2.63 KB
/
generator.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
ignore:
field_paths:
- CreateVirtualClusterInput.ClientToken
- StartJobRunInput.ClientToken
- JobRun.ConfigurationOverrides
- StartJobRunInput.ConfigurationOverrides
operations: null
resource_names:
# - VirtualCluster
# - JobRun
- ManagedEndpoint
shape_names: null
model_name: emr-containers
operations:
DescribeVirtualCluster:
output_wrapper_field_path: VirtualCluster
StartJobRun:
operation_type: Create
resource_name: JobRun
CancelJobRun:
operation_type: Delete
resource_name: JobRun
DescribeJobRun:
output_wrapper_field_path: JobRun
prefix_config: {}
resources:
VirtualCluster:
exceptions:
terminal_codes:
- ValidationException
- ResourceNotFoundException
- InternalServerException
JobRun:
fields:
Name:
is_immutable: true
VirtualClusterId:
is_immutable: true
references:
resource: VirtualCluster
path: Status.ID
ExecutionRoleARN:
is_immutable: true
ReleaseLabel:
is_immutable: true
JobDriver:
is_immutable: true
State:
is_read_only: true
print:
name: STATE
from:
operation: DescribeJobRun
path: JobRun.State
Id:
is_read_only: true
print:
name: Job-ID
# The default ConfigurationOverrides that is part of JobRun API's does not work well with ACK. By design a CRD must be describable using an OpenAPIv3 schema. ConfigurationOverrides has a property within ApplicationConfiguration called 'configurations' which is recursive and is the root of the issue. Hence, we are creating custom JSON blob to accomodate ConfigurationOverrides and we have to manually handle how to unmarshall this field so that customers can define all/any properties available
ConfigurationOverrides:
type: "string"
is_immutable: true
is_required: False
compare:
is_ignored: true
# requeue_on_success_seconds is using 15 seconds for ACK to make describe-job-run API call so that it can update fields (ex: State). This is used as default values for now until ACK enables users to configure this value using Helm charts.
reconcile:
requeue_on_success_seconds: 15
hooks:
delta_pre_compare:
code: customPreCompare(delta, a, b)
sdk_create_post_build_request:
template_path: hooks/configuration_overrides/sdk_create_post_build_request.go.tpl
sdk_read_one_pre_set_output:
template_path: hooks/configuration_overrides/sdk_read_one_pre_set_output.go.tpl
exceptions:
terminal_codes:
- ValidationException