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

Fix output for CF and TF #10164

Merged
merged 4 commits into from
Nov 5, 2020
Merged

Fix output for CF and TF #10164

merged 4 commits into from
Nov 5, 2020

Conversation

hakman
Copy link
Member

@hakman hakman commented Nov 4, 2020

This addresses a few issues that makes update cluster show that there are unapplied changes:

  • add missing resource names for CF
  • add missing instance monitoring for CF and TF
  • Ignore tags added by CF
  • order policy document sections alphabetically

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 4, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added area/provider/aws Issues or PRs related to aws provider approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 4, 2020
upup/pkg/fi/cloudup/awstasks/iaminstanceprofilerole.go Outdated Show resolved Hide resolved
@@ -115,7 +114,19 @@ func (e *IAMRolePolicy) Find(c *fi.Context) (*IAMRolePolicy, error) {
if err != nil {
return nil, fmt.Errorf("error parsing PolicyDocument for IAMRolePolicy %q: %v", aws.StringValue(e.Name), err)
}
actual.PolicyDocument = fi.WrapResource(fi.NewStringResource(policy))

// Reformat the PolicyDocument by unmarshaling and re-marshaling to JSON.
Copy link
Member

Choose a reason for hiding this comment

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

why is this necessary exactly?

Copy link
Member Author

Choose a reason for hiding this comment

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

The document is just a JSON that is stored in AWS. In Direct and TF case, what you send is what you get back.
In the case of CloudFormation.... you get back a nice "optimised" JSON, that is no longer matching what was sent. Obviously, kops update cluster sees this as a change and tries to fix it.

@hakman
Copy link
Member Author

hakman commented Nov 4, 2020

/test pull-kops-bazel-test

@rifelpet
Copy link
Member

rifelpet commented Nov 5, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 5, 2020
@k8s-ci-robot k8s-ci-robot merged commit 8043a5e into kubernetes:master Nov 5, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.20 milestone Nov 5, 2020
@hakman hakman deleted the fix-cf-tf branch November 5, 2020 03:52
k8s-ci-robot added a commit that referenced this pull request Nov 5, 2020
…-upstream-release-1.19

Automated cherry pick of #10164: Add missing resource names for CF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/provider/aws Issues or PRs related to aws provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants