Files
sova-deploy/apps/docs/templates/all.yaml
T

75 lines
1.7 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: docs
namespace: {{ .Values.namespace }}
labels:
app: docs
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: docs
template:
metadata:
labels:
app: docs
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: docs
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: 8080
name: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
---
apiVersion: v1
kind: Service
metadata:
name: docs
namespace: {{ .Values.namespace }}
spec:
selector:
app: docs
ports:
- port: 80
targetPort: 8080
---
{{- if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: docs
namespace: {{ .Values.namespace }}
{{- if .Values.ingress.tls.enabled }}
annotations:
cert-manager.io/cluster-issuer: {{ .Values.ingress.tls.clusterIssuer | quote }}
nginx.ingress.kubernetes.io/ssl-redirect: "true"
{{- end }}
spec:
ingressClassName: {{ .Values.ingress.className }}
{{- if .Values.ingress.tls.enabled }}
tls:
- hosts:
- {{ .Values.ingress.host }}
secretName: {{ .Values.ingress.tls.secretName }}
{{- end }}
rules:
- host: {{ .Values.ingress.host }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: docs
port:
number: 80
{{- end }}