Skip to content

Commit 285dd91

Browse files
authored
Adds basic e2e test for certificate (#3)
Also adds a bunch of read-only fields to the Certificate's Status struct that needed to be manually added to the generator.yaml file because the Create operation only returns the CertificateArn... Issue aws-controllers-k8s/community#482 Signed-off-by: Jay Pipes <jaypipes@gmail.com> By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent d35a1d8 commit 285dd91

18 files changed

+1403
-55
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2023-01-11T19:39:12Z"
2+
build_date: "2023-01-14T16:13:40Z"
33
build_hash: cfce82dfeed4e658da394699720394b1f7d23ff6
44
go_version: go1.19.4
55
version: v0.22.0-1-gcfce82d
6-
api_directory_checksum: 090c67b92b4d0ddb4b58db94aa4b07b8c69dd530
6+
api_directory_checksum: 202e02932e71256f27a9cd0f6454e508c5b7e9b6
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.44.177
99
generator_config_info:
10-
file_checksum: aa72a600b2490b566fcd54554ee64e386a001799
10+
file_checksum: cf8ed525d9422f011b706c0edf1984d5f70853e5
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/certificate.go

Lines changed: 90 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/v1alpha1/generator.yaml

Lines changed: 116 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
ignore:
22
field_paths:
33
- "RequestCertificateInput.IdempotencyToken"
4+
- "RequestCertificateInput.ValidationMethod"
45
operations:
56
RequestCertificate:
67
resource_name: Certificate
@@ -26,8 +27,121 @@ resources:
2627
hooks:
2728
sdk_create_pre_build_request:
2829
template_path: hooks/certificate/sdk_create_pre_build_request.go.tpl
29-
sdk_create_post_set_output:
30-
template_path: hooks/certificate/sdk_create_post_set_output.go.tpl
30+
exceptions:
31+
terminal_codes:
32+
- InvalidParameter
33+
- InvalidDomainValidationOptionsException
34+
- InvalidTagException
35+
- TagPolicyException
36+
- TooManyTagsException
37+
reconcile:
38+
requeue_on_success_seconds: 60
3139
fields:
40+
DomainValidationOptions:
41+
late_initialize: {}
42+
Options:
43+
late_initialize: {}
44+
SubjectAlternativeNames:
45+
late_initialize: {}
3246
KeyAlgorithm:
3347
late_initialize: {}
48+
# NOTE(jaypipes): The Create operation (RequestCertificate) has a
49+
# response with only a single field (certificateArn). All of the status
50+
# fields for the certificate are in the ReadOne operation
51+
# (DescribeCertificate) response, so we need to tell the code-generator
52+
# about all of those fields manually here...
53+
CreatedAt:
54+
is_read_only: true
55+
from:
56+
operation: DescribeCertificate
57+
path: Certificate.CreatedAt
58+
ExtendedKeyUsages:
59+
is_read_only: true
60+
from:
61+
operation: DescribeCertificate
62+
path: Certificate.ExtendedKeyUsages
63+
FailureReason:
64+
is_read_only: true
65+
from:
66+
operation: DescribeCertificate
67+
path: Certificate.FailureReason
68+
ImportedAt:
69+
is_read_only: true
70+
from:
71+
operation: DescribeCertificate
72+
path: Certificate.ImportedAt
73+
InUseBy:
74+
is_read_only: true
75+
from:
76+
operation: DescribeCertificate
77+
path: Certificate.InUseBy
78+
IssuedAt:
79+
is_read_only: true
80+
from:
81+
operation: DescribeCertificate
82+
path: Certificate.IssuedAt
83+
Issuer:
84+
is_read_only: true
85+
from:
86+
operation: DescribeCertificate
87+
path: Certificate.Issuer
88+
KeyUsages:
89+
is_read_only: true
90+
from:
91+
operation: DescribeCertificate
92+
path: Certificate.KeyUsages
93+
NotAfter:
94+
is_read_only: true
95+
from:
96+
operation: DescribeCertificate
97+
path: Certificate.NotAfter
98+
NotBefore:
99+
is_read_only: true
100+
from:
101+
operation: DescribeCertificate
102+
path: Certificate.NotBefore
103+
RenewalEligibility:
104+
is_read_only: true
105+
from:
106+
operation: DescribeCertificate
107+
path: Certificate.RenewalEligibility
108+
RenewalSummary:
109+
is_read_only: true
110+
from:
111+
operation: DescribeCertificate
112+
path: Certificate.RenewalSummary
113+
RevocationReason:
114+
is_read_only: true
115+
from:
116+
operation: DescribeCertificate
117+
path: Certificate.RevocationReason
118+
RevokedAt:
119+
is_read_only: true
120+
from:
121+
operation: DescribeCertificate
122+
path: Certificate.RevokedAt
123+
Serial:
124+
is_read_only: true
125+
from:
126+
operation: DescribeCertificate
127+
path: Certificate.Serial
128+
SignatureAlgorithm:
129+
is_read_only: true
130+
from:
131+
operation: DescribeCertificate
132+
path: Certificate.SignatureAlgorithm
133+
Status:
134+
is_read_only: true
135+
from:
136+
operation: DescribeCertificate
137+
path: Certificate.Status
138+
Subject:
139+
is_read_only: true
140+
from:
141+
operation: DescribeCertificate
142+
path: Certificate.Subject
143+
Type:
144+
is_read_only: true
145+
from:
146+
operation: DescribeCertificate
147+
path: Certificate.Type

apis/v1alpha1/zz_generated.deepcopy.go

Lines changed: 107 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)