Skip to content
Open
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
4 changes: 4 additions & 0 deletions .github/workflows/lint_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ jobs:
helm repo add wiremind https://wiremind.github.io/wiremind-helm-charts --force-update
helm install snapshot-controller-crds wiremind/snapshot-controller-crds --version 6.2.1
fi
# karma + httproute
if [[ "$CHART_NAME" == *"karma" ]]; then
kubectl apply --server-side=true -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.5.1/standard-install.yaml
fi

- name: Run chart-testing (install)
run: ct install --config ct.yaml --helm-extra-args "--timeout 300s"
2 changes: 1 addition & 1 deletion charts/karma/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ home: https://github.com/prymitive/karma
sources:
- https://github.com/wiremind/wiremind-helm-charts/tree/main/charts/karma
- https://github.com/prymitive/karma
version: 2.12.0
version: 2.13.0
kubeVersion: ">= 1.19-0"
appVersion: "v0.121"
maintainers:
Expand Down
8 changes: 8 additions & 0 deletions charts/karma/ci/test-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
path: /
pathType: ImplementationSpecific

httpRoute:
enabled: true
hostnames:
- chart-example.local

Check failure on line 15 in charts/karma/ci/test-values.yaml

View workflow job for this annotation

GitHub Actions / Lint (ubuntu-latest, charts/karma)

15:4 [indentation] wrong indentation: expected 4 but found 3
parentRefs:
- name: gateway
namespace: default

kthxbyeSidecar:
enabled: true
alertmanagerServiceName: prometheus-alertmanager
Expand Down
20 changes: 20 additions & 0 deletions charts/karma/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,23 @@ Create the name of the service account to use
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

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

{{/*
Selector labels
*/}}
{{- define "karma.selectorLabels" -}}
app.kubernetes.io/name: {{ include "karma.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
11 changes: 3 additions & 8 deletions charts/karma/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ metadata:
name: {{ include "karma.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ include "karma.name" . }}
helm.sh/chart: {{ include "karma.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- include "karma.labels" . | nindent 4 }}
{{- with .Values.deployment.annotations }}
annotations:
{{ toYaml . | indent 4 }}
Expand All @@ -16,13 +13,11 @@ spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "karma.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- include "karma.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "karma.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- include "karma.selectorLabels" . | nindent 8 }}
{{- if .Values.podLabels -}}
{{ toYaml .Values.podLabels | nindent 8 }}
{{- end }}
Expand Down
5 changes: 1 addition & 4 deletions charts/karma/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ metadata:
name: {{ $fullName }}
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ include "karma.name" . }}
helm.sh/chart: {{ include "karma.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- include "karma.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- tpl (toYaml .) $ | nindent 4 }}
Expand Down
8 changes: 2 additions & 6 deletions charts/karma/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ metadata:
name: {{ include "karma.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ include "karma.name" . }}
helm.sh/chart: {{ include "karma.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- include "karma.labels" . | nindent 4 }}
{{- if .Values.service.labels }}
{{ toYaml .Values.service.labels | indent 4 }}
{{- end }}
Expand All @@ -25,5 +22,4 @@ spec:
protocol: TCP
name: http
selector:
app.kubernetes.io/name: {{ include "karma.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- include "karma.selectorLabels" . | nindent 4 }}
5 changes: 1 addition & 4 deletions charts/karma/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ metadata:
{{ toYaml .Values.serviceAccount.annotations | indent 4 }}
{{- end }}
labels:
app.kubernetes.io/name: {{ include "karma.name" . }}
helm.sh/chart: {{ include "karma.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- include "karma.labels" . | nindent 4 }}
name: {{ template "karma.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
Expand Down
8 changes: 2 additions & 6 deletions charts/karma/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ metadata:
name: {{ include "karma.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ include "karma.name" . }}
helm.sh/chart: {{ include "karma.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- include "karma.labels" . | nindent 4 }}
{{- if .Values.serviceMonitor.additionalLabels }}
{{ toYaml .Values.serviceMonitor.additionalLabels | indent 4 }}
{{- end }}
Expand All @@ -35,6 +32,5 @@ spec:
{{- end }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "karma.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- include "karma.selectorLabels" . | nindent 6 }}
{{- end }}
Loading