Skip to content

Commit

Permalink
Helm: Add swift credentials and container name to common config (#11256)
Browse files Browse the repository at this point in the history
**What this PR does / why we need it**:

Add swift to common config via helm.

**Which issue(s) this PR fixes**:

No issue

**Special notes for your reviewer**:

**Checklist**
- [x] Reviewed the
[`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md)
guide (**required**)
- [x] Documentation added
- [ ] Tests updated
- [x] `CHANGELOG.md` updated
- [ ] If the change is worth mentioning in the release notes, add
`add-to-release-notes` label
- [ ] Changes that require user attention or interaction to upgrade are
documented in `docs/sources/setup/upgrade/_index.md`
- [x] For Helm chart changes bump the Helm chart version in
`production/helm/loki/Chart.yaml` and update
`production/helm/loki/CHANGELOG.md` and
`production/helm/loki/README.md`. [Example
PR](d10549e)
- [ ] If the change is deprecating or removing a configuration option,
update the `deprecated-config.yaml` and `deleted-config.yaml` files
respectively in the `tools/deprecated-config-checker` directory.
[Example
PR](0d4416a)
  • Loading branch information
heytrav committed Nov 29, 2023
1 parent df1a3ce commit 1d232b8
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 2 deletions.
21 changes: 21 additions & 0 deletions docs/sources/setup/install/helm/reference.md
Expand Up @@ -2261,6 +2261,27 @@ null
"secretAccessKey": null,
"signatureVersion": null
},
"swift": {
"auth_url": null,
"auth_version": null,
"connect_timeout": null,
"container_name": null,
"domain_id": null,
"domain_name": null,
"internal": null,
"max_retries": null,
"password": null,
"project_domain_id": null,
"project_domain_name": null,
"project_id": null,
"project_name": null,
"region_name": null,
"request_timeout": null,
"user_domain_id": null,
"user_domain_name": null,
"user_id": null,
"username": null
},
"type": "s3"
}
</pre>
Expand Down
4 changes: 4 additions & 0 deletions production/helm/loki/CHANGELOG.md
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.)

## 5.39.0

- [FEATURE] Add support for adding OpenStack swift container credentials via helm chart

## 5.38.0

- [CHANGE] Changed MinIO Helm Chart version to 4.0.15
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/Chart.yaml
Expand Up @@ -3,7 +3,7 @@ name: loki
description: Helm chart for Grafana Loki in simple, scalable mode
type: application
appVersion: 2.9.2
version: 5.38.0
version: 5.39.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
@@ -1,6 +1,6 @@
# loki

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

Helm chart for Grafana Loki in simple, scalable mode

Expand Down
66 changes: 66 additions & 0 deletions production/helm/loki/templates/_helpers.tpl
Expand Up @@ -277,6 +277,39 @@ azure:
endpoint_suffix: {{ . }}
{{- end }}
{{- end -}}
{{- else if eq .Values.loki.storage.type "swift" -}}
{{- with .Values.loki.storage.swift }}
swift:
{{- with .auth_version }}
auth_version: {{ . }}
{{- end }}
auth_url: {{ .auth_url }}
{{- with .internal }}
internal: {{ . }}
{{- end }}
username: {{ .username }}
user_domain_name: {{ .user_domain_name }}
{{- with .user_domain_id }}
user_domain_id: {{ . }}
{{- end }}
{{- with .user_id }}
user_id: {{ . }}
{{- end }}
password: {{ .password }}
{{- with .domain_id }}
domain_id: {{ . }}
{{- end }}
domain_name: {{ .domain_name }}
project_id: {{ .project_id }}
project_name: {{ .project_name }}
project_domain_id: {{ .project_domain_id }}
project_domain_name: {{ .project_domain_name }}
region_name: {{ .region_name }}
container_name: {{ .container_name }}
max_retries: {{ .max_retries | default 3 }}
connect_timeout: {{ .connect_timeout | default "10s" }}
request_timeout: {{ .request_timeout | default "5s" }}
{{- end -}}
{{- else -}}
{{- with .Values.loki.storage.filesystem }}
filesystem:
Expand Down Expand Up @@ -350,6 +383,39 @@ azure:
endpoint_suffix: {{ . }}
{{- end }}
{{- end -}}
{{- else if eq .Values.loki.storage.type "swift" -}}
{{- with .Values.loki.storage.swift }}
swift:
{{- with .auth_version }}
auth_version: {{ . }}
{{- end }}
auth_url: {{ .auth_url }}
{{- with .internal }}
internal: {{ . }}
{{- end }}
username: {{ .username }}
user_domain_name: {{ .user_domain_name }}
{{- with .user_domain_id }}
user_domain_id: {{ . }}
{{- end }}
{{- with .user_id }}
user_id: {{ . }}
{{- end }}
password: {{ .password }}
{{- with .domain_id }}
domain_id: {{ . }}
{{- end }}
domain_name: {{ .domain_name }}
project_id: {{ .project_id }}
project_name: {{ .project_name }}
project_domain_id: {{ .project_domain_id }}
project_domain_name: {{ .project_domain_name }}
region_name: {{ .region_name }}
container_name: {{ .container_name }}
max_retries: {{ .max_retries | default 3 }}
connect_timeout: {{ .connect_timeout | default "10s" }}
request_timeout: {{ .request_timeout | default "5s" }}
{{- end -}}
{{- else }}
type: "local"
{{- end -}}
Expand Down
20 changes: 20 additions & 0 deletions production/helm/loki/values.yaml
Expand Up @@ -298,6 +298,26 @@ loki:
userAssignedId: null
requestTimeout: null
endpointSuffix: null
swift:
auth_version: null
auth_url: null
internal: null
username: null
user_domain_name: null
user_domain_id: null
user_id: null
password: null
domain_id: null
domain_name: null
project_id: null
project_name: null
project_domain_id: null
project_domain_name: null
region_name: null
container_name: null
max_retries: null
connect_timeout: null
request_timeout: null
filesystem:
chunks_directory: /var/loki/chunks
rules_directory: /var/loki/rules
Expand Down

0 comments on commit 1d232b8

Please sign in to comment.