Skip to content

Commit fbbbd97

Browse files
m00nyONEyGuy
authored andcommitted
rename chart to match helm naming convention
1 parent 441facb commit fbbbd97

File tree

6 files changed

+20
-20
lines changed

6 files changed

+20
-20
lines changed

helm/chatgpt-bot-chart/Chart.yaml renamed to helm/chatgpt-mattermost-bot/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v2
2-
name: chatgpt-bot-chart
2+
name: chatgpt-mattermost-bot
33
description: A Helm chart for Kubernetes
44

55
# A chart can be either an 'application' or a 'library' chart.

helm/chatgpt-bot-chart/templates/_helpers.tpl renamed to helm/chatgpt-mattermost-bot/templates/_helpers.tpl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{{/*
22
Expand the name of the chart.
33
*/}}
4-
{{- define "chatgpt-bot-chart.name" -}}
4+
{{- define "chatgpt-mattermost-bot.name" -}}
55
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
66
{{- end }}
77

@@ -10,7 +10,7 @@ Create a default fully qualified app name.
1010
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
1111
If release name contains chart name it will be used as a full name.
1212
*/}}
13-
{{- define "chatgpt-bot-chart.fullname" -}}
13+
{{- define "chatgpt-mattermost-bot.fullname" -}}
1414
{{- if .Values.fullnameOverride }}
1515
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
1616
{{- else }}
@@ -26,16 +26,16 @@ If release name contains chart name it will be used as a full name.
2626
{{/*
2727
Create chart name and version as used by the chart label.
2828
*/}}
29-
{{- define "chatgpt-bot-chart.chart" -}}
29+
{{- define "chatgpt-mattermost-bot.chart" -}}
3030
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
3131
{{- end }}
3232

3333
{{/*
3434
Common labels
3535
*/}}
36-
{{- define "chatgpt-bot-chart.labels" -}}
37-
helm.sh/chart: {{ include "chatgpt-bot-chart.chart" . }}
38-
{{ include "chatgpt-bot-chart.selectorLabels" . }}
36+
{{- define "chatgpt-mattermost-bot.labels" -}}
37+
helm.sh/chart: {{ include "chatgpt-mattermost-bot.chart" . }}
38+
{{ include "chatgpt-mattermost-bot.selectorLabels" . }}
3939
{{- if .Chart.AppVersion }}
4040
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
4141
{{- end }}
@@ -45,17 +45,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
4545
{{/*
4646
Selector labels
4747
*/}}
48-
{{- define "chatgpt-bot-chart.selectorLabels" -}}
49-
app.kubernetes.io/name: {{ include "chatgpt-bot-chart.name" . }}
48+
{{- define "chatgpt-mattermost-bot.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "chatgpt-mattermost-bot.name" . }}
5050
app.kubernetes.io/instance: {{ .Release.Name }}
5151
{{- end }}
5252

5353
{{/*
5454
Create the name of the service account to use
5555
*/}}
56-
{{- define "chatgpt-bot-chart.serviceAccountName" -}}
56+
{{- define "chatgpt-mattermost-bot.serviceAccountName" -}}
5757
{{- if .Values.serviceAccount.create }}
58-
{{- default (include "chatgpt-bot-chart.fullname" .) .Values.serviceAccount.name }}
58+
{{- default (include "chatgpt-mattermost-bot.fullname" .) .Values.serviceAccount.name }}
5959
{{- else }}
6060
{{- default "default" .Values.serviceAccount.name }}
6161
{{- end }}
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v1
22
kind: Secret
33
metadata:
4-
name: {{ include "chatgpt-bot-chart.fullname" . }}-secret
4+
name: {{ include "chatgpt-mattermost-bot.fullname" . }}-secret
55
data:
66
MATTERMOST_TOKEN: {{ .Values.chatbot.mattermostToken | b64enc }}
77
OPENAI_API_KEY: {{ .Values.chatbot.openaiApiKey | b64enc }}

helm/chatgpt-bot-chart/templates/deployment.yaml renamed to helm/chatgpt-mattermost-bot/templates/deployment.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
apiVersion: apps/v1
22
kind: Deployment
33
metadata:
4-
name: {{ include "chatgpt-bot-chart.fullname" . }}
4+
name: {{ include "chatgpt-mattermost-bot.fullname" . }}
55
labels:
6-
{{- include "chatgpt-bot-chart.labels" . | nindent 4 }}
6+
{{- include "chatgpt-mattermost-bot.labels" . | nindent 4 }}
77
spec:
88
{{- if not .Values.autoscaling.enabled }}
99
replicas: {{ .Values.replicaCount }}
1010
{{- end }}
1111
selector:
1212
matchLabels:
13-
{{- include "chatgpt-bot-chart.selectorLabels" . | nindent 6 }}
13+
{{- include "chatgpt-mattermost-bot.selectorLabels" . | nindent 6 }}
1414
template:
1515
metadata:
1616
{{- with .Values.podAnnotations }}
1717
annotations:
1818
{{- toYaml . | nindent 8 }}
1919
{{- end }}
2020
labels:
21-
{{- include "chatgpt-bot-chart.selectorLabels" . | nindent 8 }}
21+
{{- include "chatgpt-mattermost-bot.selectorLabels" . | nindent 8 }}
2222
spec:
2323
{{- with .Values.imagePullSecrets }}
2424
imagePullSecrets:
2525
{{- toYaml . | nindent 8 }}
2626
{{- end }}
27-
serviceAccountName: {{ include "chatgpt-bot-chart.serviceAccountName" . }}
27+
serviceAccountName: {{ include "chatgpt-mattermost-bot.serviceAccountName" . }}
2828
securityContext:
2929
{{- toYaml .Values.podSecurityContext | nindent 8 }}
3030
containers:
@@ -38,7 +38,7 @@ spec:
3838
value: {{ .Values.mattermost.clusterUrl }}:{{ .Values.mattermost.port }}
3939
envFrom:
4040
- secretRef:
41-
name: {{ include "chatgpt-bot-chart.fullname" . }}-secret
41+
name: {{ include "chatgpt-mattermost-bot.fullname" . }}-secret
4242
ports:
4343
- name: http
4444
containerPort: {{ .Values.service.port }}

helm/chatgpt-bot-chart/templates/serviceaccount.yaml renamed to helm/chatgpt-mattermost-bot/templates/serviceaccount.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
apiVersion: v1
33
kind: ServiceAccount
44
metadata:
5-
name: {{ include "chatgpt-bot-chart.serviceAccountName" . }}
5+
name: {{ include "chatgpt-mattermost-bot.serviceAccountName" . }}
66
labels:
7-
{{- include "chatgpt-bot-chart.labels" . | nindent 4 }}
7+
{{- include "chatgpt-mattermost-bot.labels" . | nindent 4 }}
88
{{- with .Values.serviceAccount.annotations }}
99
annotations:
1010
{{- toYaml . | nindent 4 }}

0 commit comments

Comments
 (0)