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

Define Required Metadata Labels on deployment definitions #18357

Closed
kristinochka opened this issue Nov 12, 2020 · 8 comments
Closed

Define Required Metadata Labels on deployment definitions #18357

kristinochka opened this issue Nov 12, 2020 · 8 comments
Labels
area/che-operator Issues and PRs related to Eclipse Che Kubernetes Operator kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system.
Milestone

Comments

@kristinochka
Copy link

Is your enhancement related to a problem? Please describe.

The labels that Kubernetes recommends provide useful identification information used by Kubernetes, users of the cluster, and other resources.
Following files do not have required Kubernetes metadata labels:

deploy/cluster_role.yaml
deploy/cluster_role_binding.yaml

"app.kubernetes.io/instance" "app.kubernetes.io/managed-by" "app.kubernetes.io/name" labels are missing.

Describe the solution you'd like

Example how this can be fixed:

metadata:
  labels:
    app.kubernetes.io/instance: my-instance
    app.kubernetes.io/managed-by: my-heritage
    app.kubernetes.io/name: my-name
    helm.sh/chart: my-chart

Describe alternatives you've considered

Additional context

@kristinochka kristinochka added the kind/enhancement A feature request - must adhere to the feature request template. label Nov 12, 2020
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Nov 12, 2020
@tolusha tolusha added area/che-operator Issues and PRs related to Eclipse Che Kubernetes Operator severity/P1 Has a major impact to usage or development of the system. labels Nov 13, 2020
@sleshchenko sleshchenko removed the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Nov 13, 2020
@tolusha tolusha added this to the 7.25 milestone Dec 16, 2020
@tolusha tolusha mentioned this issue Dec 24, 2020
79 tasks
@tolusha
Copy link
Contributor

tolusha commented Jan 12, 2021

@kristinochka
Could you clarify why cluster role/binding should not have default kubernetes labels ?

@kristinochka
Copy link
Author

Not sure I follow your question. This ticket says cluster_role.yaml and cluster_role_binding.yaml should have labels.

@tolusha
Copy link
Contributor

tolusha commented Jan 12, 2021

@kristinochka
sorry, I misread the description.

@kristinochka
Copy link
Author

I noticed there are a few other files are missing ["app.kubernetes.io/instance" "app.kubernetes.io/managed-by" "app.kubernetes.io/name"] labels under metadata.labels

deploy/role.yaml
deploy/role_binding.yaml
deploy/role_binding_oauth.yaml
deploy/service_account.yaml
deploy/operator.yaml
deploy/crds/org_v1_che_cr.yaml
deploy/crds/org_v1_che_crd.yaml

@tolusha
Copy link
Contributor

tolusha commented Jan 13, 2021

@kristinochka
There is another question
When Eclipse Che/CRW is deployed using OperatorHub
Some resources are created by olm and don't have required labels.

@kristinochka
Copy link
Author

You mean resources that are not controlled by che-operator?

@tolusha tolusha modified the milestones: 7.25, 7.26 Jan 14, 2021
@tolusha
Copy link
Contributor

tolusha commented Jan 14, 2021

Correct, for instance when Eclipse Che/CRW is deployed from OperatorHub then clusterrolebinding, serviceaccount, subscription.. etc are created by OLM and not by operator.

Another point all resources declared in #18357 (comment) are created during deployment but aren't managed by operator. From my point of view app.kubernetes.io/managed-by should be avoided in this case.

@tolusha tolusha mentioned this issue Jan 15, 2021
54 tasks
@kristinochka
Copy link
Author

For resources which are managed by olm (and not your operator), the recommendation is to use the following annotation: app.kubernetes.io/managed-by: olm

@tolusha tolusha closed this as completed Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/che-operator Issues and PRs related to Eclipse Che Kubernetes Operator kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

4 participants