chore(loki): move loki to stable

This commit is contained in:
kjeld Schouten-Lebbing
2021-11-23 16:25:59 +01:00
parent fa4063865f
commit 70a8c38d06
12 changed files with 1 additions and 1 deletions
+24
View File
@@ -0,0 +1,24 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
# OWNERS file for Kubernetes
OWNERS
+36
View File
@@ -0,0 +1,36 @@
# Changelog<br>
<a name="loki-1.0.3"></a>
### [loki-1.0.3](https://github.com/truecharts/apps/compare/loki-1.0.2...loki-1.0.3) (2021-11-23)
#### Chore
* update non-major deps helm releases ([#1386](https://github.com/truecharts/apps/issues/1386))
<a name="loki-1.0.2"></a>
### [loki-1.0.2](https://github.com/truecharts/apps/compare/loki-1.0.1...loki-1.0.2) (2021-11-22)
#### Chore
* update non-major deps helm releases ([#1383](https://github.com/truecharts/apps/issues/1383))
<a name="loki-1.0.1"></a>
### [loki-1.0.1](https://github.com/truecharts/apps/compare/loki-1.0.0...loki-1.0.1) (2021-11-22)
#### Chore
* update non-major ([#1380](https://github.com/truecharts/apps/issues/1380))
<a name="loki-0.0.1"></a>
### loki-0.0.1 (2021-11-21)
#### Add
* Add Loki ([#1367](https://github.com/truecharts/apps/issues/1367))
+8
View File
@@ -0,0 +1,8 @@
# Configuration Options
##### Connecting to other apps
If you need to connect this App to other Apps on TrueNAS SCALE, please refer to our "Linking Apps Internally" quick-start guide:
https://truecharts.org/manual/Quick-Start%20Guides/14-linking-apps/
##### Available config options
In the future this page is going to contain an automated list of options available in the installation/edit UI.
+31
View File
@@ -0,0 +1,31 @@
apiVersion: v2
appVersion: "2.4.1"
dependencies:
- name: common
repository: https://truecharts.org
version: 8.9.3
- name: "promtail"
condition: promtail.enabled
repository: "https://grafana.github.io/helm-charts"
version: "^3.0.0"
deprecated: false
description: "Loki: like Prometheus, but for logs."
home: https://github.com/truecharts/apps/tree/master/charts/stable/loki
icon: https://raw.githubusercontent.com/grafana/loki/master/docs/sources/logo.png
keywords:
- logs
kubeVersion: '>=1.16.0-0'
maintainers:
- email: info@truecharts.org
name: TrueCharts
url: https://truecharts.org
name: loki
sources:
- https://github.com/grafana/loki
type: application
version: 1.0.4
annotations:
truecharts.org/catagories: |
- logs
truecharts.org/SCALE-support: "true"
truecharts.org/grade: U
+38
View File
@@ -0,0 +1,38 @@
# Introduction
Loki: like Prometheus, but for logs.
TrueCharts are designed to be installed as TrueNAS SCALE app only. We can not guarantee this charts works as a stand-alone helm installation.
**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/truecharts/apps/issues/new/choose)**
## Source Code
* <https://github.com/grafana/loki>
## Requirements
Kubernetes: `>=1.16.0-0`
## Dependencies
| Repository | Name | Version |
|------------|------|---------|
| https://grafana.github.io/helm-charts | promtail | ^3.0.0 |
| https://truecharts.org | common | 8.9.3 |
## Installing the Chart
To install this App on TrueNAS SCALE check our [Quick-Start Guide](https://truecharts.org/manual/Quick-Start%20Guides/03-Installing-an-App/).
## Uninstalling the Chart
To remove this App from TrueNAS SCALE check our [Quick-Start Guide](https://truecharts.org/manual/Quick-Start%20Guides/07-Deleting-an-App/).
## Support
- Please check our [quick-start guides](https://truecharts.org/manual/Quick-Start%20Guides/01-Open-Apps/) first.
- See the [Wiki](https://truecharts.org)
- Check our [Discord](https://discord.gg/tVsPTHWTtr)
- Open a [issue](https://github.com/truecharts/apps/issues/new/choose)
---
All Rights Reserved - The TrueCharts Project
+69
View File
@@ -0,0 +1,69 @@
# Default Helm-Values
TrueCharts is primarily build to supply TrueNAS SCALE Apps.
However, we also supply all Apps as standard Helm-Charts. In this document we aim to document the default values in our values.yaml file.
Most of our Apps also consume our "common" Helm Chart.
If this is the case, this means that all values.yaml values are set to the common chart values.yaml by default. This values.yaml file will only contain values that deviate from the common chart.
You will, however, be able to use all values referenced in the common chart here, besides the values listed in this document.
## Values
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| alerting_groups | list | `[]` | |
| args[0] | string | `"-config.file=/etc/loki/loki.yaml"` | |
| config.auth_enabled | bool | `false` | |
| config.chunk_store_config.max_look_back_period | string | `"0s"` | |
| config.compactor.shared_store | string | `"filesystem"` | |
| config.compactor.working_directory | string | `"/data/loki/boltdb-shipper-compactor"` | |
| config.ingester.chunk_block_size | int | `262144` | |
| config.ingester.chunk_idle_period | string | `"3m"` | |
| config.ingester.chunk_retain_period | string | `"1m"` | |
| config.ingester.lifecycler.ring.kvstore.store | string | `"inmemory"` | |
| config.ingester.lifecycler.ring.replication_factor | int | `1` | |
| config.ingester.max_transfer_retries | int | `0` | |
| config.ingester.wal.dir | string | `"/data/loki/wal"` | |
| config.limits_config.enforce_metric_name | bool | `false` | |
| config.limits_config.reject_old_samples | bool | `true` | |
| config.limits_config.reject_old_samples_max_age | string | `"168h"` | |
| config.schema_config.configs[0].from | string | `"2020-10-24"` | |
| config.schema_config.configs[0].index.period | string | `"24h"` | |
| config.schema_config.configs[0].index.prefix | string | `"index_"` | |
| config.schema_config.configs[0].object_store | string | `"filesystem"` | |
| config.schema_config.configs[0].schema | string | `"v11"` | |
| config.schema_config.configs[0].store | string | `"boltdb-shipper"` | |
| config.server.http_listen_port | int | `3100` | |
| config.storage_config.boltdb_shipper.active_index_directory | string | `"/data/loki/boltdb-shipper-active"` | |
| config.storage_config.boltdb_shipper.cache_location | string | `"/data/loki/boltdb-shipper-cache"` | |
| config.storage_config.boltdb_shipper.cache_ttl | string | `"24h"` | |
| config.storage_config.boltdb_shipper.shared_store | string | `"filesystem"` | |
| config.storage_config.filesystem.directory | string | `"/data/loki/chunks"` | |
| config.table_manager.retention_deletes_enabled | bool | `false` | |
| config.table_manager.retention_period | string | `"0s"` | |
| controller.replicas | int | `1` | Number of desired pods |
| controller.revisionHistoryLimit | int | `3` | ReplicaSet revision history limit |
| controller.rollingUpdate.partition | string | `nil` | Set statefulset RollingUpdate partition |
| controller.rollingUpdate.surge | string | `nil` | Set deployment RollingUpdate max surge |
| controller.rollingUpdate.unavailable | int | `1` | Set deployment RollingUpdate max unavailable |
| controller.strategy | string | `"RollingUpdate"` | Set the controller upgrade strategy For Deployments, valid values are Recreate (default) and RollingUpdate. For StatefulSets, valid values are OnDelete and RollingUpdate (default). DaemonSets ignore this. |
| controller.type | string | `"statefulset"` | Set the controller type. Valid options are deployment, daemonset or statefulset |
| env | object | `{}` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"grafana/loki"` | |
| image.tag | string | `"2.4.1@sha256:1d802d29cf041601895ce16439757baf4dac71a21069957616ee7988746bf59c"` | |
| persistence.config.enabled | bool | `true` | |
| persistence.config.mountPath | string | `"/etc/loki"` | Where to mount the volume in the main container. |
| persistence.config.objectName | string | `"{{ include \"common.names.fullname\" . -}}-config"` | Specify the name of the configmap object to be mounted |
| persistence.config.type | string | `"secret"` | |
| probes.liveness.path | string | `"/ready"` | |
| probes.readiness.path | string | `"/ready"` | |
| probes.startup.path | string | `"/ready"` | |
| promtail.enabled | bool | `true` | |
| service.main.ports.main.port | int | `3100` | |
| service.main.ports.main.protocol | string | `"HTTP"` | |
| service.main.ports.main.targetPort | int | `3100` | |
| volumeClaimTemplates.data.enabled | bool | `true` | |
| volumeClaimTemplates.data.mountPath | string | `"/data"` | |
All Rights Reserved - The TrueCharts Project
+341
View File
@@ -0,0 +1,341 @@
# Include{groups}
portals:
web_portal:
protocols:
- "$kubernetes-resource_configmap_portal_protocol"
host:
- "$kubernetes-resource_configmap_portal_host"
ports:
- "$kubernetes-resource_configmap_portal_port"
questions:
- variable: portal
group: "Container Image"
label: "Configure Portal Button"
schema:
type: dict
hidden: true
attrs:
- variable: enabled
label: "Enable"
description: "enable the portal button"
schema:
hidden: true
editable: false
type: boolean
default: true
# Include{global}
- variable: controller
group: "Controller"
label: ""
schema:
type: dict
attrs:
- variable: advanced
label: "Show Advanced Controller Settings"
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: type
description: "Please specify type of workload to deploy"
label: "(Advanced) Controller Type"
schema:
type: string
default: "Statefulset"
required: true
enum:
- value: "deployment"
description: "Deployment"
- value: "statefulset"
description: "Statefulset"
- value: "daemonset"
description: "Daemonset"
- variable: replicas
description: "Number of desired pod replicas"
label: "Desired Replicas"
schema:
type: int
default: 1
required: true
- variable: strategy
description: "Please specify type of workload to deploy"
label: "(Advanced) Update Strategy"
schema:
type: string
default: "RollingUpdate"
required: true
enum:
- value: "Recreate"
description: "Recreate: Kill existing pods before creating new ones"
- value: "RollingUpdate"
description: "RollingUpdate: Create new pods and then kill old ones"
- value: "OnDelete"
description: "(Legacy) OnDelete: ignore .spec.template changes"
# Include{controllerExpert}
- variable: env
group: "Container Configuration"
label: "Image Environment"
schema:
type: dict
attrs:
# Include{fixedEnv}
# Include{containerConfig}
- variable: service
group: "Networking and Services"
label: "Configure Service(s)"
schema:
type: dict
attrs:
- variable: main
label: "Main Service"
description: "The Primary service on which the healthcheck runs, often the webUI"
schema:
type: dict
attrs:
# Include{serviceSelector}
- variable: main
label: "Main Service Port Configuration"
schema:
type: dict
attrs:
- variable: advanced
label: "Show Advanced settings"
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: enabled
label: "Enable the port"
schema:
type: boolean
default: true
- variable: protocol
label: "Port Type"
schema:
type: string
default: "HTTP"
enum:
- value: HTTP
description: "HTTP"
- value: "HTTPS"
description: "HTTPS"
- value: TCP
description: "TCP"
- value: "UDP"
description: "UDP"
- variable: nodePort
label: "Node Port (Optional)"
description: "This port gets exposed to the node. Only considered when service type is NodePort, Simple or LoadBalancer"
schema:
type: int
min: 9000
max: 65535
- variable: targetPort
label: "Target Port"
description: "The internal(!) port on the container the Application runs on"
schema:
type: int
default: 3100
- variable: port
label: "Port"
description: "This port exposes the container port on the service"
schema:
type: int
default: 3100
required: true
- variable: serviceexpert
group: "Networking and Services"
label: "Show Expert Config"
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: hostNetwork
group: "Networking and Services"
label: "Host-Networking (Complicated)"
schema:
type: boolean
default: false
# Include{serviceExpert}
# Include{serviceList}
- variable: volumeClaimTemplates
label: "Integrated Persistent Storage"
description: "Integrated Persistent Storage"
group: "Storage and Persistence"
schema:
type: dict
attrs:
- variable: data
label: "App data Storage"
description: "Stores the Application Data."
schema:
type: dict
attrs:
- variable: enabled
label: "Enable the storage"
schema:
type: boolean
default: true
hidden: true
- variable: type
label: "Type of Storage"
description: "Sets the persistence type, Anything other than PVC could break rollback!"
schema:
type: string
default: "simplePVC"
enum:
- value: "simplePVC"
description: "PVC (simple)"
- value: "simpleHP"
description: "HostPath (simple)"
- value: "emptyDir"
description: "emptyDir"
- value: "pvc"
description: "pvc"
- value: "hostPath"
description: "hostPath"
# Include{persistenceBasic}
- variable: hostPath
label: "hostPath"
description: "Path inside the container the storage is mounted"
schema:
show_if: [["type", "=", "hostPath"]]
type: hostpath
- variable: mountPath
label: "mountPath"
description: "Path inside the container the storage is mounted"
schema:
type: string
default: "/data"
hidden: true
valid_chars: '^\/([a-zA-Z0-9._-]+(\s?[a-zA-Z0-9._-]+|\/?))+$'
- variable: medium
label: "EmptyDir Medium"
schema:
show_if: [["type", "=", "emptyDir"]]
type: string
default: ""
enum:
- value: ""
description: "Default"
- value: "Memory"
description: "Memory"
# Include{persistenceAdvanced}
# Include{persistenceList}
- variable: ingress
label: ""
group: "Ingress"
schema:
type: dict
attrs:
- variable: main
label: "Main Ingress"
schema:
type: dict
attrs:
# Include{ingressDefault}
# Include{ingressTLS}
# Include{ingressTraefik}
# Include{ingressExpert}
# Include{ingressList}
- variable: advancedSecurity
label: "Show Advanced Security Settings"
group: "Security and Permissions"
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: securityContext
label: "Security Context"
schema:
type: dict
attrs:
- variable: privileged
label: "Privileged mode"
schema:
type: boolean
default: false
- variable: readOnlyRootFilesystem
label: "ReadOnly Root Filesystem"
schema:
type: boolean
default: false
- variable: allowPrivilegeEscalation
label: "Allow Privilege Escalation"
schema:
type: boolean
default: false
- variable: runAsNonRoot
label: "runAsNonRoot"
schema:
type: boolean
default: true
- variable: podSecurityContext
group: "Security and Permissions"
label: "Pod Security Context"
schema:
type: dict
attrs:
- variable: runAsUser
label: "runAsUser"
description: "The UserID of the user running the application"
schema:
type: int
default: 568
- variable: runAsGroup
label: "runAsGroup"
description: The groupID this App of the user running the application"
schema:
type: int
default: 568
- variable: fsGroup
label: "fsGroup"
description: "The group that should own ALL storage."
schema:
type: int
default: 568
- variable: supplementalGroups
label: "supplemental Groups"
schema:
type: list
default: []
items:
- variable: supplementalGroupsEntry
label: "supplemental Group"
schema:
type: int
- variable: fsGroupChangePolicy
label: "When should we take ownership?"
schema:
type: string
default: "OnRootMismatch"
enum:
- value: "OnRootMismatch"
description: "OnRootMismatch"
- value: "Always"
description: "Always"
# Include{resources}
# Include{advanced}
# Include{addons}
+17
View File
@@ -0,0 +1,17 @@
{{/*
Create the app name of loki clients. Defaults to the same logic as "loki.fullname", and default client expects "promtail".
*/}}
{{- define "client.name" -}}
{{- if .Values.client.name -}}
{{- .Values.client.name -}}
{{- else if .Values.client.fullnameOverride -}}
{{- .Values.client.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default "promtail" .Values.client.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
+1
View File
@@ -0,0 +1 @@
{{ include "common.all" . }}
@@ -0,0 +1,17 @@
{{- if gt (len .Values.alerting_groups) 0 }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "common.labels" . | nindent 4 }}
annotations:
{{- with .Values.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
data:
{{ include "common.names.fullname" . }}-alerting-rules.yaml: |-
groups:
{{- toYaml .Values.alerting_groups | nindent 6 }}
{{- end }}
+13
View File
@@ -0,0 +1,13 @@
---
apiVersion: v1
kind: Secret
metadata:
name: {{ include "common.names.fullname" . -}}-config
labels:
{{- include "common.labels" . | nindent 4 }}
annotations:
{{- with .Values.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
data:
loki.yaml: {{ tpl (toYaml .Values.config) . | b64enc}}
+148
View File
@@ -0,0 +1,148 @@
image:
repository: grafana/loki
pullPolicy: IfNotPresent
tag: 2.4.1@sha256:1d802d29cf041601895ce16439757baf4dac71a21069957616ee7988746bf59c
controller:
# -- Set the controller type.
# Valid options are deployment, daemonset or statefulset
type: statefulset
# -- Number of desired pods
replicas: 1
# -- Set the controller upgrade strategy
# For Deployments, valid values are Recreate (default) and RollingUpdate.
# For StatefulSets, valid values are OnDelete and RollingUpdate (default).
# DaemonSets ignore this.
strategy: RollingUpdate
rollingUpdate:
# -- Set deployment RollingUpdate max unavailable
unavailable: 1
# -- Set deployment RollingUpdate max surge
surge:
# -- Set statefulset RollingUpdate partition
partition:
# -- ReplicaSet revision history limit
revisionHistoryLimit: 3
args:
- "-config.file=/etc/loki/loki.yaml"
service:
main:
ports:
main:
protocol: "HTTP"
targetPort: 3100
port: 3100
probes:
liveness:
path: "/ready"
readiness:
path: "/ready"
startup:
path: "/ready"
env: {}
# TZ: UTC
# PUID: 1001
config:
# existingSecret:
auth_enabled: false
ingester:
chunk_idle_period: 3m
chunk_block_size: 262144
chunk_retain_period: 1m
max_transfer_retries: 0
wal:
dir: /data/loki/wal
lifecycler:
ring:
kvstore:
store: inmemory
replication_factor: 1
## Different ring configs can be used. E.g. Consul
# ring:
# store: consul
# replication_factor: 1
# consul:
# host: "consul:8500"
# prefix: ""
# http_client_timeout: "20s"
# consistent_reads: true
limits_config:
enforce_metric_name: false
reject_old_samples: true
reject_old_samples_max_age: 168h
schema_config:
configs:
- from: 2020-10-24
store: boltdb-shipper
object_store: filesystem
schema: v11
index:
prefix: index_
period: 24h
server:
http_listen_port: 3100
storage_config:
boltdb_shipper:
active_index_directory: /data/loki/boltdb-shipper-active
cache_location: /data/loki/boltdb-shipper-cache
cache_ttl: 24h # Can be increased for faster performance over longer query periods, uses more disk space
shared_store: filesystem
filesystem:
directory: /data/loki/chunks
chunk_store_config:
max_look_back_period: 0s
table_manager:
retention_deletes_enabled: false
retention_period: 0s
compactor:
working_directory: /data/loki/boltdb-shipper-compactor
shared_store: filesystem
# Needed for Alerting: https://grafana.com/docs/loki/latest/alerting/
# This is just a simple example, for more details: https://grafana.com/docs/loki/latest/configuration/#ruler_config
# ruler:
# storage:
# type: local
# local:
# directory: /rules
# rule_path: /tmp/scratch
# alertmanager_url: http://alertmanager.svc.namespace:9093
# ring:
# kvstore:
# store: inmemory
# enable_api: true
# Specify Loki Alerting rules based on this documentation: https://grafana.com/docs/loki/latest/alerting/
# When specified, you also need to add a ruler config section above. An example is shown in the alerting docs.
alerting_groups: []
# - name: example
# rules:
# - alert: HighThroughputLogStreams
# expr: sum by(container) (rate({job=~"loki-dev/.*"}[1m])) > 1000
# for: 2m
persistence:
# @default -- See below
config:
enabled: true
type: secret
# -- Specify the name of the configmap object to be mounted
objectName: '{{ include "common.names.fullname" . -}}-config'
# -- Where to mount the volume in the main container.
mountPath: /etc/loki
volumeClaimTemplates:
data:
enabled: true
mountPath: "/data"
promtail:
enabled: true