Skip to content

Conversation

faiq
Copy link
Contributor

@faiq faiq commented May 22, 2023

What type of PR is this?
/kind bug

What this PR does / why we need it:
Previously the userdata for the eks config did not resolve the data from the ContentFrom field. This PR borrows the implementation in the kubeadm bootstrap provider in CAPI and ports it over here. We also add a test to see if we resolve the secret properly

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Checklist:

  • squashed commits
  • includes documentation
  • adds unit tests
  • adds or updates e2e tests

Release note:

resolves ContentFrom for eksconfig userdata

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 22, 2023
@faiq
Copy link
Contributor Author

faiq commented May 22, 2023

/test ?

@k8s-ci-robot
Copy link
Contributor

@faiq: The following commands are available to trigger required jobs:

  • /test pull-cluster-api-provider-aws-build
  • /test pull-cluster-api-provider-aws-test
  • /test pull-cluster-api-provider-aws-verify

The following commands are available to trigger optional jobs:

  • /test pull-cluster-api-provider-aws-apidiff-main
  • /test pull-cluster-api-provider-aws-e2e
  • /test pull-cluster-api-provider-aws-e2e-blocking
  • /test pull-cluster-api-provider-aws-e2e-clusterclass
  • /test pull-cluster-api-provider-aws-e2e-conformance
  • /test pull-cluster-api-provider-aws-e2e-conformance-with-ci-artifacts
  • /test pull-cluster-api-provider-aws-e2e-eks
  • /test pull-cluster-api-provider-aws-e2e-eks-gc
  • /test pull-cluster-api-provider-aws-e2e-eks-testing

Use /test all to run the following jobs that were automatically triggered:

  • pull-cluster-api-provider-aws-apidiff-main
  • pull-cluster-api-provider-aws-build
  • pull-cluster-api-provider-aws-test
  • pull-cluster-api-provider-aws-verify

In response to this:

/test ?

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@faiq
Copy link
Contributor Author

faiq commented May 22, 2023

/test pull-cluster-api-provider-aws-e2e-eks

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels May 22, 2023
@faiq faiq force-pushed the faiq/resolve-eks-userdata-secrets branch from 8c9dff4 to 1ec1610 Compare May 22, 2023 19:50
@faiq
Copy link
Contributor Author

faiq commented May 22, 2023

/test pull-cluster-api-provider-aws-e2e-eks

@richardcase
Copy link
Member

It would be be good to get this covered by e2e at some point. From my side:

/approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 23, 2023
@richardcase
Copy link
Member

richardcase commented May 23, 2023

/cherrypick release-2.0

@k8s-infra-cherrypick-robot

@richardcase: once the present PR merges, I will cherry-pick it on top of release-2.0 in a new PR and assign it to you.

In response to this:

/cherrypick release-2.0
/cherrypick release-1.5

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@richardcase
Copy link
Member

/cherrypick release-1.5

@k8s-infra-cherrypick-robot

@richardcase: once the present PR merges, I will cherry-pick it on top of release-1.5 in a new PR and assign it to you.

In response to this:

/cherrypick release-1.5

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@Skarlso
Copy link
Contributor

Skarlso commented May 23, 2023

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 23, 2023
@Skarlso
Copy link
Contributor

Skarlso commented May 23, 2023

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 23, 2023
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 23, 2023
@Skarlso
Copy link
Contributor

Skarlso commented May 23, 2023

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 23, 2023
@Skarlso
Copy link
Contributor

Skarlso commented May 23, 2023

/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 23, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: richardcase, Skarlso

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:
  • OWNERS [Skarlso,richardcase]

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 merged commit 6827ce3 into kubernetes-sigs:main May 23, 2023
@k8s-infra-cherrypick-robot

@richardcase: #4285 failed to apply on top of branch "release-2.0":

Applying: fix: resolve secrets when generating eks userdata
Using index info to reconstruct a base tree...
M	bootstrap/eks/controllers/eksconfig_controller.go
M	bootstrap/eks/controllers/eksconfig_controller_reconciler_test.go
Falling back to patching base and 3-way merge...
Auto-merging bootstrap/eks/controllers/eksconfig_controller_reconciler_test.go
CONFLICT (content): Merge conflict in bootstrap/eks/controllers/eksconfig_controller_reconciler_test.go
Auto-merging bootstrap/eks/controllers/eksconfig_controller.go
CONFLICT (content): Merge conflict in bootstrap/eks/controllers/eksconfig_controller.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 fix: resolve secrets when generating eks userdata
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-2.0

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-infra-cherrypick-robot

@richardcase: #4285 failed to apply on top of branch "release-1.5":

Applying: fix: resolve secrets when generating eks userdata
Using index info to reconstruct a base tree...
M	bootstrap/eks/controllers/eksconfig_controller.go
M	bootstrap/eks/controllers/eksconfig_controller_reconciler_test.go
Falling back to patching base and 3-way merge...
Auto-merging bootstrap/eks/controllers/eksconfig_controller_reconciler_test.go
CONFLICT (content): Merge conflict in bootstrap/eks/controllers/eksconfig_controller_reconciler_test.go
Auto-merging bootstrap/eks/controllers/eksconfig_controller.go
CONFLICT (content): Merge conflict in bootstrap/eks/controllers/eksconfig_controller.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 fix: resolve secrets when generating eks userdata
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-1.5

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@faiq
Copy link
Contributor Author

faiq commented May 23, 2023

/cherrypick release-2.0

@k8s-infra-cherrypick-robot

@faiq: #4285 failed to apply on top of branch "release-2.0":

Applying: fix: resolve secrets when generating eks userdata
Using index info to reconstruct a base tree...
M	bootstrap/eks/controllers/eksconfig_controller.go
M	bootstrap/eks/controllers/eksconfig_controller_reconciler_test.go
Falling back to patching base and 3-way merge...
Auto-merging bootstrap/eks/controllers/eksconfig_controller_reconciler_test.go
CONFLICT (content): Merge conflict in bootstrap/eks/controllers/eksconfig_controller_reconciler_test.go
Auto-merging bootstrap/eks/controllers/eksconfig_controller.go
CONFLICT (content): Merge conflict in bootstrap/eks/controllers/eksconfig_controller.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 fix: resolve secrets when generating eks userdata
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-2.0

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot added a commit that referenced this pull request May 24, 2023
fix: resolve secrets when generating eks userdata (backport #4285)
k8s-ci-robot pushed a commit that referenced this pull request May 24, 2023
…2.1) (#4289)

* fix: resolve secrets when generating eks userdata

* fix: log line and resolve files error
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants