Add teamspeak
This commit is contained in:
parent
7ab135e0be
commit
245468e34b
7 changed files with 171 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
variables:
|
variables:
|
||||||
WEBSITE_SRC: ${CI_PROJECT_DIR}/website
|
WEBSITE_SRC: ${CI_PROJECT_DIR}/website
|
||||||
INFRA_SRC: ${CI_PROJECT_DIR}/infra
|
INFRA_SRC: ${CI_PROJECT_DIR}/infra
|
||||||
|
TEAMSPEAK_SRC: ${CI_PROJECT_DIR}/teamspeak
|
||||||
|
|
||||||
IMAGE_PREFIX: registry.gitlab.com/momothereal/momoperes.ca
|
IMAGE_PREFIX: registry.gitlab.com/momothereal/momoperes.ca
|
||||||
WEBSITE_IMAGE: ${IMAGE_PREFIX}/website
|
WEBSITE_IMAGE: ${IMAGE_PREFIX}/website
|
||||||
|
@ -66,3 +67,21 @@ infra:deploy:
|
||||||
- master
|
- master
|
||||||
changes:
|
changes:
|
||||||
- infra/**/*
|
- infra/**/*
|
||||||
|
|
||||||
|
teamspeak:deploy:
|
||||||
|
stage: deploy
|
||||||
|
image: lwolf/helm-kubectl-docker:v1.15.4-v2.14.3
|
||||||
|
script:
|
||||||
|
- mkdir -p ${KUBECONFIG_PARENT}
|
||||||
|
- echo ${K8S_CLUSTER_CONFIG} | base64 -d > ${KUBECONFIG}
|
||||||
|
|
||||||
|
# Deploy using helm chart
|
||||||
|
- cd ${TEAMSPEAK_SRC}/chart
|
||||||
|
- mkdir -p manifests/
|
||||||
|
- helm template ./teamspeak/ --output-dir manifests/ --name teamspeak -f ./teamspeak/values.yaml
|
||||||
|
- kubectl apply --namespace ${DEPLOY_NAMESPACE} -R -f manifests/
|
||||||
|
only:
|
||||||
|
refs:
|
||||||
|
- master
|
||||||
|
changes:
|
||||||
|
- teamspeak/**/*
|
||||||
|
|
2
teamspeak/.gitignore
vendored
Normal file
2
teamspeak/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.idea/
|
||||||
|
chart/teamspeak/manifests/
|
6
teamspeak/chart/teamspeak/Chart.yaml
Normal file
6
teamspeak/chart/teamspeak/Chart.yaml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
apiVersion: v1
|
||||||
|
description: teamspeak
|
||||||
|
engine: gotpl
|
||||||
|
name: teamspeak
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: 3.9.1
|
66
teamspeak/chart/teamspeak/templates/deployment.yaml
Normal file
66
teamspeak/chart/teamspeak/templates/deployment.yaml
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}
|
||||||
|
labels:
|
||||||
|
app: teamspeak
|
||||||
|
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: teamspeak
|
||||||
|
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
{{- if .Values.podAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{ toYaml .Values.podAnnotations | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
app: teamspeak
|
||||||
|
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
spec:
|
||||||
|
{{- with .Values.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: teamspeak-server
|
||||||
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
ports:
|
||||||
|
- containerPort: 9987
|
||||||
|
protocol: UDP
|
||||||
|
resources:
|
||||||
|
{{ toYaml .Values.resources | indent 12 }}
|
||||||
|
env:
|
||||||
|
- name: TS3SERVER_LICENSE
|
||||||
|
value: accept
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /var/ts3server/
|
||||||
|
name: teamspeak-data
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: {{ .Values.image.pullSecret }}
|
||||||
|
volumes:
|
||||||
|
- name: teamspeak-data
|
||||||
|
{{- if .Values.persistence.enabled }}
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: {{ .Values.persistence.existingClaim | default (printf "%s-%s" (.Release.Name) "data") | quote }}
|
||||||
|
{{- else }}
|
||||||
|
emptyDir: {}
|
||||||
|
{{- end }}
|
28
teamspeak/chart/teamspeak/templates/pvc.yaml
Normal file
28
teamspeak/chart/teamspeak/templates/pvc.yaml
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-data
|
||||||
|
labels:
|
||||||
|
app: checkmk
|
||||||
|
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
{{- if .Values.persistence.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{ toYaml .Values.persistence.annotations | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- {{ .Values.persistence.accessMode | quote }}
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.persistence.storageSize | quote }}
|
||||||
|
{{- if .Values.persistence.storageClass }}
|
||||||
|
{{- if (eq "-" .Values.persistence.storageClass) }}
|
||||||
|
storageClassName: ""
|
||||||
|
{{- else }}
|
||||||
|
storageClassName: "{{ .Values.persistence.storageClass }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
20
teamspeak/chart/teamspeak/templates/service.yaml
Normal file
20
teamspeak/chart/teamspeak/templates/service.yaml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}
|
||||||
|
labels:
|
||||||
|
app: teamspeak
|
||||||
|
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
ports:
|
||||||
|
- nodePort: {{ .Values.service.nodePort }}
|
||||||
|
targetPort: 9987
|
||||||
|
protocol: UDP
|
||||||
|
name: teamspeak-voice
|
||||||
|
port: 9987
|
||||||
|
selector:
|
||||||
|
app: teamspeak
|
||||||
|
release: {{ .Release.Name }}
|
30
teamspeak/chart/teamspeak/values.yaml
Normal file
30
teamspeak/chart/teamspeak/values.yaml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
image:
|
||||||
|
repository: teamspeak
|
||||||
|
tag: 3.9.1
|
||||||
|
pullPolicy: Always
|
||||||
|
|
||||||
|
podAnnotations: {}
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: LoadBalancer
|
||||||
|
nodePort: 30987
|
||||||
|
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 250m
|
||||||
|
memory: 512Mi
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 256Mi
|
||||||
|
|
||||||
|
nodeSelector: {}
|
||||||
|
tolerations: []
|
||||||
|
affinity: {}
|
||||||
|
|
||||||
|
persistence:
|
||||||
|
enabled: true
|
||||||
|
accessMode: ReadWriteOnce
|
||||||
|
annotations:
|
||||||
|
"helm.sh/resource-policy": keep
|
||||||
|
storageClass: do-block-storage
|
||||||
|
storageSize: 1Gi
|
Loading…
Add table
Add a link
Reference in a new issue