Skip to content

Commit

Permalink
Check for RequestInProgressException when creating CA resource (#46)
Browse files Browse the repository at this point in the history
Description of changes:
1. Check for RequestInProgressException when creating CA resources
2. Release artifacts for release v0.0.11

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • Loading branch information
ndbhat authored Apr 23, 2024
1 parent fbe19ea commit 43a62bc
Show file tree
Hide file tree
Showing 20 changed files with 294 additions and 85 deletions.
6 changes: 3 additions & 3 deletions apis/v1alpha1/ack-generate-metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ack_generate_info:
build_date: "2024-04-19T16:18:58Z"
build_date: "2024-04-23T13:51:34Z"
build_hash: af8006cb7248f0177e2a14b709c69c3a99a016ad
go_version: go1.22.0
version: v0.33.0
api_directory_checksum: 804becfbeaa4f4dee31721a37049a05b7c904de7
api_directory_checksum: 14ee2b48df20458271bcddc87436760812fd6ccd
api_version: v1alpha1
aws_sdk_go_version: v1.49.6
generator_config_info:
file_checksum: 86a608ca2c8bf34d5bb49a64b4eaa7a055f0b4f7
file_checksum: 5e732471cd7372bbdab8104a11bf3ac2c0dd6511
original_file_name: generator.yaml
last_modification:
reason: API generation
4 changes: 3 additions & 1 deletion apis/v1alpha1/certificate_authority.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 27 additions & 6 deletions apis/v1alpha1/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ ignore:
- Permission
field_paths:
- CreateCertificateAuthorityInput.IdempotencyToken
- CreateCertificateAuthorityInput.CertificateAuthorityType
- IssueCertificateInput.IdempotencyToken
- IssueCertificateInput.Csr
- ImportCertificateAuthorityCertificateInput.Certificate
Expand All @@ -28,13 +27,16 @@ model_name: acm-pca
prefix_config: {}
resources:
CertificateAuthority:
reconcile:
requeue_on_success_seconds: 30
renames:
operations:
CreateCertificateAuthority:
input_fields:
CertificateAuthorityType: Type
hooks:
delta_pre_compare:
code: customSetDefaults(a, b)
sdk_create_post_build_request:
template_path: hooks/certificate_authority/sdk_create_post_build_request.go.tpl
sdk_create_post_set_output:
template_path: hooks/certificate_authority/sdk_create_post_set_output.go.tpl
sdk_update_pre_build_request:
template_path: hooks/certificate_authority/sdk_update_pre_build_request.go.tpl
sdk_read_one_post_set_output:
Expand All @@ -56,7 +58,6 @@ resources:
CertificateAuthorityConfiguration:
is_immutable: true
Type:
type: string
is_immutable: true
go_tag: json:"type,omitempty"
KeyStorageSecurityStandard:
Expand Down Expand Up @@ -130,6 +131,11 @@ resources:
- MissingParameter
- ValidationError
- ValidationException
- InvalidArgsException
- InvalidArnException
- InvalidStateException
- LimitExceededException
- MalformedCSRException
fields:
CertificateAuthorityARN:
references:
Expand Down Expand Up @@ -157,6 +163,21 @@ resources:
tags:
ignore: true
CertificateAuthorityActivation:
exceptions:
terminal_codes:
- InvalidAction
- InvalidParameterCombination
- InvalidParameterValue
- InvalidQueryParameter
- MissingParameter
- ValidationError
- ValidationException
- CertificateMismatchException
- InvalidArnException
- InvalidRequestException
- InvalidStateException
- MalformedCertificateException
- RequestFailedException
hooks:
delta_pre_compare:
code: customSetDefaults(a, b)
Expand Down
2 changes: 1 addition & 1 deletion config/controller/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ kind: Kustomization
images:
- name: controller
newName: public.ecr.aws/aws-controllers-k8s/acmpca-controller
newTag: 0.0.10
newTag: 0.0.11
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ spec:
type: object
type: array
type:
description: The type of the certificate authority.
type: string
usageMode:
description: |-
Expand Down
33 changes: 27 additions & 6 deletions generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ ignore:
- Permission
field_paths:
- CreateCertificateAuthorityInput.IdempotencyToken
- CreateCertificateAuthorityInput.CertificateAuthorityType
- IssueCertificateInput.IdempotencyToken
- IssueCertificateInput.Csr
- ImportCertificateAuthorityCertificateInput.Certificate
Expand All @@ -28,13 +27,16 @@ model_name: acm-pca
prefix_config: {}
resources:
CertificateAuthority:
reconcile:
requeue_on_success_seconds: 30
renames:
operations:
CreateCertificateAuthority:
input_fields:
CertificateAuthorityType: Type
hooks:
delta_pre_compare:
code: customSetDefaults(a, b)
sdk_create_post_build_request:
template_path: hooks/certificate_authority/sdk_create_post_build_request.go.tpl
sdk_create_post_set_output:
template_path: hooks/certificate_authority/sdk_create_post_set_output.go.tpl
sdk_update_pre_build_request:
template_path: hooks/certificate_authority/sdk_update_pre_build_request.go.tpl
sdk_read_one_post_set_output:
Expand All @@ -56,7 +58,6 @@ resources:
CertificateAuthorityConfiguration:
is_immutable: true
Type:
type: string
is_immutable: true
go_tag: json:"type,omitempty"
KeyStorageSecurityStandard:
Expand Down Expand Up @@ -130,6 +131,11 @@ resources:
- MissingParameter
- ValidationError
- ValidationException
- InvalidArgsException
- InvalidArnException
- InvalidStateException
- LimitExceededException
- MalformedCSRException
fields:
CertificateAuthorityARN:
references:
Expand Down Expand Up @@ -157,6 +163,21 @@ resources:
tags:
ignore: true
CertificateAuthorityActivation:
exceptions:
terminal_codes:
- InvalidAction
- InvalidParameterCombination
- InvalidParameterValue
- InvalidQueryParameter
- MissingParameter
- ValidationError
- ValidationException
- CertificateMismatchException
- InvalidArnException
- InvalidRequestException
- InvalidStateException
- MalformedCertificateException
- RequestFailedException
hooks:
delta_pre_compare:
code: customSetDefaults(a, b)
Expand Down
4 changes: 2 additions & 2 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v1
name: acmpca-chart
description: A Helm chart for the ACK service controller for AWS Private Certificate Authority (PCA)
version: 0.0.10
appVersion: 0.0.10
version: 0.0.11
appVersion: 0.0.11
home: https://github.com/aws-controllers-k8s/acmpca-controller
icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png
sources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ spec:
type: object
type: array
type:
description: The type of the certificate authority.
type: string
usageMode:
description: |-
Expand Down
2 changes: 1 addition & 1 deletion helm/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ .Chart.Name }} has been installed.
This chart deploys "public.ecr.aws/aws-controllers-k8s/acmpca-controller:0.0.10".
This chart deploys "public.ecr.aws/aws-controllers-k8s/acmpca-controller:0.0.11".

Check its status by running:
kubectl --namespace {{ .Release.Namespace }} get pods -l "app.kubernetes.io/instance={{ .Release.Name }}"
Expand Down
2 changes: 1 addition & 1 deletion helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

image:
repository: public.ecr.aws/aws-controllers-k8s/acmpca-controller
tag: 0.0.10
tag: 0.0.11
pullPolicy: IfNotPresent
pullSecrets: []

Expand Down
7 changes: 6 additions & 1 deletion pkg/resource/certificate/sdk.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/resource/certificate_authority/manager_factory.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

74 changes: 40 additions & 34 deletions pkg/resource/certificate_authority/sdk.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 43a62bc

Please sign in to comment.