Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [helm] Support for PVC Annotations for Non-Distributed Modes #12023

Merged
merged 26 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
48453b6
[helm] Support for PVC Annotations
onelapahead Feb 22, 2024
8e12364
restore chart changes
onelapahead Feb 22, 2024
8c070cf
Merge branch 'main' into helm/support-pvc-annotations
onelapahead Feb 22, 2024
81a3d83
Merge branch 'main' into helm/support-pvc-annotations
onelapahead Feb 23, 2024
286d47e
Merge branch 'main' into helm/support-pvc-annotations
onelapahead Feb 23, 2024
fcb3e6b
Merge branch 'main' into helm/support-pvc-annotations
onelapahead Feb 24, 2024
16fa6b9
Merge branch 'main' into helm/support-pvc-annotations
onelapahead Feb 27, 2024
71ce5b8
Merge branch 'main' into helm/support-pvc-annotations
onelapahead Feb 29, 2024
6050895
Merge branch 'main' into helm/support-pvc-annotations
onelapahead Mar 1, 2024
5233fc4
Merge branch 'main' into helm/support-pvc-annotations
onelapahead Mar 13, 2024
8fefe78
Merge branch 'main' into helm/support-pvc-annotations
onelapahead Mar 14, 2024
ec655cc
Merge branch 'main' into helm/support-pvc-annotations
onelapahead Mar 21, 2024
91c5520
Merge branch 'main' into helm/support-pvc-annotations
JStickler Mar 21, 2024
0de3b80
Merge branch 'main' into helm/support-pvc-annotations
onelapahead Mar 22, 2024
2baa707
make docs
onelapahead Mar 22, 2024
4b86fb6
Merge branch 'main' into helm/support-pvc-annotations
onelapahead Mar 22, 2024
8087e50
Merge branch 'main' into helm/support-pvc-annotations
onelapahead Mar 26, 2024
10f93df
Merge branch 'main' into helm/support-pvc-annotations
onelapahead Apr 2, 2024
d7330a3
merge from main
onelapahead May 9, 2024
8d79690
update docs
onelapahead May 9, 2024
7570cf8
changelog
onelapahead May 9, 2024
b86f32a
changelog
onelapahead May 9, 2024
e351b3c
Merge branch 'main' into helm/support-pvc-annotations
onelapahead May 20, 2024
82c9e9c
Merge branch 'main' into helm/support-pvc-annotations
onelapahead May 21, 2024
03b9f2f
Merge branch 'main' into helm/support-pvc-annotations
onelapahead May 22, 2024
0aaf882
Merge branch 'main' into helm/support-pvc-annotations
trevorwhitney May 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ include docs.mk
PODMAN := $(shell if command -v podman >/dev/null 2>&1; then echo podman; else echo docker; fi)
BUILD_IN_CONTAINER ?= true

.PHONY: sources/setup/install/helm/reference.md
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise when running make -C docs sources/setup/install/helm/reference.md like the CI jobs recommended, my make didn't think there was anything to update.. is there a flag I'm missing you'd prefer me use rather than .PHONY ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused why this needs to be a .PHONY when this file does exist. maybe you need to clean first? But I'm guessing it failed because the file existed even though the contents weren't what they should be, and the .PHONY just forces it to always run? I guess that's a fair trade off vs having to remember to clean everytime.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey yeah sorry clean should have been obvious to me, but I guess I am use to codegen/docgen/chartgen/etc. tooling via Makefile (like kubebuilder's make targets for example) always running / re-generating code since it should be deterministic, and therefore you don't have to remember to run clean which is nice.

I recognize this is a bit overstepping in the PR's scope and could have unintended consequences in the CI workflows,etc. potentially so if you'd prefer I back this out that's fine with me!

sources/setup/install/helm/reference.md: ../production/helm/loki/reference.md.gotmpl ../production/helm/loki/values.yaml
ifeq ($(BUILD_IN_CONTAINER),true)
$(PODMAN) run --rm --volume "$(realpath ..):/helm-docs" -u "$$(id -u)" "docker.io/jnorwood/helm-docs:v1.11.0" \
Expand Down
39 changes: 39 additions & 0 deletions docs/sources/setup/install/helm/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ This is the generated reference for the Loki Helm Chart values.
"initContainers": [],
"nodeSelector": {},
"persistence": {
"annotations": {},
"dataVolumeParameters": {
"emptyDir": {}
},
Expand Down Expand Up @@ -512,6 +513,15 @@ null
<td><pre lang="json">
{}
</pre>
</td>
</tr>
<tr>
<td>backend.persistence.annotations</td>
<td>object</td>
<td>Annotations for volume claim</td>
<td><pre lang="json">
{}
</pre>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -6226,6 +6236,7 @@ false
"drivesPerNode": 2,
"enabled": false,
"persistence": {
"annotations": {},
"size": "5Gi"
},
"replicas": 1,
Expand Down Expand Up @@ -8442,6 +8453,7 @@ false
"lifecycle": {},
"nodeSelector": {},
"persistence": {
"annotations": {},
"enableStatefulSetAutoDeletePVC": true,
"selector": null,
"size": "10Gi",
Expand Down Expand Up @@ -8653,6 +8665,15 @@ false
<td><pre lang="json">
{}
</pre>
</td>
</tr>
<tr>
<td>read.persistence.annotations</td>
<td>object</td>
<td>Annotations for volume claim</td>
<td><pre lang="json">
{}
</pre>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -9893,6 +9914,15 @@ null
<td><pre lang="json">
{}
</pre>
</td>
</tr>
<tr>
<td>singleBinary.persistence.annotations</td>
<td>object</td>
<td>Annotations for volume claim</td>
<td><pre lang="json">
{}
</pre>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -10677,6 +10707,15 @@ null
<td><pre lang="json">
{}
</pre>
</td>
</tr>
<tr>
<td>write.persistence.annotations</td>
<td>object</td>
<td>Annotations for volume claim</td>
<td><pre lang="json">
{}
</pre>
</td>
</tr>
<tr>
Expand Down
4 changes: 4 additions & 0 deletions production/helm/loki/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ Entries should include a reference to the pull request that introduced the chang

[//]: # (<AUTOMATED_UPDATES_LOCATOR> : do not remove this line. This locator is used by the CI pipeline to automatically create a changelog entry for each new Loki release. Add other chart versions and respective changelog entries bellow this line.)

## 6.6.0

- [ENHANCEMENT] Allow setting PVC annotations for all volume claim templates in simple scalable and single binary mode

## 6.5.2

- [BUGFIX] Fixed Ingress routing for all deployment modes.
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: loki
description: Helm chart for Grafana Loki and Grafana Enterprise Logs supporting both simple, scalable and distributed modes.
type: application
appVersion: 3.0.0
version: 6.5.2
version: 6.6.0
home: https://grafana.github.io/helm-charts
sources:
- https://github.com/grafana/loki
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# loki

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

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,10 @@ spec:
kind: PersistentVolumeClaim
metadata:
name: data
{{- with .Values.backend.persistence.annotations }}
annotations:
{{- toYaml . | nindent 10 }}
{{- end }}
spec:
accessModes:
- ReadWriteOnce
Expand Down
4 changes: 4 additions & 0 deletions production/helm/loki/templates/read/statefulset-read.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ spec:
kind: PersistentVolumeClaim
metadata:
name: data
{{- with .Values.read.persistence.annotations }}
annotations:
{{- toYaml . | nindent 10 }}
{{- end }}
spec:
accessModes:
- ReadWriteOnce
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ spec:
kind: PersistentVolumeClaim
metadata:
name: storage
{{- with .Values.singleBinary.persistence.annotations }}
annotations:
{{- toYaml . | nindent 10 }}
{{- end }}
spec:
accessModes:
- ReadWriteOnce
Expand Down
4 changes: 4 additions & 0 deletions production/helm/loki/templates/write/statefulset-write.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ spec:
kind: PersistentVolumeClaim
metadata:
name: data
{{- with .Values.write.persistence.annotations }}
annotations:
{{- toYaml . | nindent 10 }}
{{- end }}
spec:
accessModes:
- ReadWriteOnce
Expand Down
9 changes: 9 additions & 0 deletions production/helm/loki/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1294,6 +1294,8 @@ singleBinary:
storageClass: null
# -- Selector for persistent disk
selector: null
# -- Annotations for volume claim
annotations: {}
######################################################################################################################
#
# Simple Scalable Deployment (SSD) Mode
Expand Down Expand Up @@ -1421,6 +1423,8 @@ write:
storageClass: null
# -- Selector for persistent disk
selector: null
# -- Annotations for volume claim
annotations: {}
# -- Configuration for the read pod(s)
read:
# -- Number of replicas for the read
Expand Down Expand Up @@ -1528,6 +1532,8 @@ read:
storageClass: null
# -- Selector for persistent disk
selector: null
# -- Annotations for volume claim
annotations: {}
# -- Configuration for the backend pod(s)
backend:
# -- Number of replicas for the backend
Expand Down Expand Up @@ -1636,6 +1642,8 @@ backend:
storageClass: null
# -- Selector for persistent disk
selector: null
# -- Annotations for volume claim
annotations: {}
######################################################################################################################
#
# Microservices Mode
Expand Down Expand Up @@ -3091,6 +3099,7 @@ minio:
purge: false
persistence:
size: 5Gi
annotations: {}
resources:
requests:
cpu: 100m
Expand Down
Loading