Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(addon): Add support for PodIdentityAssociations #120

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions addon_simple.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: eks.services.k8s.aws/v1alpha1
kind: Addon
metadata:
name: addon1
spec:
name: adot
addonVersion: v0.94.1-eksbuild.1
clusterName: astro-arm
podIdentityAssociations:
- serviceAccount: adot-col-container-logs
roleARN: arn:aws:iam::095708837592:role/abc-admin-pia-role
- serviceAccount: adot-col-otlp-ingest
roleARN: arn:aws:iam::095708837592:role/abc-admin-pia-role
- serviceAccount: adot-col-prom-metrics
roleARN: arn:aws:iam::095708837592:role/abc-admin-pia-role
12 changes: 6 additions & 6 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-06-06T04:13:17Z"
build_date: "2024-07-11T06:06:45Z"
build_hash: 14cef51778d471698018b6c38b604181a6948248
go_version: go1.21.1
version: v0.34.0
api_directory_checksum: 626700f8799840e0470b1ff7ef3dbb32665b9f9d
go_version: go1.22.4
version: v0.34.0-dirty
api_directory_checksum: 73d241a2b0ffedc502d04e12db2ca6a223dc09e8
api_version: v1alpha1
aws_sdk_go_version: v1.49.13
aws_sdk_go_version: v1.54.1
generator_config_info:
file_checksum: c6dada6a685b8ed90112dab66773cc94314dd2b8
file_checksum: 1d75859f086015d8a5dd3fce54480cd449524e66
original_file_name: generator.yaml
last_modification:
reason: API generation
7 changes: 7 additions & 0 deletions apis/v1alpha1/addon.go

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

4 changes: 1 addition & 3 deletions apis/v1alpha1/cluster.go

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

73 changes: 40 additions & 33 deletions apis/v1alpha1/enums.go

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

33 changes: 33 additions & 0 deletions apis/v1alpha1/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,18 @@ operations:
resources:
Addon:
hooks:
delta_pre_compare:
code: customPreCompare(delta, a, b)
sdk_read_one_post_set_output:
template_path: hooks/addons/sdk_read_one_post_set_output.go.tpl
sdk_create_post_set_output:
template_path: hooks/addons/sdk_create_post_set_output.go.tpl
sdk_update_pre_build_request:
template_path: hooks/addons/sdk_update_pre_build_request.go.tpl
sdk_update_post_build_request:
template_path: hooks/addons/sdk_update_post_build_request.go.tpl
sdk_update_post_set_output:
template_path: hooks/addons/sdk_update_post_set_output.go.tpl
fields:
ClusterName:
references:
Expand All @@ -26,6 +36,29 @@ resources:
service_name: iam
resource: Role
path: Status.ACKResourceMetadata.ARN
PodIdentityAssociations:
set:
- ignore: true
method: Create
- ignore: true
method: ReadOne
compare:
is_ignored: true
# Note(a-hilaly): Ideally, we would like to have the following configuration
# but the generator doesn't support such a unique case. PodIdentityAssociations
# Is already defined in the spec and leveraging set[*].ignore: true, which is
# influencing the set configurations for PodIdentityAssociationIDs.
# We need to extend the code-generator (and build better APIs).
#
# PodIdentityAssociationIDs:
# is_read_only: true
# custom_field:
# list_of: String
# set:
# - method: ReadOne
# from: PodIdentityAssociations
# - method: Create
# from: PodIdentityAssociations
renames:
operations:
CreateAddon:
Expand Down
35 changes: 19 additions & 16 deletions apis/v1alpha1/nodegroup.go

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

Loading