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

View File

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

View File

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