96 lines
2.3 KiB
YAML
96 lines
2.3 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ .Release.Name }}
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app: {{ .Release.Name }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: {{ .Release.Name }}
|
|
spec:
|
|
imagePullSecrets: []
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
- name: influxdb2
|
|
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- name: http
|
|
containerPort: 8086
|
|
startupProbe:
|
|
httpGet: {path: /health, port: http}
|
|
failureThreshold: 60
|
|
periodSeconds: 5
|
|
timeoutSeconds: 3
|
|
readinessProbe:
|
|
httpGet: {path: /health, port: http}
|
|
failureThreshold: 3
|
|
periodSeconds: 10
|
|
timeoutSeconds: 3
|
|
livenessProbe:
|
|
httpGet: {path: /health, port: http}
|
|
failureThreshold: 6
|
|
periodSeconds: 10
|
|
timeoutSeconds: 3
|
|
{{- with .Values.resources }}
|
|
resources:
|
|
{{- toYaml . | nindent 10 }}
|
|
{{- end }}
|
|
{{- with .Values.env }}
|
|
env:
|
|
{{- toYaml . | nindent 10 }}
|
|
{{- end }}
|
|
volumeMounts:
|
|
- name: influxdb2
|
|
mountPath: /var/lib/influxdb2
|
|
volumes:
|
|
- name: influxdb2
|
|
persistentVolumeClaim:
|
|
claimName: {{ required "persistence.existingClaim is required" .Values.persistence.existingClaim }}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ .Release.Name }}
|
|
spec:
|
|
type: ClusterIP
|
|
selector:
|
|
app: {{ .Release.Name }}
|
|
ports:
|
|
- name: http
|
|
port: 80
|
|
targetPort: 8086
|
|
{{- if .Values.ingress.enabled }}
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: {{ .Release.Name }}
|
|
{{- with .Values.ingress.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
ingressClassName: {{ .Values.ingress.className }}
|
|
rules:
|
|
- host: {{ required "ingress.host is required" .Values.ingress.host }}
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ .Release.Name }}
|
|
port:
|
|
name: http
|
|
{{- end }}
|