Skip to content

Commit

Permalink
Helm: fix enterprise-logs license secret name (#8498)
Browse files Browse the repository at this point in the history
**What this PR does / why we need it**:

Rename `gel-license.jwt` property of secret `gel-secrets` to
`license.jwt` on enterprise-logs chart to make it consistent betwen
`gel-secrets` and `gel-license` kubectl secrets.

* Fix the `stringData` property of the GEL secret, to contain
`license.jwt` property when importing:
* `gel-secrets`: containing both the `gcp_service_account.json` and
`license.jwt` properties
https://github.com/grafana/loki/blob/6ece17a82f15319b58befaef9aefcd9059ad266d/production/helm/loki/docs/examples/enterprise/enterprise-secrets.yaml#L1-L12
* `gel-license`: containing only the `license.jwt` property
https://github.com/grafana/loki/blob/6a7403c4f5cd0a01dea13954fe6f51631f485ad1/tools/dev/k3d/environments/helm-cluster/main.jsonnet#L213-L217
* Minor fixes in the README documentation.

**Special notes for your reviewer**:

**Checklist**
- [x] Reviewed the
[`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md)
guide (**required**)
- [ ] Documentation added
- [ ] Tests updated
- [x] `CHANGELOG.md` updated
- [ ] Changes that require user attention or interaction to upgrade are
documented in `docs/sources/upgrading/_index.md`
  • Loading branch information
ssncferreira committed Feb 24, 2023
1 parent 78db3f8 commit 9f8aa4b
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 16 deletions.
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.)

## 4.7

- [CHANGE] **BREAKING** Rename `gel-license.jwt` property of secret `gel-secrets` to `license.jwt` on enterprise-logs chart.

## 4.6.2

- [BUGFIX] Fix tokengen and provisioner secrets creation on enterprise-logs chart.
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 @@ -4,7 +4,7 @@ name: loki
description: Helm chart for Grafana Loki in simple, scalable mode
type: application
appVersion: 2.7.3
version: 4.6.2
version: 4.7.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: 4.6.2](https://img.shields.io/badge/Version-4.6.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.7.3](https://img.shields.io/badge/AppVersion-2.7.3-informational?style=flat-square)
![Version: 4.7.0](https://img.shields.io/badge/Version-4.7.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.7.3](https://img.shields.io/badge/AppVersion-2.7.3-informational?style=flat-square)

Helm chart for Grafana Loki in simple, scalable mode

Expand Down
17 changes: 8 additions & 9 deletions production/helm/loki/docs/examples/enterprise/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
## Introduction
This example gives you an example or getting started overrides value file for deploying Loki (Enterprise Licensed) using the Simple Scalable architecture in GKE and using GCS
This example gives you an example or getting started overrides value file for deploying Loki (Enterprise Licensed) using the Simple Scalable architecture in GKE and using GCS.

## Installation of Helm Chart
These instructions assume you have already have access to a Kubernetes cluster, GCS Bucket and GCP Service Account which has read/write permissions to that GCS Bucket.
These instructions assume you already have access to a Kubernetes cluster, GCS Bucket and GCP Service Account which has read/write permissions to that GCS Bucket.

### Populate Secret Values
Populate the examples/enterprise-secrets.yaml so that:
- The gcp_service_account.json secret has the contents of your GCP Service Account JSON key
- The gel-license.jwt secret has the contents of your Grafana Enterprise Logs license key given to your by Grafana Labs
Populate the [enterprise-secrets.yaml](./enterprise-secrets.yaml) so that:
- The `gcp_service_account.json` secret has the contents of your GCP Service Account JSON key.
- The `license.jwt` secret has the contents of your Grafana Enterprise Logs license key given to your by Grafana Labs.

Deploy the secrets file to your k8s cluster.
Deploy the secrets file to your k8s cluster with the command:

`kubectl apply -f enterprise-secrets.yaml`

### Configure the Helm Chart
Open examples/overides-enterprise-gcs.yaml and replace `{YOUR_GCS_BUCKET}` with the name of your GCS bucket. If there are other things you'd like to configure, view the core [Values.yaml file](https://github.com/grafana/helm-charts/blob/main/charts/loki-simple-scalable/values.yaml) and override anything else you need to within the overrides-enterprise-gcs.yaml file.
Open [overrides-enterprise-gcs.yaml](./overrides-enterprise-gcs.yaml) and replace `{YOUR_GCS_BUCKET}` with the name of your GCS bucket. If there are other things you'd like to configure, view the core [Values.yaml file](https://github.com/grafana/helm-charts/blob/main/charts/loki-simple-scalable/values.yaml) and override anything else you need to within the overrides-enterprise-gcs.yaml file.

### Install the Helm chart

Expand All @@ -25,5 +25,4 @@ Open examples/overides-enterprise-gcs.yaml and replace `{YOUR_GCS_BUCKET}` with

`kubectl --namespace {KUBERNETES_NAMESPACE} logs $POD_NAME loki | grep Token`

Take note of this token, you will need it when connecting Grafana Enterprise Logs to Grafana

Take note of this token, you will need it when connecting Grafana Enterprise Logs to Grafana.
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ stringData:
GCP_SERVICE_ACCOUNT_JSON_HERE
}
gel-license.jwt: LICENSE_HERE
license.jwt: LICENSE_HERE
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ enterprise:
secret:
secretName: gel-secrets
items:
- key: gel-license.jwt
- key: license.jwt
path: license.jwt
- key: gcp_service_account.json
path: gcp_service_account.json
Expand Down Expand Up @@ -43,7 +43,7 @@ write:
secret:
secretName: gel-secrets
items:
- key: gel-license.jwt
- key: license.jwt
path: license.jwt
- key: gcp_service_account.json
path: gcp_service_account.json
Expand All @@ -60,7 +60,7 @@ read:
secret:
secretName: gel-secrets
items:
- key: gel-license.jwt
- key: license.jwt
path: license.jwt
- key: gcp_service_account.json
path: gcp_service_account.json
Expand All @@ -77,7 +77,7 @@ gateway:
secret:
secretName: gel-secrets
items:
- key: gel-license.jwt
- key: license.jwt
path: license.jwt
- key: gcp_service_account.json
path: gcp_service_account.json

0 comments on commit 9f8aa4b

Please sign in to comment.