mirror of
https://github.com/fluxerapp/fluxer.git
synced 2026-09-02 21:04:06 +03:00
64 lines
1.9 KiB
YAML
64 lines
1.9 KiB
YAML
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: nats
|
|
namespace: {{ .Values.global.namespace }}
|
|
labels:
|
|
{{- include "fluxer.labels" . | nindent 4 }}
|
|
app.kubernetes.io/name: nats
|
|
spec:
|
|
serviceName: nats-headless
|
|
replicas: {{ .Values.nats.replicas }}
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: nats
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "fluxer.labels" . | nindent 8 }}
|
|
app.kubernetes.io/name: nats
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
annotations:
|
|
checksum/config: {{ include (print $.Template.BasePath "/nats-configmap.yaml") . | sha256sum }}
|
|
spec:
|
|
terminationGracePeriodSeconds: 30
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
containers:
|
|
- name: nats
|
|
image: {{ .Values.nats.image }}:{{ .Values.nats.tag }}
|
|
args: ["-c", "/etc/nats/nats.conf"]
|
|
ports:
|
|
- name: client
|
|
containerPort: {{ .Values.nats.clientPort }}
|
|
- name: cluster
|
|
containerPort: {{ .Values.nats.clusterPort }}
|
|
- name: monitor
|
|
containerPort: {{ .Values.nats.monitorPort }}
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: monitor
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /healthz?js-enabled-only=true
|
|
port: monitor
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: /etc/nats
|
|
resources:
|
|
{{- toYaml .Values.nats.resources | nindent 12 }}
|
|
volumes:
|
|
- name: config
|
|
configMap:
|
|
name: nats-config
|