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

Use default credential names if credential names are not set #5324

Merged
merged 1 commit into from
Mar 22, 2023

Conversation

thunderboltsid
Copy link
Contributor

@thunderboltsid thunderboltsid commented Mar 21, 2023

Use nutanix-credentials as NutanixDatacenterConfig credentialRef name if it is not present. This ensures we don't get a nil-pointer dereference during upgrade and upgrade can happen smoothly.

How has this been tested?

  • Created a cluster using a EKS-A CLI build before FCL changes were merged (NutanixDatacenterConfig spec had no credentialRef)
  • Upgraded the cluster successfully using an EKS-A CLI build with these changes included and using the same cluster spec as above (no credentialRef set on NutanixDatacenterConfig).

Full upgrade logs: https://app.warp.dev/block/w7d8Ic3TrSign6eYTeRv55

@eks-distro-bot
Copy link
Collaborator

Hi @thunderboltsid. Thanks for your PR.

I'm waiting for a aws member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@eks-distro-bot eks-distro-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 21, 2023
Use `nutanix-credentials` as NutanixDatacenterConfig credentialRef name
if it is not present. This ensures we don't get a nil-pointer dereference
during upgrade and upgrade can happen smoothly.
@thunderboltsid
Copy link
Contributor Author

/assign @abhinavmpandey08

@eks-distro-bot eks-distro-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 21, 2023
@panktishah26
Copy link
Member

Thanks Sid! You PR looks good. Can you pl update our doc to include this field under NutanixDatacenter spec?

@panktishah26
Copy link
Member

/lgtm

@thunderboltsid
Copy link
Contributor Author

Thanks Sid! You PR looks good. Can you pl update our doc to include this field under NutanixDatacenter spec?

Sure, should we do that in a separate PR?

@chrisdoherty4
Copy link
Contributor

Could you clarify the situation this arises?

Use nutanix-credentials as NutanixDatacenterConfig credentialRef name if it is not present.

@thunderboltsid
Copy link
Contributor Author

thunderboltsid commented Mar 21, 2023

Could you clarify the situation this arises?

Use nutanix-credentials as NutanixDatacenterConfig credentialRef name if it is not present.
Could you clarify the situation this arises?

Use nutanix-credentials as NutanixDatacenterConfig credentialRef name if it is not present.

This is in a brownfield upgrade path. So consider a case where a EKS-A cluster spec was generated and a cluster created with a EKS-A CLI built prior to our credentialRef+ FCL changes. Now upgrade the cluster with the latest EKS-A CLI changes but the same old cluster spec manifest.

@codecov
Copy link

codecov bot commented Mar 21, 2023

Codecov Report

Merging #5324 (854b81a) into main (3cd59c7) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #5324   +/-   ##
=======================================
  Coverage   72.41%   72.41%           
=======================================
  Files         440      440           
  Lines       36152    36155    +3     
=======================================
+ Hits        26179    26182    +3     
  Misses       8408     8408           
  Partials     1565     1565           
Impacted Files Coverage Δ
pkg/providers/nutanix/template.go 93.36% <100.00%> (+0.08%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@panktishah26
Copy link
Member

/lgtm

@panktishah26
Copy link
Member

/approve

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: panktishah26

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

@eks-distro-bot eks-distro-bot merged commit 3e26179 into aws:main Mar 22, 2023
@thunderboltsid thunderboltsid deleted the ntnx-fix-creds branch March 22, 2023 21:02
eks-distro-bot pushed a commit that referenced this pull request Mar 23, 2023
* Update branch name

* Update opencontainers/runc (#5306)

* Add Cilium skipUpgrade flag to v1alpha1 API (#5298)

* More 1.26 e2e tests (#5275)

* Changing logic for removing hardware from catalogue (#5296)

* Changing logic for removing hardware from catalogue to save list copy

* Adding more unit tests and moving out key create

* Revert "Update opencontainers/runc (#5306)" (#5309)

This reverts commit b1681d6.

* Validate Mgmt Cluster Bundles Version on Upgrade (#5263)

Validates that the management cluster's bundle is the same version or newer than the bundle version used to upgrade a workload cluster.

* change signaling method for FCL curated packages support (#5315)

Previously, the creation a of package bundle controller was executed via a
helm chart release. Now that helm chart will create a package instead. The end
result being the same, that the packages controller will notice the newly
created resource and do what it needs to support curated packages on the new
workload cluster.

One additional value is passed to the helm invocation to help the packages
controller take the appropriate actions.

* Make image-builder OS support and prerequisites section more clear (#5317)

* Autogenerate eksctl anywhere command doc from code (#5299)

* fix field to adapt to new schema (#5323)

* Fix kubectl get call to point to full API name (#5326)

* Fix providers to point to full API name

* Fix

* Fix unit-test

* Fixing tink reconcile worker template omit and logs (#5246)

* Implement unmanaged CNI for CLI based clusters (#5305)

* Remove hardcoded artifact links in docs (#5320)

* added insecure skip verify e2e test for 1.26 (#5322)

* Validate Mgmt Cluster Bundles Version on Create (#5321)

Validates that the management cluster's bundle is the same version or newer than the bundle version used to create a workload cluster.

* Add doc for Nutanix projects and Terraform support (#5330)

* Enable full lifecycle support for Tinkerbell (#5327)

* Fix ECR endpoint URL in Harbor use-case doc (#5233)

* add validation that checks if the OS is valid for the provided registry mirror configuration (#5314)

* set management cluster name helm value (#5331)

Passes the management cluster's name when installing curated packages on a
workload cluster. Removes the workloadOnly flag, as it's no longer needed in
this case, as the FCL/CLI curated packages installation for workload clusters
is now triggered from the workloadPackageOnly flag.

* Add insecureSkipVerify in registry mirror doc (#5339)

* Expand all kubectl calls to fully qualified names (#5332)

* Expand all kubectl calls to fully qualified names

* Fix unit-test

* Fix CAPI Machines

* Add uncovered unit-tests - 1

* Fix harbor endpoint URL in docs (#5340)

* Fix harbor endpoint URL in docs

* Restored previous image

* Add doc for harbor v2.7.1 (#5346)

* add doc for harbor v2.7.1

* more updates

* Add cluster lifecycle information to docs (#5302)

* Add cluster lifecycle information to docs

* Fixes from review comments

* Add wording about upgrade and delete

* Use default credential names if credential names are not set (#5324)

Use `nutanix-credentials` as NutanixDatacenterConfig credentialRef name
if it is not present. This ensures we don't get a nil-pointer dereference
during upgrade and upgrade can happen smoothly.

* Update e2e pkg metallb && Wait for pkg controller installation (#5351)

* MetalLB tests for multiple k8s versions

* Add e2e validation for package controller package installation

* Packages e2e cluster spec (#5221)

* Packages e2e tests for cluster spec

* Packages e2e cluster spec

* lint

* Fix nutanix bad rebase

* [PR BOT] Generate release test file (#5303)

* skipping tink tests due to lack of resources (#5357)

* [PR BOT] Update ATTRIBUTION.txt file (#5255)

* add kernel settings for BR (#5304)

* Bump Homebrew version for EKS-A v0.14.5 (#5355)

* Backport v0.14.5 changelog to main (#5354)

---------

Co-authored-by: Xu Deng <xudeng@amazon.com>
Co-authored-by: Chris Doherty <chris.doherty4@gmail.com>
Co-authored-by: Taylor Neyland <57606775+taneyland@users.noreply.github.com>
Co-authored-by: Aravind Ramalingam <60027164+pokearu@users.noreply.github.com>
Co-authored-by: Jonathan Meier <jonathanmeier5@users.noreply.github.com>
Co-authored-by: Eric Wollesen <169516+ewollesen@users.noreply.github.com>
Co-authored-by: Abhay Krishna <arnchlm@amazon.com>
Co-authored-by: Joey Wang <jiayiwang7@yahoo.com>
Co-authored-by: Vincent Ni <vincentni@users.noreply.github.com>
Co-authored-by: Vignesh Goutham Ganesh <72776369+vignesh-goutham@users.noreply.github.com>
Co-authored-by: Yannick Struyf <yannick.struyf@nutanix.com>
Co-authored-by: Mitali Paygude <mitalipaygude@gmail.com>
Co-authored-by: Hendry Anwar <hendry.anwar@live.com>
Co-authored-by: Chris Negus <striker57@gmail.com>
Co-authored-by: Sid Shukla <6081171+thunderboltsid@users.noreply.github.com>
Co-authored-by: Lewis Diamond <git@lewisdiamond.com>
Co-authored-by: Terry Howe <terrylhowe@gmail.com>
Co-authored-by: EKS Distro PR Bot <75336432+eks-distro-pr-bot@users.noreply.github.com>
Co-authored-by: ahreehong <46465244+ahreehong@users.noreply.github.com>
eks-distro-bot pushed a commit that referenced this pull request Mar 24, 2023
* Update opencontainers/runc (#5306)

* Add Cilium skipUpgrade flag to v1alpha1 API (#5298)

* More 1.26 e2e tests (#5275)

* Changing logic for removing hardware from catalogue (#5296)

* Changing logic for removing hardware from catalogue to save list copy

* Adding more unit tests and moving out key create

* Revert "Update opencontainers/runc (#5306)" (#5309)

This reverts commit b1681d6.

* Validate Mgmt Cluster Bundles Version on Upgrade (#5263)

Validates that the management cluster's bundle is the same version or newer than the bundle version used to upgrade a workload cluster.

* change signaling method for FCL curated packages support (#5315)

Previously, the creation a of package bundle controller was executed via a
helm chart release. Now that helm chart will create a package instead. The end
result being the same, that the packages controller will notice the newly
created resource and do what it needs to support curated packages on the new
workload cluster.

One additional value is passed to the helm invocation to help the packages
controller take the appropriate actions.

* Make image-builder OS support and prerequisites section more clear (#5317)

* Autogenerate eksctl anywhere command doc from code (#5299)

* fix field to adapt to new schema (#5323)

* Fix kubectl get call to point to full API name (#5326)

* Fix providers to point to full API name

* Fix

* Fix unit-test

* Fixing tink reconcile worker template omit and logs (#5246)

* Implement unmanaged CNI for CLI based clusters (#5305)

* Remove hardcoded artifact links in docs (#5320)

* added insecure skip verify e2e test for 1.26 (#5322)

* Validate Mgmt Cluster Bundles Version on Create (#5321)

Validates that the management cluster's bundle is the same version or newer than the bundle version used to create a workload cluster.

* Add doc for Nutanix projects and Terraform support (#5330)

* Enable full lifecycle support for Tinkerbell (#5327)

* Fix ECR endpoint URL in Harbor use-case doc (#5233)

* add validation that checks if the OS is valid for the provided registry mirror configuration (#5314)

* set management cluster name helm value (#5331)

Passes the management cluster's name when installing curated packages on a
workload cluster. Removes the workloadOnly flag, as it's no longer needed in
this case, as the FCL/CLI curated packages installation for workload clusters
is now triggered from the workloadPackageOnly flag.

* Add insecureSkipVerify in registry mirror doc (#5339)

* Expand all kubectl calls to fully qualified names (#5332)

* Expand all kubectl calls to fully qualified names

* Fix unit-test

* Fix CAPI Machines

* Add uncovered unit-tests - 1

* Fix harbor endpoint URL in docs (#5340)

* Fix harbor endpoint URL in docs

* Restored previous image

* Add doc for harbor v2.7.1 (#5346)

* add doc for harbor v2.7.1

* more updates

* Add cluster lifecycle information to docs (#5302)

* Add cluster lifecycle information to docs

* Fixes from review comments

* Add wording about upgrade and delete

* Use default credential names if credential names are not set (#5324)

Use `nutanix-credentials` as NutanixDatacenterConfig credentialRef name
if it is not present. This ensures we don't get a nil-pointer dereference
during upgrade and upgrade can happen smoothly.

* Update e2e pkg metallb && Wait for pkg controller installation (#5351)

* MetalLB tests for multiple k8s versions

* Add e2e validation for package controller package installation

* Packages e2e cluster spec (#5221)

* Packages e2e tests for cluster spec

* Packages e2e cluster spec

* lint

* Fix nutanix bad rebase

* [PR BOT] Generate release test file (#5303)

* skipping tink tests due to lack of resources (#5357)

* [PR BOT] Update ATTRIBUTION.txt file (#5255)

* add kernel settings for BR (#5304)

* Bump Homebrew version for EKS-A v0.14.5 (#5355)

* Backport v0.14.5 changelog to main (#5354)

* [PR BOT] Generate release testdata files (#5362)

---------

Co-authored-by: Xu Deng <xudeng@amazon.com>
Co-authored-by: Chris Doherty <chris.doherty4@gmail.com>
Co-authored-by: Taylor Neyland <57606775+taneyland@users.noreply.github.com>
Co-authored-by: Aravind Ramalingam <60027164+pokearu@users.noreply.github.com>
Co-authored-by: Jonathan Meier <jonathanmeier5@users.noreply.github.com>
Co-authored-by: Eric Wollesen <169516+ewollesen@users.noreply.github.com>
Co-authored-by: Abhay Krishna <arnchlm@amazon.com>
Co-authored-by: Joey Wang <jiayiwang7@yahoo.com>
Co-authored-by: Vincent Ni <vincentni@users.noreply.github.com>
Co-authored-by: Vignesh Goutham Ganesh <72776369+vignesh-goutham@users.noreply.github.com>
Co-authored-by: Yannick Struyf <yannick.struyf@nutanix.com>
Co-authored-by: Mitali Paygude <mitalipaygude@gmail.com>
Co-authored-by: Hendry Anwar <hendry.anwar@live.com>
Co-authored-by: Chris Negus <striker57@gmail.com>
Co-authored-by: Sid Shukla <6081171+thunderboltsid@users.noreply.github.com>
Co-authored-by: Lewis Diamond <git@lewisdiamond.com>
Co-authored-by: Terry Howe <terrylhowe@gmail.com>
Co-authored-by: EKS Distro PR Bot <75336432+eks-distro-pr-bot@users.noreply.github.com>
Co-authored-by: ahreehong <46465244+ahreehong@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-ok-to-test size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants