Skip to content

Commit 6f3bdf8

Browse files
committed
Include additional keys to adopt identityProviderConfig
This change ensures users are required to provide an identityProviderConfigName when adopting the resource, as it is a required input field. Not sure if we should change that to the primary NameOrID, and make clusterName and additional Key..
1 parent abd09fd commit 6f3bdf8

File tree

5 files changed

+33
-5
lines changed

5 files changed

+33
-5
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2024-10-10T03:55:41Z"
3-
build_hash: 36c2d234498c2bc4f60773ab8df632af4067f43b
2+
build_date: "2024-10-17T18:27:35Z"
3+
build_hash: ab15f9206796e9660c51695fab0ff07a09ea28e2
44
go_version: go1.23.2
5-
version: v0.39.1
6-
api_directory_checksum: d736919240d3843865e860f7cb685cec30921bd4
5+
version: v0.39.1-2-gab15f92
6+
api_directory_checksum: 4cfe0b6ec81b65719c1f165983b84116135f5e40
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.55.5
99
generator_config_info:
10-
file_checksum: 157f31e5a8ce8e0e922e4e5c2e406841ec1a8136
10+
file_checksum: 5b5c72cb103e99a0dd19beffb8863f16e4fd163e
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/generator.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ resources:
145145
template_path: hooks/identity_provider_config/sdk_create_post_set_output.go.tpl
146146
sdk_read_one_post_set_output:
147147
template_path: hooks/identity_provider_config/sdk_read_one_post_set_output.go.tpl
148+
post_set_resource_identifiers:
149+
template_path: hooks/identity_provider_config/post_set_resource_identifiers.go.tpl
148150
update_operation:
149151
custom_method_name: customUpdate
150152
Cluster:

generator.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ resources:
145145
template_path: hooks/identity_provider_config/sdk_create_post_set_output.go.tpl
146146
sdk_read_one_post_set_output:
147147
template_path: hooks/identity_provider_config/sdk_read_one_post_set_output.go.tpl
148+
post_set_resource_identifiers:
149+
template_path: hooks/identity_provider_config/post_set_resource_identifiers.go.tpl
148150
update_operation:
149151
custom_method_name: customUpdate
150152
Cluster:

pkg/resource/identity_provider_config/resource.go

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
if identifier.AdditionalKeys == nil {
3+
return ackerrors.MissingNameIdentifier
4+
}
5+
f0, f0ok := identifier.AdditionalKeys["identityProviderConfigName"]
6+
if f0ok {
7+
r.ko.Spec.OIDC = &svcapitypes.OIDCIdentityProviderConfigRequest{
8+
IdentityProviderConfigName: &f0,
9+
}
10+
} else {
11+
return ackerrors.MissingNameIdentifier
12+
}

0 commit comments

Comments
 (0)