Skip to content

Commit

Permalink
chart, build, salt: bump loki chart to 6.16.0
Browse files Browse the repository at this point in the history
[WIP] apply breaking changes to loki config.
  • Loading branch information
eg-ayoub committed Oct 23, 2024
1 parent ffd3e21 commit c86a50a
Show file tree
Hide file tree
Showing 145 changed files with 10,339 additions and 1,159 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
- Bump etcd version to [3.5.15](https://github.com/etcd-io/etcd/releases/tag/v3.5.15)
(PR[#4417](https://github.com/scality/metalk8s/pull/4417))

- Bump Loki chart version to
[6.16.0](https://github.com/grafana/loki/releases/tag/helm-loki-6.16.0)
The Loki image has been bumped accordingly to
[3.1.1](https://github.com/grafana/loki/releases/tag/v3.1.1)
(PR[#4450](https://github.com/scality/metalk8s/pull/4450))

## Release 128.0.1 (in development)

## Release 128.0.0
Expand Down
4 changes: 2 additions & 2 deletions buildchain/buildchain/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ def _version_prefix(version: str, prefix: str = "v") -> str:
),
Image(
name="loki",
version="2.9.6",
digest="sha256:6ca6e2cd3b6f45e0eb298da2920610fde63ecd8ab6c595d9c941c8559d1d9407",
version="3.1.1",
digest="sha256:e689cc634841c937de4d7ea6157f17e29cf257d6a320f1c293ab18d46cfea986",
),
Image(
name="fluent-bit",
Expand Down
16 changes: 12 additions & 4 deletions charts/loki.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ loki:
registry: ""
repository: '__image__(loki)'

existingSecretForConfig: loki
# needs to be removed asap when https://github.com/grafana/loki/issues/14497 is fixed
schemaConfig:
remove: me

configStorageType: Secret
configObjectName: loki
generatedConfigObjectName: ""

podAnnotations:
# Override default checksum as we want to manage it with salt
Expand All @@ -21,6 +27,8 @@ read:
write:
replicas: 0

deploymentMode: SingleBinary

singleBinary:
targetModule: "all,table-manager"

Expand Down Expand Up @@ -60,12 +68,12 @@ monitoring:
grafanaAgent:
installOperator: false

lokiCanary:
enabled: false

dashboards:
enabled: false

lokiCanary:
enabled: false

gateway:
enabled: false

Expand Down
7 changes: 5 additions & 2 deletions charts/loki/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ dependencies:
- name: grafana-agent-operator
repository: https://grafana.github.io/helm-charts
version: 0.3.15
digest: sha256:b7a42cd0e56544f6168a586fde03e26c801bb20cf69bc004a8f6000d93b98100
generated: "2024-01-27T21:57:28.190462917+05:30"
- name: rollout-operator
repository: https://grafana.github.io/helm-charts
version: 0.13.0
digest: sha256:d0e60c2879039ee5e8b7b10530f0e8790d6d328ee8afca71f01128627e921587
generated: "2024-04-07T14:12:43.317329844-04:00"
13 changes: 9 additions & 4 deletions charts/loki/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
appVersion: 2.9.6
appVersion: 3.1.1
dependencies:
- alias: minio
condition: minio.enabled
Expand All @@ -11,17 +11,22 @@ dependencies:
name: grafana-agent-operator
repository: https://grafana.github.io/helm-charts
version: 0.3.15
description: Helm chart for Grafana Loki in simple, scalable mode
- alias: rollout_operator
condition: rollout_operator.enabled
name: rollout-operator
repository: https://grafana.github.io/helm-charts
version: 0.13.0
description: Helm chart for Grafana Loki and Grafana Enterprise Logs supporting both
simple, scalable and distributed modes.
home: https://grafana.github.io/helm-charts
icon: https://grafana.com/docs/loki/latest/logo_and_name.png
maintainers:
- name: trevorwhitney
- name: jeschkies
- name: slim-bean
name: loki
sources:
- https://github.com/grafana/loki
- https://grafana.com/oss/loki/
- https://grafana.com/docs/loki/latest/
type: application
version: 5.48.0
version: 6.16.0
5 changes: 3 additions & 2 deletions charts/loki/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# loki

![Version: 5.48.0](https://img.shields.io/badge/Version-5.48.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.9.6](https://img.shields.io/badge/AppVersion-2.9.6-informational?style=flat-square)
![Version: 6.16.0](https://img.shields.io/badge/Version-6.16.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.1.1](https://img.shields.io/badge/AppVersion-3.1.1-informational?style=flat-square)

Helm chart for Grafana Loki in simple, scalable mode
Helm chart for Grafana Loki and Grafana Enterprise Logs supporting both simple, scalable and distributed modes.

## Source Code

Expand All @@ -16,5 +16,6 @@ Helm chart for Grafana Loki in simple, scalable mode
|------------|------|---------|
| https://charts.min.io/ | minio(minio) | 4.0.15 |
| https://grafana.github.io/helm-charts | grafana-agent-operator(grafana-agent-operator) | 0.3.15 |
| https://grafana.github.io/helm-charts | rollout_operator(rollout-operator) | 0.13.0 |

Find more information in the Loki Helm Chart [documentation](https://grafana.com/docs/loki/next/installation/helm).
23 changes: 23 additions & 0 deletions charts/loki/charts/rollout-operator/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 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
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
8 changes: 8 additions & 0 deletions charts/loki/charts/rollout-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v2
appVersion: v0.11.0
description: Grafana rollout-operator
home: https://github.com/grafana/rollout-operator
kubeVersion: ^1.10.0-0
name: rollout-operator
type: application
version: 0.13.0
71 changes: 71 additions & 0 deletions charts/loki/charts/rollout-operator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Grafana rollout-operator Helm Chart

Helm chart for deploying [Grafana rollout-operator](https://github.com/grafana/rollout-operator) to Kubernetes.

# rollout-operator

![Version: 0.13.0](https://img.shields.io/badge/Version-0.13.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.11.0](https://img.shields.io/badge/AppVersion-v0.11.0-informational?style=flat-square)

Grafana rollout-operator

## Requirements

Kubernetes: `^1.10.0-0`

## Installation

This section describes various use cases for installation, upgrade and migration from different systems and versions.

### Preparation

These are the common tasks to perform before any of the use cases.

```bash
# Add the repository
helm repo add grafana https://grafana.github.io/helm-charts
helm repo update
```

### Installation of Grafana Rollout Operator

```bash
helm install -n <namespace> <release> grafana/rollout-operator
```

The Grafana rollout-operator should be installed in the same namespace as the statefulsets it is operating upon.
It is not a highly available application and runs as a single pod.

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| fullnameOverride | string | `""` | |
| hostAliases | list | `[]` | hostAliases to add |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"grafana/rollout-operator"` | |
| image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. |
| imagePullSecrets | list | `[]` | |
| minReadySeconds | int | `10` | |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | Pod Annotations |
| podLabels | object | `{}` | Pod (extra) Labels |
| podSecurityContext | object | `{}` | |
| priorityClassName | string | `""` | |
| resources.limits.memory | string | `"200Mi"` | |
| resources.requests.cpu | string | `"100m"` | |
| resources.requests.memory | string | `"100Mi"` | |
| securityContext | object | `{}` | |
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| serviceMonitor.annotations | object | `{}` | ServiceMonitor annotations |
| serviceMonitor.enabled | bool | `false` | Create ServiceMonitor to scrape metrics for Prometheus |
| serviceMonitor.interval | string | `nil` | ServiceMonitor scrape interval |
| serviceMonitor.labels | object | `{}` | Additional ServiceMonitor labels |
| serviceMonitor.namespace | string | `nil` | Alternative namespace for ServiceMonitor resources |
| serviceMonitor.namespaceSelector | object | `{}` | Namespace selector for ServiceMonitor resources |
| serviceMonitor.relabelings | list | `[]` | ServiceMonitor relabel configs to apply to samples before scraping https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig |
| serviceMonitor.scrapeTimeout | string | `nil` | ServiceMonitor scrape timeout in Go duration format (e.g. 15s) |
| tolerations | list | `[]` | |
38 changes: 38 additions & 0 deletions charts/loki/charts/rollout-operator/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Grafana rollout-operator Helm Chart

Helm chart for deploying [Grafana rollout-operator]({{ template "chart.homepage" . }}) to Kubernetes.

{{ template "chart.header" . }}

{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}

{{ template "chart.description" . }}

{{ template "chart.sourcesSection" . }}

{{ template "chart.requirementsSection" . }}

## Installation

This section describes various use cases for installation, upgrade and migration from different systems and versions.

### Preparation

These are the common tasks to perform before any of the use cases.

```bash
# Add the repository
helm repo add grafana https://grafana.github.io/helm-charts
helm repo update
```

### Installation of Grafana Rollout Operator

```bash
helm install -n <namespace> <release> grafana/rollout-operator
```

The Grafana rollout-operator should be installed in the same namespace as the statefulsets it is operating upon.
It is not a highly available application and runs as a single pod.

{{ template "chart.valuesSection" . }}
10 changes: 10 additions & 0 deletions charts/loki/charts/rollout-operator/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Repo : {{ .Chart.Home }}

Validation:

Check the logs of the pod and ensure messages for reconcilliation of the statefulsets are present.
```
kubectl logs -n {{ .Release.Namespace }} -l {{ include "cli.labels" . }}
```
Example log line:
level=debug ts=2022-04-20T13:59:52.783051541Z msg="reconciling StatefulSet" statefulset=mimir-store-gateway-zone-a
79 changes: 79 additions & 0 deletions charts/loki/charts/rollout-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "rollout-operator.name" -}}
{{- default (include "rollout-operator.chartName" .) .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "rollout-operator.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default (include "rollout-operator.chartName" .) .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Recalculate the chart name, because it may be sub-chart included as rollout_operator,
and _ is not valid in resource names.
*/}}
{{- define "rollout-operator.chartName" -}}
{{- print .Chart.Name | replace "_" "-" -}}
{{- end -}}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "rollout-operator.chart" -}}
{{- printf "%s-%s" (include "rollout-operator.chartName" .) .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "rollout-operator.labels" -}}
helm.sh/chart: {{ include "rollout-operator.chart" . }}
{{ include "rollout-operator.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "rollout-operator.selectorLabels" -}}
app.kubernetes.io/name: {{ include "rollout-operator.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "rollout-operator.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "rollout-operator.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}


{{- define "cli.labels" -}}
{{- $list := list -}}
{{- range $k, $v := ( include "rollout-operator.selectorLabels" . | fromYaml ) -}}
{{- $list = append $list (printf "%s=%s" $k $v) -}}
{{- end -}}
{{ join "," $list }}
{{- end -}}
Loading

0 comments on commit c86a50a

Please sign in to comment.