diff --git a/charts/openlit/Chart.yaml b/charts/openlit/Chart.yaml index 17b77f0..6d5a1dd 100644 --- a/charts/openlit/Chart.yaml +++ b/charts/openlit/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: openlit description: A Helm chart for OpenLIT type: application -version: 1.1.0 -appVersion: 1.2.0 +version: 1.2.0 +appVersion: 1.6.0 icon: https://avatars.githubusercontent.com/u/149867240?s=200&v=4 maintainers: diff --git a/charts/openlit/templates/_helpers.tpl b/charts/openlit/templates/_helpers.tpl index b9d057f..9f76b75 100644 --- a/charts/openlit/templates/_helpers.tpl +++ b/charts/openlit/templates/_helpers.tpl @@ -40,6 +40,10 @@ helm.sh/chart: {{ include "openlit.chart" . }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} +app.kubernetes.io/part-of: openlit +{{- if .Values.additionalLabels }} +{{ toYaml .Values.additionalLabels }} +{{- end }} {{- end }} {{/* diff --git a/charts/openlit/templates/clickhouse.yml b/charts/openlit/templates/clickhouse.yml index 0a68e8f..2b03b67 100644 --- a/charts/openlit/templates/clickhouse.yml +++ b/charts/openlit/templates/clickhouse.yml @@ -1,6 +1,10 @@ apiVersion: apps/v1 kind: StatefulSet metadata: + labels: + app: {{ .Release.Name }}-db + {{- include "openlit.labels" . | nindent 4 }} + app.kubernetes.io/component: database name: {{ .Release.Name }}-db namespace: {{ .Release.Namespace }} spec: @@ -9,10 +13,14 @@ spec: selector: matchLabels: app: {{ .Release.Name }}-db + {{- include "openlit.selectorLabels" . | nindent 6 }} + app.kubernetes.io/component: database template: metadata: labels: app: {{ .Release.Name }}-db + {{- include "openlit.labels" . | nindent 8 }} + app.kubernetes.io/component: database spec: terminationGracePeriodSeconds: 10 containers: @@ -59,6 +67,10 @@ spec: apiVersion: v1 kind: Service metadata: + labels: + app: {{ .Release.Name }}-db + {{- include "openlit.labels" . | nindent 4 }} + app.kubernetes.io/component: database name: {{ .Release.Name }}-db spec: ports: @@ -70,4 +82,6 @@ spec: name: http type: {{ .Values.clickhouse.service.type }} selector: - app: {{ .Release.Name }}-db \ No newline at end of file + app: {{ .Release.Name }}-db + {{- include "openlit.selectorLabels" . | nindent 4 }} + app.kubernetes.io/component: database \ No newline at end of file diff --git a/charts/openlit/templates/client.yaml b/charts/openlit/templates/client.yaml index ccb2129..343b8e0 100644 --- a/charts/openlit/templates/client.yaml +++ b/charts/openlit/templates/client.yaml @@ -5,7 +5,8 @@ metadata: name: openlit-collector-config labels: app: {{ include "openlit.fullname" . }} - component: opentelemetry-collector + {{- include "openlit.labels" . | nindent 4 }} + app.kubernetes.io/component: opentelemetry-collector data: opentelemetry-collector-config: | receivers: @@ -58,6 +59,10 @@ data: apiVersion: apps/v1 kind: StatefulSet metadata: + labels: + app: {{ include "openlit.fullname" . }} + {{- include "openlit.labels" . | nindent 4 }} + app.kubernetes.io/component: openlit name: {{ include "openlit.fullname" . }} namespace: {{ .Release.Namespace }} spec: @@ -66,10 +71,14 @@ spec: selector: matchLabels: app: {{ include "openlit.fullname" . }} + {{- include "openlit.selectorLabels" . | nindent 6 }} + app.kubernetes.io/component: openlit template: metadata: labels: app: {{ include "openlit.fullname" . }} + {{- include "openlit.labels" . | nindent 8 }} + app.kubernetes.io/component: openlit spec: containers: - name: openlit @@ -174,6 +183,8 @@ metadata: name: {{ include "openlit.fullname" . }} labels: app: {{ include "openlit.fullname" . }} + {{- include "openlit.labels" . | nindent 4 }} + app.kubernetes.io/component: openlit spec: type: {{ .Values.service.type }} ports: @@ -188,4 +199,6 @@ spec: targetPort: 4318 selector: app: {{ include "openlit.fullname" . }} + {{- include "openlit.selectorLabels" . | nindent 4 }} + app.kubernetes.io/component: openlit sessionAffinity: {{ .Values.service.sessionAffinity }} \ No newline at end of file diff --git a/charts/openlit/templates/ingress.yml b/charts/openlit/templates/ingress.yml index 62771cf..da460a1 100644 --- a/charts/openlit/templates/ingress.yml +++ b/charts/openlit/templates/ingress.yml @@ -17,7 +17,9 @@ kind: Ingress metadata: name: {{ $fullName }} labels: - {{- include "test.labels" . | nindent 4 }} + app: {{ include "openlit.fullname" . }} + {{- include "openlit.labels" . | nindent 4 }} + app.kubernetes.io/component: networking {{- with .Values.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} diff --git a/charts/openlit/values.yaml b/charts/openlit/values.yaml index 27c521c..1072ef0 100644 --- a/charts/openlit/values.yaml +++ b/charts/openlit/values.yaml @@ -3,6 +3,10 @@ nameOverride: "" # Overrides the default fullname for the release. fullnameOverride: "" +# Additional labels to add to all resources. +additionalLabels: {} + # my-label: my-value + # Number of replicas replicaCount: 1