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

Allow pulumi.Output in EKS Addon configurationValues #1632

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Makeshift
Copy link

@Makeshift Makeshift commented Feb 7, 2025

Proposed changes

Someone went through the effort of creating a stringify function and forgot to use it 😁

Copy link

github-actions bot commented Feb 7, 2025

PR is now waiting for a maintainer to run the acceptance tests.
Note for the maintainer: To run the acceptance tests, please comment /run-acceptance-tests on the PR

Copy link

github-actions bot commented Feb 8, 2025

PR is now waiting for a maintainer to run the acceptance tests.
Note for the maintainer: To run the acceptance tests, please comment /run-acceptance-tests on the PR

Copy link

github-actions bot commented Feb 8, 2025

PR is now waiting for a maintainer to run the acceptance tests.
Note for the maintainer: To run the acceptance tests, please comment /run-acceptance-tests on the PR

Copy link
Member

@rquitales rquitales left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for submitting this PR and helping clean up our codebase! Overall the PR looks like a great addition. I'll test this change on the side and merge when possible.

@@ -24,7 +24,7 @@ import { Cluster } from "../cluster";
export interface AddonOptions
extends Omit<aws.eks.AddonArgs, "resolveConflicts" | "clusterName" | "configurationValues"> {
cluster: Cluster;
configurationValues?: object;
configurationValues?: pulumi.Input<object>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: This should be a safe change as the API is currently modeled as an Input already (ref) so this isn't a breaking change.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed! The types were telling me that an Input should be fine but then it put Calling [toJSON] on an [Output<T>] is not supported in my JSON blob


const addon = new aws.eks.Addon(
name,
{
...args,
clusterName: cluster.core.cluster.name,
configurationValues: JSON.stringify(args.configurationValues),
configurationValues: stringifyAddonConfiguration(args.configurationValues),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might need to be more careful here. stringifyAddonConfiguration changes the ordering, and may cause replacements for existing users. We'll need to test this out.

Copy link
Author

@Makeshift Makeshift Feb 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to avoid changing the order for users who are already utilising this, would it be safer to just use pulumi.jsonStringify(args.configurationValues) ?

I think it would be safe to assume that if the user required a deterministic order, they would have ran into this issue already and either worked around the wrapper component or implemented their own ordering solution, so it's a bit too late to add now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants