Skip to content

Commit bdc7075

Browse files
masonCheinTian
authored andcommitted
feat: [INVASIVE] add new component loki, tempo and prometheus
1 parent f3641c3 commit bdc7075

File tree

368 files changed

+52260
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

368 files changed

+52260
-3
lines changed

charts/csghub/Chart.lock

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,14 @@ dependencies:
4444
- name: reloader
4545
repository: file://charts/reloader
4646
version: 2.1.4
47-
digest: sha256:531d3e58ca3067c15783b5add45b9f15776087acaee5506f0f18ff7a150cf15c
48-
generated: "2025-09-16T15:22:13.312383+08:00"
47+
- name: loki
48+
repository: file://charts/loki
49+
version: 6.29.0
50+
- name: tempo
51+
repository: file://charts/tempo
52+
version: 1.23.3
53+
- name: prometheus
54+
repository: file://charts/prometheus
55+
version: 27.37.0
56+
digest: sha256:df269a20c090b93cf51d79e15eea2855959e574f6dbc0bc31c0332bb65c24907
57+
generated: "2025-09-16T20:21:37.725364+08:00"

charts/csghub/Chart.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,15 @@ dependencies:
8888
version: "2.1.4"
8989
repository: "file://charts/reloader"
9090
condition: reloader.enabled
91+
- name: loki
92+
version: "6.29.0"
93+
repository: "file://charts/loki"
94+
condition: loki.enabled
95+
- name: tempo
96+
version: "1.23.3"
97+
repository: "file://charts/tempo"
98+
condition: tempo.enabled
99+
- name: prometheus
100+
version: "27.37.0"
101+
repository: "file://charts/prometheus"
102+
condition: prometheus.enabled
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
14+
# Common backup files
15+
*.swp
16+
*.bak
17+
*.tmp
18+
*.orig
19+
*~
20+
21+
# Various IDEs
22+
.project
23+
.idea/
24+
*.tmproj
25+
.vscode/
26+
27+
# Other
28+
doc.yaml
29+
README.tpl
30+
README.md.gotmpl
31+
ci
32+
CHANGELOG.md
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Contributing to the Loki Helm Chart
2+
3+
Thank you for your interest in contributing to the Loki Helm Chart! This document provides guidelines for contributing to ensure the chart remains maintainable, broadly useful, and accessible to the community.
4+
5+
For general Loki project contributions, please also see the main [Contributing Guide](../../../CONTRIBUTING.md).
6+
7+
## Contribution Guidelines
8+
9+
### What We Welcome
10+
11+
We encourage contributions that:
12+
13+
- **Improve general usability**: Features that benefit the majority of users
14+
- **Fix bugs**: Clear bug fixes with reproduction steps
15+
- **Enhance documentation**: Better examples, clearer explanations
16+
- **Security improvements**: Security-related enhancements
17+
- **Performance optimizations**: Changes that improve performance broadly
18+
- **Standards compliance**: Updates to follow Kubernetes best practices
19+
20+
### What We Avoid
21+
22+
To keep the chart maintainable and broadly useful, we avoid:
23+
24+
- **Project-specific integrations**: Features specific to other projects that serve only a small group of users
25+
- **Company/individual-specific requirements**: Customizations that serve only specific organizations
26+
- **Bizarre constraints**: Unusual or overly complex requirements that don't serve the general community
27+
- **Breaking changes**: Changes that would break existing deployments without clear migration paths
28+
29+
### Decision Criteria
30+
31+
When reviewing contributions, we ask:
32+
33+
1. **Is this generally useful?** Does it benefit the broader community or just specific users?
34+
2. **Is it simple and reasonable?** Does it add unnecessary complexity?
35+
3. **Does it align with Kubernetes best practices?** Is it following established patterns?
36+
4. **Is it maintainable?** Can the community maintain this feature long-term?
37+
38+
**Important**: If your use case is highly specific to your organization, consider using the Loki chart as a subchart instead of being called directly. This allows you to customize without adding complexity to the main chart.
39+
40+
## Technical Requirements
41+
42+
### Before Submitting a PR
43+
44+
1. **Update documentation**: Run `make helm-docs` from the repository root if you modified:
45+
- `Chart.yaml`
46+
- `values.yaml`
47+
- Any template files
48+
49+
2. **Update the changelog**: Add an entry to [CHANGELOG.md](./CHANGELOG.md) in the `Unreleased` section using the format:
50+
```
51+
- [CHANGE|FEATURE|BUGFIX|ENHANCEMENT] Brief description of your change, and a link to the PR number. For examples, see the CHANGELOG.
52+
```
53+
54+
3. **Test your changes**: The CICD workflow will run comprehensive tests, however it's a good idea to run a few "quick and dirty" tests locally before committing, as those workflows can take quite a while in comparison.
55+
- Single binary: `helm template --values single-binary-values.yaml`
56+
- Simple scalable: `helm template --values simple-scalable-values.yaml`
57+
- Distributed: `helm template --values distributed-values.yaml`
58+
59+
4. **Commit your changes**: Our commits follow the style of [Conventional Commits](https://www.conventionalcommits.org/). High level this looks like `<type>: description`. For example:
60+
- `feat(helm): add resource limits to querier`
61+
- `fix(helm): correct service selector`
62+
63+
Thank you for contributing to the Loki Helm Chart! Your contributions help make log aggregation accessible to the entire community.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
dependencies:
2+
- name: minio
3+
repository: https://charts.min.io/
4+
version: 5.4.0
5+
- name: grafana-agent-operator
6+
repository: https://grafana.github.io/helm-charts
7+
version: 0.5.1
8+
- name: rollout-operator
9+
repository: https://grafana.github.io/helm-charts
10+
version: 0.24.0
11+
digest: sha256:beb08aeb31a1fa6b88c326b307c9960ca5fc5032892f7acd5deae6b859884638
12+
generated: "2025-02-26T01:09:19.861074559Z"
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
apiVersion: v2
2+
appVersion: 3.4.2
3+
dependencies:
4+
- alias: minio
5+
condition: minio.enabled
6+
name: minio
7+
repository: https://charts.min.io/
8+
version: 5.4.0
9+
- alias: grafana-agent-operator
10+
condition: monitoring.selfMonitoring.grafanaAgent.installOperator
11+
name: grafana-agent-operator
12+
repository: https://grafana.github.io/helm-charts
13+
version: 0.5.1
14+
- alias: rollout_operator
15+
condition: rollout_operator.enabled
16+
name: rollout-operator
17+
repository: https://grafana.github.io/helm-charts
18+
version: 0.24.0
19+
description: Helm chart for Grafana Loki and Grafana Enterprise Logs supporting monolithic,
20+
simple scalable, and microservices modes.
21+
home: https://grafana.github.io/helm-charts
22+
icon: https://grafana.com/docs/loki/latest/logo_and_name.png
23+
maintainers:
24+
- name: trevorwhitney
25+
- name: jeschkies
26+
name: loki
27+
sources:
28+
- https://github.com/grafana/loki
29+
- https://grafana.com/oss/loki/
30+
- https://grafana.com/docs/loki/latest/
31+
type: application
32+
version: 6.29.0

charts/csghub/charts/loki/Makefile

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
.DEFAULT_GOAL := all
2+
.PHONY: lint lint-yaml install-distributed install-single-binary uninstall update-chart update
3+
4+
# Optional image override, example: make install-distributed IMAGE=grafana/loki:2.9.0
5+
IMAGE ?=
6+
7+
# Optional helm arguments, example: make install-distributed ARGS="--set loki.auth.enabled=true"
8+
ARGS ?=
9+
10+
# Default arguments to disable affinity for testing
11+
DEFAULT_ARGS = --set gateway.affinity=null \
12+
--set ingester.affinity=null \
13+
--set distributor.affinity=null \
14+
--set querier.affinity=null \
15+
--set queryFrontend.affinity=null \
16+
--set queryScheduler.affinity=null \
17+
--set indexGateway.affinity=null \
18+
--set compactor.affinity=null \
19+
--set ruler.affinity=null \
20+
--set backend.affinity=null \
21+
--set read.affinity=null \
22+
--set write.affinity=null \
23+
--set singleBinary.affinity=null \
24+
--set memcachedChunks.affinity=null \
25+
--set memcachedFrontend.affinity=null \
26+
--set memcachedIndexQueries.affinity=null \
27+
--set memcachedMetadata.affinity=null \
28+
--set memcachedResults.affinity=null \
29+
--set global.podAntiAffinity=null \
30+
--set global.podAntiAffinityTopologyKey=null
31+
32+
# Generate image override flag if IMAGE is provided
33+
IMAGE_FLAG = $(if $(IMAGE),\
34+
$(eval PARTS=$(subst :, ,$(IMAGE)))\
35+
$(eval REPO_PARTS=$(subst /, ,$(word 1,$(PARTS))))\
36+
$(eval TAG=$(word 2,$(PARTS)))\
37+
$(eval REPO_COUNT=$(words $(REPO_PARTS)))\
38+
$(if $(filter 3,$(REPO_COUNT)),\
39+
--set loki.image.registry=$(word 1,$(REPO_PARTS))/$(word 2,$(REPO_PARTS)) --set loki.image.repository=$(word 3,$(REPO_PARTS)),\
40+
--set loki.image.registry=$(word 1,$(REPO_PARTS)) --set loki.image.repository=$(word 2,$(REPO_PARTS))\
41+
) --set loki.image.tag=$(TAG),)
42+
43+
lint: lint-yaml
44+
45+
lint-yaml:
46+
yamllint -c $(CURDIR)/src/.yamllint.yaml $(CURDIR)/src
47+
48+
# Helm chart installation targets
49+
install-distributed:
50+
helm upgrade --install loki . \
51+
-f distributed-values.yaml \
52+
--create-namespace \
53+
--namespace loki \
54+
$(DEFAULT_ARGS) \
55+
$(IMAGE_FLAG) \
56+
$(ARGS)
57+
58+
install-single-binary:
59+
helm upgrade --install loki . \
60+
-f single-binary-values.yaml \
61+
--create-namespace \
62+
--namespace loki \
63+
$(DEFAULT_ARGS) \
64+
$(IMAGE_FLAG) \
65+
$(ARGS)
66+
67+
# Uninstall Loki helm release and optionally delete the namespace
68+
uninstall:
69+
helm uninstall loki --namespace loki
70+
kubectl delete namespace loki --ignore-not-found
71+
72+
# Update Helm chart dependencies
73+
update-chart:
74+
helm dependency update .
75+
76+
# Update existing installation with latest changes
77+
update:
78+
@if [ "$$(helm get values loki -n loki -o yaml | grep "deploymentMode: Distributed")" ]; then \
79+
echo "Updating distributed deployment..."; \
80+
helm upgrade loki . -f distributed-values.yaml --namespace loki $(DEFAULT_ARGS) $(IMAGE_FLAG) $(ARGS); \
81+
else \
82+
echo "Updating single binary deployment..."; \
83+
helm upgrade loki . -f single-binary-values.yaml --namespace loki $(DEFAULT_ARGS) $(IMAGE_FLAG) $(ARGS); \
84+
fi
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# loki
2+
3+
![Version: 6.29.0](https://img.shields.io/badge/Version-6.29.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.4.2](https://img.shields.io/badge/AppVersion-3.4.2-informational?style=flat-square)
4+
5+
Helm chart for Grafana Loki and Grafana Enterprise Logs supporting monolithic, simple scalable, and microservices modes.
6+
7+
## Source Code
8+
9+
* <https://github.com/grafana/loki>
10+
* <https://grafana.com/oss/loki/>
11+
* <https://grafana.com/docs/loki/latest/>
12+
13+
## Requirements
14+
15+
| Repository | Name | Version |
16+
|------------|------|---------|
17+
| https://charts.min.io/ | minio(minio) | 5.4.0 |
18+
| https://grafana.github.io/helm-charts | grafana-agent-operator(grafana-agent-operator) | 0.5.1 |
19+
| https://grafana.github.io/helm-charts | rollout_operator(rollout-operator) | 0.24.0 |
20+
21+
Find more information in the Loki Helm Chart [documentation](https://grafana.com/docs/loki/next/installation/helm).
22+
23+
## Contributing and releasing
24+
25+
If you made any changes to the [Chart.yaml](https://github.com/grafana/loki/blob/main/production/helm/loki/Chart.yaml) or [values.yaml](https://github.com/grafana/loki/blob/main/production/helm/loki/values.yaml) run `make helm-docs` from the root of the repository to update the documentation and commit the changed files.
26+
27+
Futhermore, please add an entry to the [CHANGELOG.md](./CHANGELOG.md) file about what you changed. This file has a header that looks like this:
28+
29+
```
30+
[//]: # (<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.)
31+
````
32+
33+
Place your changes as a bulleted list below this header. The helm chart is automatically released once a week, at which point the `CHANGELOG.md` file will be updated to reflect the release of all changes between this header the the header of the previous version as the changes for that weeks release. For example, if the weekly release will be `1.21.0`, and the `CHANGELOG.md` file has the following entries:
34+
35+
```
36+
[//]: # (<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.)
37+
38+
- [CHANGE] Changed the thing
39+
- [FEATURE] Cool new feature
40+
41+
## 1.20.0
42+
43+
- [BUGFIX] Fixed the bug
44+
```
45+
46+
Then the weekly release will create a `CHANGELOG.md` with the following content:
47+
```
48+
[//]: # (<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.)
49+
50+
## 1.21.0
51+
52+
- [CHANGE] Changed the thing
53+
- [FEATURE] Cool new feature
54+
55+
## 1.20.0
56+
57+
- [BUGFIX] Fixed the bug
58+
```
59+
60+
#### Versioning
61+
62+
Normally contributors need _not_ bump the version nor update the [CHANGELOG.md](https://github.com/grafana/loki/blob/main/production/helm/loki/CHANGELOG.md). A new version of the Chart will follow this cadence:
63+
- Automatic weekly releases
64+
- Releases that coincide with Loki/GEL releases
65+
- Manual releases when necessary (ie. to address a CVE or critical bug)
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*~
18+
# Various IDEs
19+
.project
20+
.idea/
21+
*.tmproj
22+
.vscode/
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: v2
2+
appVersion: 0.44.2
3+
description: A Helm chart for Grafana Agent Operator
4+
home: https://grafana.com/docs/agent/v0.44/
5+
icon: https://raw.githubusercontent.com/grafana/agent/v0.44.2/docs/sources/assets/logo_and_name.png
6+
maintainers:
7+
8+
name: Grafana Agent Team
9+
name: grafana-agent-operator
10+
sources:
11+
- https://github.com/grafana/agent/tree/v0.44.2/static/operator
12+
type: application
13+
version: 0.5.1

0 commit comments

Comments
 (0)