Adding karma container

This commit is contained in:
Jonathan Ervine 2022-03-26 22:39:07 +08:00
parent d208afd7bd
commit b606690bbc
4 changed files with 64 additions and 9 deletions

View File

@ -0,0 +1,55 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "karma.fullname" . }}
labels:
{{- include "karma.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "karma.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "karma.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "karma.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 8080
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

View File

@ -1,5 +1,5 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "jellyfin.fullname" . -}}
{{- $fullName := include "karma.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
@ -10,7 +10,7 @@ kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "jellyfin.labels" . | nindent 4 }}
{{- include "karma.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}

View File

@ -1,15 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "jellyfin.fullname" . }}
name: {{ include "karma.fullname" . }}
labels:
{{- include "jellyfin.labels" . | nindent 4 }}
{{- include "karma.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: 8096
targetPort: 8080
protocol: TCP
name: jellyfin
name: karma
selector:
{{- include "jellyfin.selectorLabels" . | nindent 4 }}
{{- include "karma.selectorLabels" . | nindent 4 }}

View File

@ -2,7 +2,7 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "jellyfin.serviceAccountName" . }}
name: {{ include "karma.serviceAccountName" . }}
labels:
{{ include "jellyfin.labels" . | nindent 4 }}
{{ include "karma.labels" . | nindent 4 }}
{{- end -}}