124 lines
3.5 KiB
YAML
124 lines
3.5 KiB
YAML
# Source: loki/templates/single-binary/statefulset.yaml
|
|
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: loki
|
|
namespace: vynil-monitor
|
|
labels:
|
|
helm.sh/chart: loki-5.42.0
|
|
app.kubernetes.io/name: loki
|
|
app.kubernetes.io/instance: loki
|
|
app.kubernetes.io/version: "2.9.3"
|
|
app.kubernetes.io/managed-by: Helm
|
|
app.kubernetes.io/component: single-binary
|
|
app.kubernetes.io/part-of: memberlist
|
|
spec:
|
|
replicas: 1
|
|
podManagementPolicy: Parallel
|
|
updateStrategy:
|
|
rollingUpdate:
|
|
partition: 0
|
|
serviceName: loki-headless
|
|
revisionHistoryLimit: 10
|
|
|
|
persistentVolumeClaimRetentionPolicy:
|
|
whenDeleted: Delete
|
|
whenScaled: Delete
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: loki
|
|
app.kubernetes.io/instance: loki
|
|
app.kubernetes.io/component: single-binary
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
checksum/config: 460436a92733ff5d408f5f9ce92c1b436dccb5d60e0b4040a9511a6e21252c53
|
|
labels:
|
|
app.kubernetes.io/name: loki
|
|
app.kubernetes.io/instance: loki
|
|
app.kubernetes.io/component: single-binary
|
|
app.kubernetes.io/part-of: memberlist
|
|
spec:
|
|
serviceAccountName: loki
|
|
automountServiceAccountToken: true
|
|
enableServiceLinks: true
|
|
|
|
securityContext:
|
|
fsGroup: 10001
|
|
runAsGroup: 10001
|
|
runAsNonRoot: true
|
|
runAsUser: 10001
|
|
terminationGracePeriodSeconds: 30
|
|
containers:
|
|
- name: loki
|
|
image: docker.io/grafana/loki:2.9.3
|
|
imagePullPolicy: IfNotPresent
|
|
args:
|
|
- -config.file=/etc/loki/config/config.yaml
|
|
- -target=all
|
|
ports:
|
|
- name: http-metrics
|
|
containerPort: 3100
|
|
protocol: TCP
|
|
- name: grpc
|
|
containerPort: 9095
|
|
protocol: TCP
|
|
- name: http-memberlist
|
|
containerPort: 7946
|
|
protocol: TCP
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
readOnlyRootFilesystem: true
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /ready
|
|
port: http-metrics
|
|
initialDelaySeconds: 30
|
|
timeoutSeconds: 1
|
|
volumeMounts:
|
|
- name: tmp
|
|
mountPath: /tmp
|
|
- name: config
|
|
mountPath: /etc/loki/config
|
|
- name: runtime-config
|
|
mountPath: /etc/loki/runtime-config
|
|
- name: storage
|
|
mountPath: /var/loki
|
|
resources:
|
|
{}
|
|
affinity:
|
|
podAntiAffinity:
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
- labelSelector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: loki
|
|
app.kubernetes.io/instance: loki
|
|
app.kubernetes.io/component: single-binary
|
|
topologyKey: kubernetes.io/hostname
|
|
|
|
volumes:
|
|
- name: tmp
|
|
emptyDir: {}
|
|
- name: config
|
|
configMap:
|
|
name: loki
|
|
items:
|
|
- key: "config.yaml"
|
|
path: "config.yaml"
|
|
- name: runtime-config
|
|
configMap:
|
|
name: loki-runtime
|
|
volumeClaimTemplates:
|
|
- apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: storage
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: "17Gi" |