Skip to content

Commit 10d42bb

Browse files
JanPokornyJan Pokorný
authored andcommitted
Initial commit
0 parents  commit 10d42bb

10 files changed

Lines changed: 620 additions & 0 deletions

File tree

.github/workflows/reindex.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Reindex
2+
3+
on:
4+
release:
5+
types: [released]
6+
workflow_run:
7+
workflows: ["Release"]
8+
types: [completed]
9+
workflow_dispatch:
10+
11+
permissions:
12+
id-token: write
13+
pages: write
14+
contents: read
15+
16+
jobs:
17+
reindex:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Install dependencies
21+
run: |
22+
sudo snap install yq
23+
- name: Generate Helm repository index.yaml
24+
run: |
25+
curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
26+
-H "X-GitHub-Api-Version: 2022-11-28" \
27+
"https://api.github.com/repos/${{ github.repository }}/releases" | \
28+
yq -P '{ "apiVersion": "v1", "entries": { "betterstack-logs": . | map({ "name": "betterstack-logs", "urls": [ .assets[0].browser_download_url ], "version": .tag_name }) } }' >index.yaml
29+
- name: Upload artifact
30+
uses: actions/upload-pages-artifact@v2
31+
with:
32+
path: '.'
33+
- name: Deploy to GitHub Pages
34+
id: deployment
35+
uses: actions/deploy-pages@v2

.github/workflows/release.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v3
17+
- name: Ensure that chart version in YAML is the same as release tag
18+
run: |
19+
sed -i "s/^version: .*/version: ${GITHUB_REF#refs\/tags\/v}/" Chart.yaml
20+
git diff --exit-code
21+
- name: Install Helm
22+
uses: azure/setup-helm@v3
23+
with:
24+
token: ${{ secrets.GITHUB_TOKEN }}
25+
- name: Update chart dependencies
26+
run: helm dependency update
27+
- name: Package chart
28+
run: helm package .
29+
- name: Create a release
30+
uses: softprops/action-gh-release@v1
31+
with:
32+
files: '*.tgz'

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.tgz

.helmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.git
2+
.github

Chart.lock

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
dependencies:
2+
- name: metrics-server
3+
repository: https://kubernetes-sigs.github.io/metrics-server/
4+
version: 3.11.0
5+
- name: vector
6+
repository: https://helm.vector.dev
7+
version: 0.24.1
8+
digest: sha256:9177ce1768849d300b573f753830f0636daafa5e582679b85340300415bbfe45
9+
generated: "2023-09-21T14:01:43.613145334+02:00"

Chart.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: v2
2+
name: betterstack-logs
3+
version: 1.0.0
4+
dependencies:
5+
- name: metrics-server
6+
version: '>=0'
7+
repository: https://kubernetes-sigs.github.io/metrics-server/
8+
- name: vector
9+
version: '>=0'
10+
repository: https://helm.vector.dev

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Better Stack, Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# [Better Stack](https://betterstack.com/logs) Helm chart
2+
3+
A Helm chart for sending Kubernetes logs and metrics to Better Stack.
4+
5+
[![Better Stack dashboard](https://github.com/logtail/logtail-js/assets/10132717/96b422e7-3026-49c1-bd45-a946c37211d0)](https://betterstack.com/logs)
6+
7+
[![MIT License](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
8+
9+
Experience SQL-compatible structured log management based on ClickHouse. [Learn more ⇗](https://betterstack.com/logs)
10+
11+
## Documentation
12+
13+
[Getting started ⇗](https://betterstack.com/docs/logs/kubernetes/#helm)
14+
15+
## Need help?
16+
Please let us know at [hello@betterstack.com](mailto:hello@betterstack.com). We're happy to help!
17+
18+
---
19+
20+
[MIT license](LICENSE)

templates/rbac.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRole
3+
metadata:
4+
name: vector-metrics
5+
labels:
6+
app.kubernetes.io/name: vector
7+
app.kubernetes.io/instance: vector
8+
app.kubernetes.io/component: Agent
9+
rules:
10+
- apiGroups:
11+
- "metrics.k8s.io"
12+
resources:
13+
- nodes
14+
- pods
15+
verbs:
16+
- list
17+
---
18+
apiVersion: rbac.authorization.k8s.io/v1
19+
kind: ClusterRoleBinding
20+
metadata:
21+
name: vector-metrics
22+
labels:
23+
app.kubernetes.io/name: vector
24+
app.kubernetes.io/instance: vector
25+
app.kubernetes.io/component: Agent
26+
roleRef:
27+
apiGroup: rbac.authorization.k8s.io
28+
kind: ClusterRole
29+
name: vector-metrics
30+
subjects:
31+
- kind: ServiceAccount
32+
name: '{{ .Release.Name }}-vector'
33+
namespace: '{{ .Release.Namespace }}'
34+
---
35+
apiVersion: v1
36+
kind: Secret
37+
metadata:
38+
name: vector-service-account
39+
annotations:
40+
kubernetes.io/service-account.name: '{{ .Release.Name }}-vector'
41+
type: kubernetes.io/service-account-token

0 commit comments

Comments
 (0)