Skip to content

Conversation

@saad-ali
Copy link
Member

@saad-ali saad-ali commented Oct 24, 2018

What type of PR is this?
/kind feature

What this PR does / why we need it:
Register CSI CRDs as addon when the feature gates are enabled via the addon manager.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Short-term workaround for kubernetes/enhancements#615

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

New addon in addon manager that automatically installs CSI CRDs if CSIDriverRegistry or CSINodeInfo feature gates are true.

/sig storage

@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. kind/feature Categorizes issue or PR as related to a new feature. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. sig/storage Categorizes an issue or PR as relevant to SIG Storage. 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. labels Oct 24, 2018
@k8s-ci-robot k8s-ci-robot added the sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. label Oct 24, 2018
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 25, 2018
@k8s-ci-robot k8s-ci-robot added sig/testing Categorizes an issue or PR as relevant to SIG Testing. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Oct 29, 2018
@saad-ali
Copy link
Member Author

CC @davidz627

@davidz627
Copy link
Contributor

Do we have guarantees on when these CRDs will be installed? Does it always happen before nodes are made schedulable? (does not affect current PR but just for my understanding)

@saad-ali
Copy link
Member Author

saad-ali commented Nov 1, 2018

Do we have guarantees on when these CRDs will be installed? Does it always happen before nodes are made schedulable? (does not affect current PR but just for my understanding)

Discussed offline. Addons are installed as part of master setup.

@k8s-ci-robot k8s-ci-robot added the kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API label Nov 1, 2018
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 1, 2018
Copy link
Contributor

Choose a reason for hiding this comment

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

its unclear to me why we are removing this, previously the csinodeinfo.yaml was being generated from this definition when you ran the crd_test.go. That was useful for validation.

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 code generated version was previously being used as the source of truth, and the YAML was generated from it. Two problems with that was 1) source of truth should be a YAML file not generated code per API machinery folks. 2) the generated yaml contained invalid fields (e.g. status), that resulted not being able to use the YAML in kubectl create -f without disabling validation.

So instead I'm moving the source of truth to YAML in crd/manifests. If any one wants a programmatic version of it, they can load it from the YAML file (see the integration test that does this).

Copy link
Contributor

Choose a reason for hiding this comment

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

The source of truth should be "go IDL", i.e. types.go style struct definitions. yaml is also OK, although no tools will work on it. The code getting removed here was not an acceptable format for being a source of truth, so it's good that it's getting deleted.

Copy link
Contributor

Choose a reason for hiding this comment

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

reviewers too? (I could probably help with that)

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

Choose a reason for hiding this comment

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

copy does not drift in relation to what other copy?

Copy link
Member Author

Choose a reason for hiding this comment

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

Reworded to clarify.

@saad-ali
Copy link
Member Author

saad-ali commented Nov 2, 2018

/test pull-kubernetes-e2e-gce

@saad-ali saad-ali force-pushed the csiCRDAddon branch 3 times, most recently from 99b988b to 5c97b26 Compare November 2, 2018 01:49
@saad-ali saad-ali changed the title WIP: Register CSI CRDs as addon Register CSI CRDs as addon Nov 2, 2018
@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/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Nov 2, 2018
@saad-ali
Copy link
Member Author

saad-ali commented Nov 2, 2018

/test pull-kubernetes-verify
/test pull-kubernetes-integration

@saad-ali
Copy link
Member Author

saad-ali commented Nov 2, 2018

/test pull-kubernetes-e2e-kops-aws

Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't line 259 guarantee that KUBE_FEATURES_GATES is ALLAlpha=true?

I guest this block shouldn't be nested.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, but if a user explicitly disables this feature, I don't want to force it on even if it is enabled by default for alpha.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think I understand your question. We have a spec for the object, and will consider adding a status in the future if needed.

@AishSundar
Copy link
Contributor

/priority important-soon

@k8s-ci-robot k8s-ci-robot added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Nov 5, 2018
@saad-ali
Copy link
Member Author

saad-ali commented Nov 5, 2018

/test pull-kubernetes-e2e-kops-aws

@saad-ali
Copy link
Member Author

saad-ali commented Nov 5, 2018

/test pull-kubernetes-e2e-kops-aws
/test pull-kubernetes-e2e-gce-100-performance

Copy link
Member

Choose a reason for hiding this comment

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

Should these tests live next to the addon manifests?

Copy link
Member Author

Choose a reason for hiding this comment

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

I want the manifests dir to contain only the manifests and nothing else so that people can grab the entire directory as a source of truth and not get test files and other stuff with it. Would prefer to leave this as is.

Copy link
Member

Choose a reason for hiding this comment

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

delete this line since we are already cleaning up imports.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

Copy link
Member

Choose a reason for hiding this comment

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

Question: is the conversion from yaml to json here actually necessary? I though the universal decoder handled all serialization media types automatically.

Copy link
Member Author

Choose a reason for hiding this comment

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

Cleaned up.

@mikedanese
Copy link
Member

/approve

@saad-ali
Copy link
Member Author

saad-ali commented Nov 6, 2018

/test pull-kubernetes-e2e-kops-aws

@lavalamp
Copy link
Contributor

lavalamp commented Nov 6, 2018

I did not review the shell changes exhaustively, other than that lgtm.

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lavalamp, mikedanese, saad-ali

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

The pull request process is described here

Details 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 6, 2018
@davidz627
Copy link
Contributor

/retest

@saad-ali
Copy link
Member Author

saad-ali commented Nov 6, 2018

/test pull-kubernetes-e2e-gce

@msau42
Copy link
Member

msau42 commented Nov 7, 2018

/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 7, 2018
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

@k8s-ci-robot k8s-ci-robot merged commit 7fe5916 into kubernetes:master Nov 7, 2018
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/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/storage Categorizes an issue or PR as relevant to SIG Storage. sig/testing Categorizes an issue or PR as relevant to SIG Testing. 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.

9 participants