Adding dependencies, binary autostart
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
{{/*
|
||||
bloom planner fullname
|
||||
*/}}
|
||||
{{- define "loki.bloomPlannerFullname" -}}
|
||||
{{ include "loki.fullname" . }}-bloom-planner
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
bloom planner common labels
|
||||
*/}}
|
||||
{{- define "loki.bloomPlannerLabels" -}}
|
||||
{{ include "loki.labels" . }}
|
||||
app.kubernetes.io/component: bloom-planner
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
bloom planner selector labels
|
||||
*/}}
|
||||
{{- define "loki.bloomPlannerSelectorLabels" -}}
|
||||
{{ include "loki.selectorLabels" . }}
|
||||
app.kubernetes.io/component: bloom-planner
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
bloom planner readinessProbe
|
||||
*/}}
|
||||
{{- define "loki.bloomPlanner.readinessProbe" -}}
|
||||
{{- with .Values.bloomPlanner.readinessProbe }}
|
||||
readinessProbe:
|
||||
{{- toYaml . | nindent 2 }}
|
||||
{{- else }}
|
||||
{{- with .Values.loki.readinessProbe }}
|
||||
readinessProbe:
|
||||
{{- toYaml . | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
bloom planner priority class name
|
||||
*/}}
|
||||
{{- define "loki.bloomPlannerPriorityClassName" }}
|
||||
{{- $pcn := coalesce .Values.global.priorityClassName .Values.bloomPlanner.priorityClassName -}}
|
||||
{{- if $pcn }}
|
||||
priorityClassName: {{ $pcn }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the bloom planner service account
|
||||
*/}}
|
||||
{{- define "loki.bloomPlannerServiceAccountName" -}}
|
||||
{{- if .Values.bloomPlanner.serviceAccount.create -}}
|
||||
{{ default (print (include "loki.serviceAccountName" .) "-bloom-planner") .Values.bloomPlanner.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
{{ default (include "loki.serviceAccountName" .) .Values.bloomPlanner.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,37 @@
|
||||
{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}}
|
||||
{{- if (and $isDistributed (gt (int .Values.bloomPlanner.replicas) 0)) -}}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "loki.bloomPlannerFullname" . }}-headless
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "loki.bloomPlannerSelectorLabels" . | nindent 4 }}
|
||||
{{- with .Values.bloomPlanner.serviceLabels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- with .Values.loki.serviceAnnotations }}
|
||||
{{- toYaml . | nindent 4}}
|
||||
{{- end }}
|
||||
{{- with .Values.bloomPlanner.serviceAnnotations }}
|
||||
{{- toYaml . | nindent 4}}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
clusterIP: None
|
||||
ports:
|
||||
- name: http-metrics
|
||||
port: 3100
|
||||
targetPort: http-metrics
|
||||
protocol: TCP
|
||||
- name: grpc
|
||||
port: 9095
|
||||
targetPort: grpc
|
||||
protocol: TCP
|
||||
{{- if .Values.bloomPlanner.appProtocol.grpc }}
|
||||
appProtocol: {{ .Values.bloomPlanner.appProtocol.grpc }}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "loki.bloomPlannerSelectorLabels" . | nindent 4 }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,181 @@
|
||||
{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}}
|
||||
{{- if (and $isDistributed (gt (int .Values.bloomPlanner.replicas) 0)) -}}
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ include "loki.bloomPlannerFullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "loki.bloomPlannerLabels" . | nindent 4 }}
|
||||
{{- with .Values.loki.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
replicas: {{ .Values.bloomPlanner.replicas }}
|
||||
podManagementPolicy: Parallel
|
||||
updateStrategy:
|
||||
rollingUpdate:
|
||||
partition: 0
|
||||
serviceName: {{ include "loki.bloomPlannerFullname" . }}-headless
|
||||
revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }}
|
||||
{{- if and (semverCompare ">= 1.23-0" (include "loki.kubeVersion" .)) (.Values.bloomPlanner.persistence.enableStatefulSetAutoDeletePVC) }}
|
||||
persistentVolumeClaimRetentionPolicy:
|
||||
whenDeleted: {{ .Values.bloomPlanner.persistence.whenDeleted }}
|
||||
whenScaled: {{ .Values.bloomPlanner.persistence.whenScaled }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "loki.bloomPlannerSelectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
{{- include "loki.config.checksum" . | nindent 8 }}
|
||||
{{- with .Values.loki.podAnnotations }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.bloomPlanner.podAnnotations }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "loki.bloomPlannerSelectorLabels" . | nindent 8 }}
|
||||
app.kubernetes.io/part-of: memberlist
|
||||
{{- with .Values.loki.podLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.bloomPlanner.podLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
serviceAccountName: {{ include "loki.serviceAccountName" . }}
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.bloomPlanner.hostAliases }}
|
||||
hostAliases:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- include "loki.bloomPlannerPriorityClassName" . | nindent 6 }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.loki.podSecurityContext | nindent 8 }}
|
||||
terminationGracePeriodSeconds: {{ .Values.bloomPlanner.terminationGracePeriodSeconds }}
|
||||
{{- with .Values.bloomPlanner.initContainers }}
|
||||
initContainers:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: bloom-planner
|
||||
image: {{ include "loki.image" . }}
|
||||
imagePullPolicy: {{ .Values.loki.image.pullPolicy }}
|
||||
{{- if or .Values.loki.command .Values.bloomPlanner.command }}
|
||||
command:
|
||||
- {{ coalesce .Values.bloomPlanner.command .Values.loki.command | quote }}
|
||||
{{- end }}
|
||||
args:
|
||||
- -config.file=/etc/loki/config/config.yaml
|
||||
- -target=bloom-planner
|
||||
{{- with .Values.bloomPlanner.extraArgs }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http-metrics
|
||||
containerPort: 3100
|
||||
protocol: TCP
|
||||
- name: grpc
|
||||
containerPort: 9095
|
||||
protocol: TCP
|
||||
- name: http-memberlist
|
||||
containerPort: 7946
|
||||
protocol: TCP
|
||||
{{- with .Values.bloomPlanner.extraEnv }}
|
||||
env:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.bloomPlanner.extraEnvFrom }}
|
||||
envFrom:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.loki.containerSecurityContext | nindent 12 }}
|
||||
{{- include "loki.bloomPlanner.readinessProbe" . | nindent 10 }}
|
||||
volumeMounts:
|
||||
- name: temp
|
||||
mountPath: /tmp
|
||||
- name: config
|
||||
mountPath: /etc/loki/config
|
||||
- name: runtime-config
|
||||
mountPath: /etc/loki/runtime-config
|
||||
- name: data
|
||||
mountPath: /var/loki
|
||||
{{- if .Values.enterprise.enabled }}
|
||||
- name: license
|
||||
mountPath: /etc/loki/license
|
||||
{{- end }}
|
||||
{{- with .Values.bloomPlanner.extraVolumeMounts }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.bloomPlanner.resources }}
|
||||
resources:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.bloomPlanner.extraContainers }}
|
||||
{{- toYaml .Values.bloomPlanner.extraContainers | nindent 8}}
|
||||
{{- end }}
|
||||
{{- with .Values.bloomPlanner.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.bloomPlanner.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.bloomPlanner.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: temp
|
||||
emptyDir: {}
|
||||
- name: config
|
||||
{{- include "loki.configVolume" . | nindent 10 }}
|
||||
- name: runtime-config
|
||||
configMap:
|
||||
name: {{ template "loki.name" . }}-runtime
|
||||
{{- if .Values.enterprise.enabled }}
|
||||
- name: license
|
||||
secret:
|
||||
{{- if .Values.enterprise.useExternalLicense }}
|
||||
secretName: {{ .Values.enterprise.externalLicenseName }}
|
||||
{{- else }}
|
||||
secretName: enterprise-logs-license
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if not .Values.bloomPlanner.persistence.enabled }}
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- with .Values.bloomPlanner.extraVolumes }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.bloomPlanner.persistence.enabled }}
|
||||
volumeClaimTemplates:
|
||||
{{- range .Values.bloomPlanner.persistence.claims }}
|
||||
- metadata:
|
||||
name: {{ .name }}
|
||||
{{- with .annotations }}
|
||||
annotations:
|
||||
{{- . | toYaml | nindent 10 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
{{- with .storageClass }}
|
||||
storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }}
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .size | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user