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

Common labels #8

Merged
merged 3 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions clients/harbor-client/charts/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,6 @@ Create chart name and version as used by the chart label.
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

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

{{/*
Selector labels
*/}}
{{- define "snappcloud-harbor-client.selectorLabels" -}}
Expand Down
7 changes: 0 additions & 7 deletions clients/harbor-client/charts/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "snappcloud-harbor-client.fullname" . }}
labels:
{{- include "snappcloud-harbor-client.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
Expand All @@ -15,11 +13,6 @@ spec:
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "snappcloud-harbor-client.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
2 changes: 0 additions & 2 deletions clients/harbor-client/charts/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.configSecretName }}
labels:
{{- include "snappcloud-harbor-client.labels" . | nindent 4 }}
type: Opaque
stringData:
IMAGE_REFERENCE: "The image reference URL starts with //."
2 changes: 0 additions & 2 deletions clients/harbor-client/charts/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "snappcloud-harbor-client.fullname" . }}
labels:
{{- include "snappcloud-harbor-client.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
Expand Down
13 changes: 0 additions & 13 deletions clients/proxy-client/charts/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,6 @@ Create chart name and version as used by the chart label.
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

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

{{/*
Selector labels
*/}}
{{- define "snappcloud-proxy-client.selectorLabels" -}}
Expand Down
7 changes: 0 additions & 7 deletions clients/proxy-client/charts/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "snappcloud-proxy-client.fullname" . }}
labels:
{{- include "snappcloud-proxy-client.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
Expand All @@ -15,11 +13,6 @@ spec:
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "snappcloud-proxy-client.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
2 changes: 0 additions & 2 deletions clients/proxy-client/charts/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.configSecretName }}
labels:
{{- include "snappcloud-proxy-client.labels" . | nindent 4 }}
type: Opaque
stringData:
PROXY_URL: "The proxy address."
2 changes: 0 additions & 2 deletions clients/proxy-client/charts/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "snappcloud-proxy-client.fullname" . }}
labels:
{{- include "snappcloud-proxy-client.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
Expand Down
Loading