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

Default and unique label sets that comply with the k8s specifications #114

Open
jaolwi opened this issue Mar 25, 2024 · 2 comments · May be fixed by #138
Open

Default and unique label sets that comply with the k8s specifications #114

jaolwi opened this issue Mar 25, 2024 · 2 comments · May be fixed by #138

Comments

@jaolwi
Copy link

jaolwi commented Mar 25, 2024

All invenio k8s resources (deployment, service, etc) should have a unique label set for common and selector labels which can be assigned to a helm release and matches the k8s conventions.

https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/

Possible solution:

These label sets are also generated by helm create... by default:

{{/*
Common labels
*/}}
{{- define "invenio.labels" -}}
helm.sh/chart: {{ include "invenio.chart" . }}
{{ include "invenio.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "invenio.selectorLabels" -}}
app.kubernetes.io/name: {{ include "invenio.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
@jaolwi
Copy link
Author

jaolwi commented Mar 25, 2024

Partly already addressed by this issue #25

@lindhe
Copy link
Contributor

lindhe commented Mar 25, 2024

Good suggestion! Helm has some additional labels that we may also want to consider using: https://helm.sh/docs/chart_best_practices/labels/#standard-labels

egabancho added a commit to egabancho/helm-invenio that referenced this issue Dec 3, 2024
egabancho added a commit to egabancho/helm-invenio that referenced this issue Dec 5, 2024
@egabancho egabancho linked a pull request Dec 5, 2024 that will close this issue
egabancho added a commit to egabancho/helm-invenio that referenced this issue Dec 6, 2024
egabancho added a commit to egabancho/helm-invenio that referenced this issue Dec 10, 2024
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 a pull request may close this issue.

2 participants