UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
values.yaml 4.8 KiB
Newer Older
  • Learn to ignore specific revisions
  • {{- if .Values.loki.enabled }}
    
    riley.odonnell's avatar
    riley.odonnell committed
    {{- include "values-secret" (dict "root" $ "package" .Values.loki "name" "loki" "defaults" (include "bigbang.defaults.loki" .)) }}
    {{- end }}
    
    {{- define "bigbang.defaults.loki" -}}
    hostname: {{ .Values.hostname }}
    
    
    riley.odonnell's avatar
    riley.odonnell committed
    openshift: {{ .Values.openshift }}
    
    istio:
      enabled: {{ .Values.istio.enabled }}
    
      {{- if or 
          (dig "hardened" "enabled" false .Values.istio.values)
    
          (dig "istio" "hardened" "enabled" false .Values.monitoring.values)
          (dig "istio" "hardened" "enabled" false .Values.addons.authservice.values)
          (dig "istio" "hardened" "enabled" false .Values.grafana.values)
          (dig "istio" "hardened" "enabled" false .Values.loki.values)
          (dig "istio" "hardened" "enabled" false .Values.eckOperator.values)
          (dig "istio" "hardened" "enabled" false .Values.elasticsearchKibana.values)
    
      }}
      hardened:
        enabled: true
        monitoring:
          enabled: {{ .Values.monitoring.enabled }}
        promtail:
          enabled: {{ .Values.promtail.enabled }}
        fluentbit:
          enabled: {{ .Values.fluentbit.enabled }}
        minioOperator:
          enabled: {{ .Values.addons.minioOperator.enabled }}
      {{- end }}
    
    riley.odonnell's avatar
    riley.odonnell committed
    
    imagePullSecrets:
      - name: private-registry
    
    
    image:
      pullPolicy: {{ .Values.imagePullPolicy }}
    
    
    riley.odonnell's avatar
    riley.odonnell committed
    networkPolicies:
    
      enabled: {{ .Values.networkPolicies.enabled }}
    
    brandt keller's avatar
    brandt keller committed
      controlPlaneCidr: {{ .Values.networkPolicies.controlPlaneCidr }}
    
    riley.odonnell's avatar
    riley.odonnell committed
    monitoring:
    
      enabled: {{ .Values.monitoring.enabled }}
    
      serviceMonitor:
        enabled: {{ .Values.monitoring.enabled }}
    
        # conditional passes only for default istio: enabled, mTLS: SCRICT
        {{- if and .Values.istio.enabled (eq (dig "istio" "mtls" "mode" "STRICT" .Values.loki.values) "STRICT") }}
        scheme: https
        tlsConfig:
          caFile: /etc/prom-certs/root-cert.pem
          certFile: /etc/prom-certs/cert-chain.pem
          keyFile: /etc/prom-certs/key.pem
          insecureSkipVerify: true  # Prometheus does not support Istio security naming, thus skip verifying target pod certificate
        {{- end }}
    
    Jimmy Ungerman's avatar
    Jimmy Ungerman committed
      rules:
        enabled: true
        alerting: true
    
    Michael Kruggel's avatar
    Michael Kruggel committed
    {{- $disableDefaultFLB := dig "additionalOutputs" "disableDefault" false .Values.fluentbit.values }}
    {{- if and .Values.fluentbit.enabled (not $disableDefaultFLB) }}
    fluentbit:
      enabled: true
    {{- end }}
    
    {{- if .Values.promtail.enabled }}
    promtail:
      enabled: true
    {{- end }}
    
    
    Jimmy Ungerman's avatar
    Jimmy Ungerman committed
      extraMemberlistConfig:
        bind_addr:
          - ${MY_POD_IP}
    
        {{- if (and (eq .Values.loki.strategy "monolith") (not (dig "minio" "enabled" false .Values.loki.values))) }}
    
    brandt keller's avatar
    brandt keller committed
        type: "filesystem"
        {{- else }}
        type: "s3"
    
        bucketNames:
          {{- toYaml .Values.loki.objectStorage.bucketNames | nindent 6 }}
        s3:
          endpoint: {{ .Values.loki.objectStorage.endpoint }}
          region: {{ .Values.loki.objectStorage.region }}
          accessKeyId: {{ .Values.loki.objectStorage.accessKey }}
          secretAccessKey: {{ .Values.loki.objectStorage.accessSecret }}
    
    brandt keller's avatar
    brandt keller committed
        {{- end }}
    
      {{- if (and (eq .Values.loki.strategy "monolith") (not (dig "minio" "enabled" false .Values.loki.values))) }}
    
    brandt keller's avatar
    brandt keller committed
      rulerConfig:
        storage:
          type: local
      storage_config:
        boltdb_shipper:
          active_index_directory: /var/loki/boltdb-shipper-active
          cache_location: /var/loki/boltdb-shipper-cache
          cache_ttl: 24h
        filesystem:
          directory: /var/loki/chunks
      {{- end }}
    
      {{- if .Values.istio.enabled }}
      podAnnotations:
        {{ include "istioAnnotation" . }}
      {{- end }}
    
    Jimmy Ungerman's avatar
    Jimmy Ungerman committed
    {{- if (eq .Values.loki.strategy "monolith") }}
    deploymentMode: SingleBinary
    singleBinary:
      replicas: 1
      extraArgs:
        - -config.expand-env=true
      extraEnv:
        - name: MY_POD_IP
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
    {{- end }}
    
    
    mr-bot's avatar
    mr-bot committed
    {{- if (eq .Values.loki.strategy "scalable") }}
    
    deploymentMode: SimpleScalable
    
    mr-bot's avatar
    mr-bot committed
    singleBinary:
      replicas: 0
    
    Jimmy Ungerman's avatar
    Jimmy Ungerman committed
      extraArgs:
        - -config.expand-env=true
      extraEnv:
        - name: MY_POD_IP
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
    
    Jimmy Ungerman's avatar
    Jimmy Ungerman committed
      extraArgs:
        - -config.expand-env=true
      extraEnv:
        - name: MY_POD_IP
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
    
    Jimmy Ungerman's avatar
    Jimmy Ungerman committed
      extraArgs:
        - -config.expand-env=true
      extraEnv:
        - name: MY_POD_IP
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
    
    mr-bot's avatar
    mr-bot committed
    gateway:
      enabled: true
      service:
        labels:
          prometheus.io/service-monitor: "false"
    
    Jimmy Ungerman's avatar
    Jimmy Ungerman committed
      extraArgs:
        - -config.expand-env=true
      extraEnv:
        - name: MY_POD_IP
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
    
    mr-bot's avatar
    mr-bot committed
    {{- end }}
    
    
    {{- with .Values.loki.objectStorage }}
    
    {{- if and (eq $.Values.loki.strategy "scalable") (not (and .endpoint .region)) }}
    
    minio:
      enabled: true
    
    brandt keller's avatar
    brandt keller committed
    {{- end }}
    
    Jimmy Ungerman's avatar
    Jimmy Ungerman committed
    # Allows users to deploy distributed mode but calls out that we do not support it
    {{- if (eq .Values.loki.strategy "distributed") }}
    deploymentMode: Distributed
    
    riley.odonnell's avatar
    riley.odonnell committed
    {{- end -}}
    
    Jimmy Ungerman's avatar
    Jimmy Ungerman committed
    {{- end -}}