Skip to content

Commit 22a512e

Browse files
committed
fix: Yaml fixes and release chart script
1 parent 528f1da commit 22a512e

File tree

8 files changed

+39
-18
lines changed

8 files changed

+39
-18
lines changed

Chart.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,12 @@ description: A Helm chart for deploying the Scalyr agent
44
type: application
55
version: 0.1.0
66
appVersion: 2.1.11
7+
keywords:
8+
- scalyr
9+
- logging
10+
- monitoring
11+
- metrics
12+
home: https://github.com/dodevops/helm-scalyr
13+
icon: https://app.scalyr.com/s2/src/img/logo-reverse.png
14+
sources:
15+
- https://github.com/dodevops/helm-scalyr

releaseChart.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env bash
2+
3+
if [ -z "$1" ]
4+
then
5+
echo "Usage: releaseChart.sh <version>"
6+
exit 1
7+
fi
8+
9+
VERSION="$1"
10+
11+
if [ "$(git branch --show-current)" != "gh-pages" ]
12+
then
13+
echo "Merge to gh-pages first!"
14+
exit 1
15+
fi
16+
17+
helm lint .
18+
19+
helm package .
20+
21+
helm repo index --url https://dodevops.github.io/helm-scalyr .
22+
23+

templates/_helpers.tpl

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,3 @@ Selector labels
5050
app.kubernetes.io/name: {{ include "scalyr-helm.name" . }}
5151
app.kubernetes.io/instance: {{ .Release.Name }}
5252
{{- end }}
53-
54-
{{/*
55-
Create the name of the service account to use
56-
*/}}
57-
{{- define "scalyr-helm.serviceAccountName" -}}
58-
{{- if .Values.serviceAccount.create }}
59-
{{- default (include "scalyr-helm.fullname" .) .Values.serviceAccount.name }}
60-
{{- else }}
61-
{{- default "default" .Values.serviceAccount.name }}
62-
{{- end }}
63-
{{- end }}

templates/cluster-role-binding.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ roleRef:
1111
name: "{{ include "scalyr-helm.fullname" . }}-cluster-role"
1212
subjects:
1313
- kind: "ServiceAccount"
14-
name: "{{ include "scalyr-helm.serviceAccountName" . }}"
14+
name: "{{ include "scalyr-helm.fullname" . }}-sa"
1515
{{- end }}

templates/configmap.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@ data:
1818
]
1919
}
2020
{{- end }}
21-
{{- toYaml .Values.scalyr.config | nindent 2 }}
21+
{{ with .Values.scalyr.config }}
22+
{{- toYaml . | nindent 2 }}
23+
{{- end }}

templates/daemonset.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ spec:
2222
imagePullSecrets:
2323
{{- toYaml . | nindent 8 }}
2424
{{- end }}
25-
serviceAccountName: {{ include "scalyr-helm.serviceAccountName" . }}
2625
securityContext:
2726
{{- toYaml .Values.podSecurityContext | nindent 8 }}
2827
volumes:
@@ -128,7 +127,7 @@ spec:
128127
dnsPolicy: "ClusterFirst"
129128
{{- if .Values.supportK8s }}
130129
automountServiceAccountToken: true
131-
serviceAccountName: "{{ include "scalyr-helm.serviceAccountName" . }}"
130+
serviceAccountName: "{{ include "scalyr-helm.fullname" . }}-sa"
132131
{{- end }}
133132
{{- with .Values.nodeSelector }}
134133
nodeSelector:

templates/deployment.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ spec:
2323
imagePullSecrets:
2424
{{- toYaml . | nindent 8 }}
2525
{{- end }}
26-
serviceAccountName: {{ include "scalyr-helm.serviceAccountName" . }}
2726
securityContext:
2827
{{- toYaml .Values.podSecurityContext | nindent 8 }}
2928
volumes:
@@ -129,7 +128,7 @@ spec:
129128
dnsPolicy: "ClusterFirst"
130129
{{- if .Values.supportK8s }}
131130
automountServiceAccountToken: true
132-
serviceAccountName: "{{ include "scalyr-helm.serviceAccountName" . }}"
131+
serviceAccountName: "{{ include "scalyr-helm.fullname" . }}-sa"
133132
{{- end }}
134133
{{- with .Values.nodeSelector }}
135134
nodeSelector:

templates/serviceaccount.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: v1
33
kind: ServiceAccount
44
metadata:
5-
name: {{ include "scalyr-helm.serviceAccountName" . }}
5+
name: {{ include "scalyr-helm.fullname" . }}-sa
66
labels:
77
{{- include "scalyr-helm.labels" . | nindent 4 }}
88
secrets:

0 commit comments

Comments
 (0)