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

Determine cluster distribution server version & type using kubernetes API server version #2404

Merged

Conversation

chethanv28
Copy link
Collaborator

@chethanv28 chethanv28 commented May 30, 2023

What this PR does / why we need it:
This PR is attempting to set cluster distribution type based on the k8s API server version by fetching it from the k8s cluster.
This PR is still in-works. Please do not review.

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

Testing done:
Here is a cluster with the cluster-distribution field set to empty string:

[Global]
insecure-flag = "true"
cluster-id = "cluster1"
cluster-distribution = ""

[VirtualCenter "10.186.63.186"]
user = "****"
password = "****"
datacenters = "VSAN-DC"
port = "443"

With the changes from this PR, the cluster distribution is set dynamically to Vanillak8s as the API server version is empty

FieldSetDynamically

Special notes for your reviewer:

Release note:

Determine cluster distribution server version & type using kubernetes API server version

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 30, 2023
@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 30, 2023
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 30, 2023
@chethanv28 chethanv28 changed the title WIP: Determine cluster distribution server version & type using kubernetes API server version Determine cluster distribution server version & type using kubernetes API server version Jun 8, 2023
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 8, 2023
@chethanv28 chethanv28 force-pushed the telemetry-improvements branch 3 times, most recently from 04bbe75 to 8589611 Compare June 9, 2023 01:51
@svcbot-qecnsdp
Copy link

Started Vanilla block pre-checkin pipeline... Build Number: 2198

@divyenpatel
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Jun 9, 2023
cmd/syncer/main.go Show resolved Hide resolved
cmd/syncer/main.go Show resolved Hide resolved
cmd/syncer/main.go Show resolved Hide resolved
cmd/syncer/main.go Outdated Show resolved Hide resolved
@svcbot-qecnsdp
Copy link

Started Vanilla block pre-checkin pipeline... Build Number: 2201

@svcbot-qecnsdp
Copy link

Build ID: 2201
Block vanilla build status: SUCCESS 
Stage before exit: e2e-tests 
Jenkins E2E Test Results: 
------------------------------

Ran 2 of 743 Specs in 82.895 seconds
SUCCESS! -- 2 Passed | 0 Failed | 0 Pending | 741 Skipped
PASS

Ginkgo ran 1 suite in 14m23.803753139s
Test Suite Passed

Copy link
Member

@divyenpatel divyenpatel left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chethanv28, divyenpatel

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 [chethanv28,divyenpatel]

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 3c253b6 into kubernetes-sigs:master Jun 13, 2023
13 checks passed
rajguptavm pushed a commit to rajguptavm/vsphere-csi-driver that referenced this pull request Jul 20, 2023
… API server version (kubernetes-sigs#2404)

* Determine cluster distribution server version & type using kubernetes API server version

* Exit the container if we are not able to fetch the k8s client

* break the loop as soon as we find the distribution type
chethanv28 added a commit to chethanv28/vsphere-csi-driver that referenced this pull request Sep 20, 2023
… API server version (kubernetes-sigs#2404)

* Determine cluster distribution server version & type using kubernetes API server version

* Exit the container if we are not able to fetch the k8s client

* break the loop as soon as we find the distribution type
chethanv28 added a commit to chethanv28/vsphere-csi-driver that referenced this pull request Sep 20, 2023
… API server version (kubernetes-sigs#2404)

* Determine cluster distribution server version & type using kubernetes API server version

* Exit the container if we are not able to fetch the k8s client

* break the loop as soon as we find the distribution type
k8s-ci-robot pushed a commit that referenced this pull request Sep 26, 2023
… during attach/detach. (#2573)

* Determine cluster distribution server version & type using kubernetes API server version (#2404)

* Determine cluster distribution server version & type using kubernetes API server version

* Exit the container if we are not able to fetch the k8s client

* break the loop as soon as we find the distribution type

* skip adding node to cache during attach or detach operation (#2546)

---------

Co-authored-by: Divyen Patel <divyenp@vmware.com>
k8s-ci-robot pushed a commit that referenced this pull request Sep 26, 2023
…related to AttachVolumes and also the nodes cache fix during attach/detach. (#2561)

* Determine cluster distribution server version & type using kubernetes API server version (#2404)

* Determine cluster distribution server version & type using kubernetes API server version

* Exit the container if we are not able to fetch the k8s client

* break the loop as soon as we find the distribution type

* skip adding node to cache during attach or detach operation (#2546)

* Return volume path as part of ListVolumes response for migrated volumes (#2558)

---------

Co-authored-by: Divyen Patel <divyenp@vmware.com>
Co-authored-by: Aditya Kulkarni <adkulkarni@vmware.com>
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe 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.

None yet

4 participants