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

Adds loki helm install examples #127

Merged
merged 3 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
38 changes: 38 additions & 0 deletions .github/workflows/helm-loki.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Helm GitHub Actions for loki

on:
pull_request:
paths:
- helm-configs/loki/**
- .github/workflows/helm-loki.yaml
jobs:
helm:
name: Helm
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: azure/setup-helm@v3
with:
version: latest
token: "${{ secrets.GITHUB_TOKEN }}"
id: helm
- name: Kubectl Install
working-directory: /usr/local/bin/
run: |
if [ ! -f /usr/local/bin/kubectl ]; then
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x ./kubectl
fi
- name: Run Helm Template
run: |
${{ steps.helm.outputs.helm-path }} repo add grafana https://grafana.github.io/helm-charts
${{ steps.helm.outputs.helm-path }} repo update
${{ steps.helm.outputs.helm-path }} template --values ${{ github.workspace }}/helm-configs/loki/loki-helm-minio-overrides-example.yaml \
--namespace grafana \
loki grafana/loki > /tmp/rendered.yaml
- name: Return helm Build
uses: actions/upload-artifact@v2
with:
name: helm-loki-artifact
path: /tmp/rendered.yaml
27 changes: 27 additions & 0 deletions docs/loki.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Setting up Loki

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

## Install the helm chart

You will need to make changes depending on how you want to configure loki. Example files are included in this directory choose one relevant to your deploy

```bash
helm upgrade --install --values my-loki-helm-overrides.yaml loki grafana/loki --create-namespace --namespace grafana
```

### Swift notes

If you plan on using swift as a backend for log storage see the [loki-helm-swift-overrides-example.yaml](loki-helm-swift-overrides-example.yaml)

### S3 notes

If you plan on using s3 as a backend for log storage see the [loki-helm-s3-overrides-example.yaml](loki-helm-s3-overrides-example.yaml)

### minio notes

If you plan on using minio as a backend for log storage see the [loki-helm-minio-overrides-example.yaml](loki-helm-minio-overrides-example.yaml)
7 changes: 7 additions & 0 deletions helm-configs/loki/loki-helm-minio-overrides-example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
global:
dnsService: "coredns"
minio:
enabled: true
loki:
auth_enabled: false
configStorageType: Secret
20 changes: 20 additions & 0 deletions helm-configs/loki/loki-helm-s3-overrides-example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
global:
dnsService: "coredns"
minio:
enabled: false
loki:
auth_enabled: false
configStorageType: Secret
storage:
bucketNames:
chunks: < CHUNKS BUCKET NAME > # TODO: Update with relevant bucket name for chunks
ruler: < RULER BUCKET NAME > # TODO: Update with relevant bucket name for ruler
admin: < ADMIN BUCKET NAME > # TODO: Update with relevant bucket name for admin
type: s3
s3:
endpoint: < ENDPOINT URL > # TODO: Update with valid enpoint URL
region: < REGION > # TODO: Update with valid region
secretAccessKey: < SECRET ACCESS KEY > # TODO: Update with valid secret access key
accessKeyId: < ACCESS KEY ID > # TODO: Update with access key id
s3ForcePathStyle: false
insecure: [ true | false ] # TODO: True if valid cert or false if not
19 changes: 19 additions & 0 deletions helm-configs/loki/loki-helm-swift-overrides-example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
global:
dnsService: "coredns"
minio:
enabled: false
loki:
auth_enabled: false
configStorageType: Secret
storage:
bucketNames:
chunks: chunks
ruler: ruler
admin: admin
type: swift
swift:
auth_url: https://identity.api.rackspacecloud.com/v1.0
username: < USERNAME > # TODO: Update with valid username
password: < PASSWORD > # TODO: Update with valid password
container_name: < CONTAINER > # TODO: Update with valid container
region_name: < REGION > # TODO: Update with valid region
Loading