Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Add default kubernetes labels #324

Merged
merged 2 commits into from
Feb 10, 2021
Merged

Add default kubernetes labels #324

merged 2 commits into from
Feb 10, 2021

Conversation

tolusha
Copy link
Contributor

@tolusha tolusha commented Jan 11, 2021

Signed-off-by: Anatolii Bazko abazko@redhat.com

What does this PR do?

  • Add default kubernetes labels
  • Specify container limits
  • Add securityContext:
         securityContext:
           capabilities:
             drop:
               - ALL

What issues does this PR fix or reference?

eclipse-che/che#18357

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

Signed-off-by: Anatolii Bazko <abazko@redhat.com>
Copy link
Member

@sleshchenko sleshchenko left a comment

Choose a reason for hiding this comment

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

Do not service and ingress needs default labels set as well?

name: che-devfile-registry
labels:
app: che
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need app? Should not it be replaced with app.kubernetes.io/name: che?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We use these labels on chectl side to find a corresponding deployment.

spec:
replicas: 1
revisionHistoryLimit: 2
selector:
matchLabels:
app: che-devfile-registry
app: che
component: devfile-registry
Copy link
Member

Choose a reason for hiding this comment

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

Should not it be replaced with app.kubernetes.io/component from https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/ ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We keep those labels in che-operator since selector field is immutable.
So I decided to keep the same labels here as well.

app: che
component: devfile-registry

Signed-off-by: Anatolii Bazko <abazko@redhat.com>
@tolusha
Copy link
Contributor Author

tolusha commented Feb 2, 2021

@ibuziuk
Do you use these templates somewhere ?

@tolusha tolusha mentioned this pull request Feb 5, 2021
57 tasks
@tolusha tolusha merged commit 1b5d116 into master Feb 10, 2021
@tolusha tolusha deleted the labels branch February 10, 2021 12:36
@che-bot che-bot added this to the 7.27 milestone Feb 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants