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

Ensure fallback config is read only when prismCentral is absent #403

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

deepakm-ntnx
Copy link
Contributor

@deepakm-ntnx deepakm-ntnx commented Apr 3, 2024

Skip reading fallback config file from /etc/nutanix/config/prismCentral
if NutanixCluster has prismCentral set.

pkg/client/client.go Outdated Show resolved Hide resolved
pkg/client/client.go Outdated Show resolved Hide resolved
Copy link

codecov bot commented Apr 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 25.63%. Comparing base (3171df2) to head (6af6baa).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #403   +/-   ##
=======================================
  Coverage   25.63%   25.63%           
=======================================
  Files          19       19           
  Lines        1303     1303           
=======================================
  Hits          334      334           
  Misses        969      969           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

pkg/client/client.go Outdated Show resolved Hide resolved
Skip reading fallback config file from /etc/nutanix/config/prismCentral
if NutanixCluster has prismCentral set.
@thunderboltsid thunderboltsid changed the title [WIP] fix: now falling back to local file if could not create using NutanixCluster Ensure fallback config is only read when prismCentral is absent Apr 9, 2024
@thunderboltsid
Copy link
Contributor

/retest

@thunderboltsid thunderboltsid changed the title Ensure fallback config is only read when prismCentral is absent Ensure fallback config is read only when prismCentral is absent Apr 9, 2024
Copy link
Contributor

@adiantum adiantum left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@nutanix-cn-prow-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adiantum, deepakm-ntnx, dkoshkin

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 [adiantum,deepakm-ntnx]

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

@thunderboltsid thunderboltsid merged commit 92800d9 into main Apr 9, 2024
11 of 13 checks passed
@thunderboltsid thunderboltsid deleted the jira/krbn-8115 branch April 9, 2024 20:10
thunderboltsid added a commit that referenced this pull request Apr 10, 2024
Skip reading fallback config file from /etc/nutanix/config/prismCentral
if NutanixCluster has prismCentral set.

Co-authored-by: Sid Shukla <[email protected]>
thunderboltsid added a commit that referenced this pull request Apr 11, 2024
* refactor: client.go file helper methods (#360)

* refactor: client.go file helper methods

Refactored the existing methods and functions to be unit testable.
Also made some methods that do not use the struct as generic functions.
The changes were primarily an effort to add unit test coverage.

* refactor: more testable read file function

* test: new nutanixcluster types unit tests

* test: additional test cases for errors

* fixup! refactor: client.go file helper methods

* fixup! refactor: client.go file helper methods

* fixup! refactor: more testable read file function

* fixup! refactor: client.go file helper methods

* Ensure fallback config is only read when prismCentral is absent (#403)

Skip reading fallback config file from /etc/nutanix/config/prismCentral
if NutanixCluster has prismCentral set.

Co-authored-by: Sid Shukla <[email protected]>

* Update build-dev.yaml

add codecov token

---------

Co-authored-by: Dimitri Koshkin <[email protected]>
Co-authored-by: Deepak Muley <[email protected]>
thunderboltsid added a commit that referenced this pull request May 7, 2024
Skip reading fallback config file from /etc/nutanix/config/prismCentral
if NutanixCluster has prismCentral set.

Co-authored-by: Sid Shukla <[email protected]>
thunderboltsid added a commit that referenced this pull request May 8, 2024
* Ensure fallback config is only read when prismCentral is absent (#403)

Skip reading fallback config file from /etc/nutanix/config/prismCentral
if NutanixCluster has prismCentral set.

Co-authored-by: Sid Shukla <[email protected]>

* Add a provision for handling image based bootstrap (#406)

* Add a provision for handling image based bootstrap

AHV has a limit of 32KB for cloud-init userdata. In Openshift, the
ignition can be rather large (a magnitude over the limit). In
order to support larger userdata files, we allow mounting the customization
as an image.

* Only set guestcustomization explicitly when bootstrap ref is secret

* Use lowercase for data_source_reference kind.

---------

Co-authored-by: Sid Shukla <[email protected]>

* Introduce a nutanix prism client cache (#415)

* Introduce a nutanix prism client cache

The cache stores a prismgoclient.V3 client instance for each NutanixCluster instance.
The cache is shared between nutanixcluster and nutanixmachine controllers.

* Address review comments

* Update CAPI version in go.mod

This is to ensure newer versions of interfaces from SharedIndexInformers
don't cause compile failures.

Update go version to v1.22 becasue cmp.Or is only available in go v1.22

update prism-go-client

---------

Co-authored-by: Deepak Muley <[email protected]>
Co-authored-by: Yanhua Li <[email protected]>
@thunderboltsid thunderboltsid added the bug Something isn't working label Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved bug Something isn't working lgtm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants