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

Lack of documentation when kubectl explain #1685

Closed
gecube opened this issue Sep 22, 2024 · 5 comments
Closed

Lack of documentation when kubectl explain #1685

gecube opened this issue Sep 22, 2024 · 5 comments
Labels
enhancement New feature or request triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@gecube
Copy link

gecube commented Sep 22, 2024

Like a DevOps I expect that kubectl explain GrafanaDashboard.spec.datasources would give me some meaningful output. Right not it returns

$ kubectl explain GrafanaDashboard.spec.datasources
GROUP:      grafana.integreatly.org
KIND:       GrafanaDashboard
VERSION:    v1beta1

FIELD: datasources <[]Object>


DESCRIPTION:
    <empty>
FIELDS:
  datasourceName	<string> -required-
    <no description>

  inputName	<string> -required-
    <no description>

It is very basic information. I'd like to see the documentation like for the embedded k8s api resources:

$ kubectl explain deployment.metadata.name
GROUP:      apps
KIND:       Deployment
VERSION:    v1

FIELD: name <string>


DESCRIPTION:
    Name must be unique within a namespace. Is required when creating resources,
    although some resources may allow a client to request the generation of an
    appropriate name automatically. Name is primarily intended for creation
    idempotence and configuration definition. Cannot be updated. More info:
    https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names

or good and mature operators like FluxCD:

$ kubectl explain helmrelease.spec.values
GROUP:      helm.toolkit.fluxcd.io
KIND:       HelmRelease
VERSION:    v2

FIELD: values <Object>


DESCRIPTION:
    Values holds the values for this Helm release.
@gecube gecube added enhancement New feature or request needs triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Sep 22, 2024
@theSuess theSuess added good first issue Good for newcomers triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Sep 23, 2024
@theSuess
Copy link
Member

Thanks for reporting this. This is definitely something we're interested in merging, but currently not our highest priority. If you have the time, we'd appreciate a PR. Otherwise, this will have to wait until one of us has some downtime

@theSuess
Copy link
Member

Revisiting this issue, I've checked against my installation where descriptions are present. How did you install the operator to test this?

We had issues with missing descriptions before, so I'd like to make sure they are still present in all installation methods (see #1567 for context)

@theSuess theSuess added triage/needs-information Indicates an issue needs more information in order to work on it. and removed good first issue Good for newcomers triage/accepted Indicates an issue or PR is ready to be actively worked on. labels Sep 24, 2024
@gecube
Copy link
Author

gecube commented Sep 24, 2024

@theSuess thanks. I will check and report back to you.

@gecube
Copy link
Author

gecube commented Oct 1, 2024

@theSuess So I found the reason.
I used https://github.com/aenix-io/cozystack where the grafana-operator of old version (~ half a year ago) was used. Unfortunately, helm upgrade for some reason DOES NOT updates CRDs.

https://helm.sh/docs/chart_best_practices/custom_resource_definitions/#some-caveats-and-explanations

There is no support at this time for upgrading or deleting CRDs using Helm. This was an explicit decision after much community discussion due to the danger for unintentional data loss. Furthermore, there is currently no community consensus around how to handle CRDs and their lifecycle. As this evolves, Helm will add support for those use cases.

The tools like FluxCD and ArgoCD solves this issue with their own features. Like https://fluxcd.io/flux/components/helm/helmreleases/#controlling-the-lifecycle-of-custom-resource-definitions

I think the issue could be closed as there is no good solution for upgrading CRDs with current tools.

@theSuess
Copy link
Member

theSuess commented Oct 1, 2024

Yeah, it really sucks that helm doesn't do CRD updates. We have the full instructions for manual upgrades in our documenation: https://grafana.github.io/grafana-operator/docs/installation/helm/#upgrading

Thanks for taking a closer look at what caused this in your case!

@theSuess theSuess closed this as not planned Won't fix, can't repro, duplicate, stale Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

No branches or pull requests

2 participants