Compare commits

...

2 Commits

Author SHA1 Message Date
Martyn b891b74d4b Start() is blocking....
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details
Signed-off-by: Martyn Ranyard <m@rtyn.berlin>
2020-07-14 21:52:33 +02:00
Martyn 34db02c548 Helm chart tweaks
Signed-off-by: Martyn Ranyard <m@rtyn.berlin>
2020-07-14 21:51:35 +02:00
5 changed files with 24 additions and 13 deletions

View File

@ -2,6 +2,9 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: {{ include "twitchsingstools.fullname" . }} name: {{ include "twitchsingstools.fullname" . }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
labels: labels:
{{- include "twitchsingstools.labels" . | nindent 4 }} {{- include "twitchsingstools.labels" . | nindent 4 }}
spec: spec:
@ -13,6 +16,9 @@ spec:
metadata: metadata:
labels: labels:
{{- include "twitchsingstools.selectorLabels" . | nindent 8 }} {{- include "twitchsingstools.selectorLabels" . | nindent 8 }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
spec: spec:
{{- with .Values.imagePullSecrets }} {{- with .Values.imagePullSecrets }}
imagePullSecrets: imagePullSecrets:
@ -25,11 +31,11 @@ spec:
- name: {{ .Chart.Name }} - name: {{ .Chart.Name }}
securityContext: securityContext:
{{- toYaml .Values.securityContext | nindent 12 }} {{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}" image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default "latest" }}"
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
ports: ports:
- name: http - name: http
containerPort: 80 containerPort: 5353
protocol: TCP protocol: TCP
livenessProbe: livenessProbe:
httpGet: httpGet:

View File

@ -1,12 +1,12 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: PersistentVolumeClaim
metadata: metadata:
name: {{ include "twitchsingstools.serviceAccountName" . }} name: tstools-data
labels: labels:
{{- include "twitchsingstools.labels" . | nindent 4 }} {{- include "twitchsingstools.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }} spec:
annotations: accessModes:
{{- toYaml . | nindent 4 }} - ReadWriteOnce
{{- end }} resources:
{{- end -}} requests:
storage: {{ .Values.storageSize }}

View File

@ -5,7 +5,7 @@
replicaCount: 1 replicaCount: 1
image: image:
repository: twitchsingstools repository: imartyn/twitchsingstools
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
imagePullSecrets: [] imagePullSecrets: []
@ -39,6 +39,8 @@ irc:
twitchapp: {} twitchapp: {}
storageSize: 10Gi
service: service:
type: ClusterIP type: ClusterIP
port: 80 port: 80
@ -51,7 +53,8 @@ ingress:
kubernetes.io/ingress.class: nginx kubernetes.io/ingress.class: nginx
hosts: hosts:
- host: twitchsingstools.ing.martyn.berlin - host: twitchsingstools.ing.martyn.berlin
paths: [] paths:
- /
tls: tls:
- secretName: tstools-tls - secretName: tstools-tls
hosts: hosts:

View File

@ -196,10 +196,12 @@ func main() {
Database: *persistentData, Database: *persistentData,
Config: config, Config: config,
} }
myBot.Start()
} }
go func() { go func() {
rgb.YPrintf("[%s] Starting webserver on port %s\n", irc.TimeStamp(), "5353") rgb.YPrintf("[%s] Starting webserver on port %s\n", irc.TimeStamp(), "5353")
webserver.HandleHTTP(&myBot) webserver.HandleHTTP(&myBot)
}() }()
if ircOauthPath != "" {
myBot.Start()
}
} }