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

fix(helm): remove CRDs already part of kubernetes-csi/external snapshotter #226

Conversation

rhr323
Copy link

@rhr323 rhr323 commented Apr 24, 2023

Why is this PR required? What issue does it fix?:

The helm chart includes CRDs that are part of kubernetes-csi/external-snapshotter. This causes some confusion when the CRDs are installed from two different sources.

What this PR does?:

This PR removes the CRDs that are already part of other kubernetes components.

Does this PR require any upgrade changes?:

Helm does not remove CRDs, so no longer having the CRDs in the helm chart should not cause any issues.

If the changes in this PR are manually verified, list down the scenarios covered::

Any additional information for your reviewer? :

This is a proposal, and would be happy to receive feedback, and/or understand the original reason why the CRDs have been duplicated to the helm chart of openebs/lvm-localpv.

Checklist:

  • Fixes #
  • PR Title follows the convention of <type>(<scope>): <subject>
  • Has the change log section been updated?
  • Commit has unit tests
  • Commit has integration tests
  • (Optional) Are upgrade changes included in this PR? If not, mention the issue/PR to track:
  • (Optional) If documentation changes are required, which issue on https://github.com/openebs/openebs-docs is used to track them:

PLEASE REMOVE BELOW INFORMATION BEFORE SUBMITTING

The PR title message must follow convention:
<type>(<scope>): <subject>.

Where:

  • type is defining if release will be triggering after merging submitted changes, details in CONTRIBUTING.md.
    Most common types are:

    • feat - for new features, not a new feature for build script
    • fix - for bug fixes or improvements, not a fix for build script
    • chore - changes not related to production code
    • docs - changes related to documentation
    • style - formatting, missing semi colons, linting fix etc; no significant production code changes
    • test - adding missing tests, refactoring tests; no production code change
    • refactor - refactoring production code, eg. renaming a variable or function name, there should not be any significant production code changes
  • scope is a single word that best describes where the changes fit.
    Most common scopes are like:

    • data engine (localpv, jiva, cstor)
    • feature (provisioning, backup, restore, exporter)
    • code component (api, webhook, cast, upgrade)
    • test (tests, bdd)
    • chores (version, build, log, travis)
  • subject is a single line brief description of the changes made in the pull request.

@rhr323 rhr323 force-pushed the remove-crds-already-part-of-kubernetes-from-helm branch from 01b0f16 to b80f7c7 Compare April 24, 2023 09:44
Signed-off-by: Istvan Nagy <istvan.nagy@elastic.co>
@rhr323 rhr323 force-pushed the remove-crds-already-part-of-kubernetes-from-helm branch from b80f7c7 to cf821a2 Compare April 24, 2023 09:46
@rhr323 rhr323 changed the title Remove CRDs already part of Kubernetes Remove CRDs already part of kubernetes-csi/external snapshotter Apr 28, 2023
@rhr323 rhr323 changed the title Remove CRDs already part of kubernetes-csi/external snapshotter fix(helm): remove CRDs already part of kubernetes-csi/external snapshotter Apr 28, 2023
@rhr323 rhr323 marked this pull request as ready for review April 28, 2023 12:00
Copy link
Member

@niladrih niladrih left a comment

Choose a reason for hiding this comment

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

@rhr323 -- These CRDs aren't exactly in-tree kubernetes components. many clusters (in-tree kubeadm clusters, for example) don't ship with these CRDs.

A good way to approach this problem may be to add sub-directories under the 'crds' directory to make it more obvious that some of these CRDs are not a part of the CSI driver..

Alternatively, I invite you to close this PR...

@rhr323
Copy link
Author

rhr323 commented Jun 1, 2023

Hey @niladrih , thanks for the response!

Maybe an other solution could be to wrap the CRDs in question, for example:

{{- if .Values.k8sStorageCrds.create }}
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: volumesnapshotclasses.snapshot.storage.k8s.io

....

{{- end }}

This way, users of openebs could decide whether they would like to install those CRDs or not... What do you think?

@niladrih
Copy link
Member

niladrih commented Jun 1, 2023

Sounds good to me @rhr323 . Let's leave installation on by default though...

@niladrih
Copy link
Member

@rhr323 this change has been included in PR #243, closing this one.

@niladrih niladrih closed this Jul 21, 2023
@rhr323 rhr323 deleted the remove-crds-already-part-of-kubernetes-from-helm branch July 23, 2023 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants