Skip to content
Draft
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
7 changes: 5 additions & 2 deletions charts/k8s-monitoring/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ dependencies:
- name: feature-pod-logs-via-kubernetes-api
repository: ""
version: 1.0.0
- name: feature-kubernetes-manifests
repository: ""
version: 1.0.0
- name: feature-profiling
repository: ""
version: 1.0.0
Expand All @@ -38,5 +41,5 @@ dependencies:
- name: alloy-operator
repository: https://grafana.github.io/helm-charts
version: 0.3.14
digest: sha256:660387cc1740f69780420e72cdddd6eb497097901a524e5d5f20b8a59303e402
generated: "2025-12-02T10:47:58.495-06:00"
digest: sha256:74d3926b919ff3580aecc7c990ca9b9e37b3a3d10a129cf61e3ba7deeaab6d6c
generated: "2025-12-02T14:05:13.070402-06:00"
5 changes: 5 additions & 0 deletions charts/k8s-monitoring/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ dependencies:
repository: ""
version: 1.0.0
condition: podLogsViaKubernetesApi.enabled
- alias: kubernetesManifests
name: feature-kubernetes-manifests
repository: ""
version: 1.0.0
condition: kubernetesManifests.enabled
- alias: profiling
name: feature-profiling
repository: ""
Expand Down
8 changes: 8 additions & 0 deletions charts/k8s-monitoring/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ details:
| | clusterEvents(feature-cluster-events) | 1.0.0 |
| | clusterMetrics(feature-cluster-metrics) | 1.0.0 |
| | integrations(feature-integrations) | 1.0.0 |
| | kubernetesManifests(feature-kubernetes-manifests) | 1.0.0 |
| | nodeLogs(feature-node-logs) | 1.0.0 |
| | podLogs(feature-pod-logs) | 1.0.0 |
| | podLogsViaKubernetesApi(feature-pod-logs-via-kubernetes-api) | 1.0.0 |
Expand Down Expand Up @@ -393,6 +394,13 @@ details:
| integrations | object | No integrations enabled | Service Integrations enables gathering telemetry data for common services and applications deployed to Kubernetes. To see the valid options, please see the [Service Integrations documentation](https://github.com/grafana/k8s-monitoring-helm/tree/main/charts/k8s-monitoring/charts/feature-integrations). |
| integrations.destinations | list | `[]` | The destinations where integration metrics will be sent. If empty, all metrics-capable destinations will be used. |

### Features - Kubernetes Manifests

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| kubernetesManifests.destinations | list | `[]` | The destinations where logs will be sent. If empty, all logs-capable destinations will be used. |
| kubernetesManifests.enabled | bool | `false` | Enable gathering Kubernetes Manifests. |

### Features - Node Logs

| Key | Type | Default | Description |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
docs
schema-mods
tests
Makefile
README.md
README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dependencies: []
digest: sha256:643d5437104296e21d906ecb15b2c96ad278f20cfc4af53b12bb6069bd853726
generated: "2024-08-28T15:09:37.347011-05:00"
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
apiVersion: v2
name: feature-kubernetes-manifests
description: Kubernetes Observability feature for gathering Kubernetes manifests.
type: application
sources:
- https://github.com/grafana/k8s-monitoring-helm/tree/main/charts/k8s-monitoring/charts/feature-kubernetes-manifests
version: 1.0.0
appVersion: 1.0.0
maintainers:
- email: [email protected]
name: petewall
dependencies: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
HAS_HELM_UNITTEST := $(shell helm plugin list | grep unittest 2> /dev/null)

.SECONDEXPANSION:
README.md: values.yaml Chart.yaml $$(wildcard README.md.gotmpl)
docker run --rm --platform linux/amd64 --volume $(shell pwd):/chart ghcr.io/grafana/helm-chart-toolbox-doc-generator --chart /chart > $@

Chart.lock: Chart.yaml
helm dependency update .
@touch Chart.lock # Ensure the timestamp is updated

values.schema.json: values.yaml $$(wildcard schema-mods/*)
docker run --rm --platform linux/amd64 --volume $(shell pwd):/chart ghcr.io/grafana/helm-chart-toolbox-schema-generator --chart /chart > $@

.PHONY: clean
clean:
rm -f README.md values.schema.json

.PHONY: build
build: README.md Chart.lock values.schema.json

.PHONY: lint-shell
lint-shell:
@if command -v shellcheck &> /dev/null; then \
shellcheck collect-manifests.sh; \
else \
docker run --rm -v $(shell pwd):/src --workdir /src koalaman/shellcheck:stable --rcfile .shellcheckrc templates/script.sh; \
fi

.PHONY: lint-helm
lint-helm:
helm lint .
ct lint --lint-conf ../../.lintconf.yaml --helm-dependency-extra-args=--skip-refresh --charts .

.PHONY: lint
lint: lint-shell lint-helm

.PHONY: test
test: build lint
ifdef HAS_HELM_UNITTEST
helm unittest .
else
docker run --rm --volume $(shell pwd):/apps helmunittest/helm-unittest:3.18.4-1.0.0 .
endif

.PHONY: update-test-snapshots
update-test-snapshots:
ifdef HAS_HELM_UNITTEST
helm unittest . --update-snapshot
else
docker run --rm --volume $(shell pwd):/apps helmunittest/helm-unittest:3.18.4-1.0.0 . --update-snapshot
endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<!--
(NOTE: Do not edit README.md directly. It is a generated file!)
( To make changes, please modify README.md.gotmpl and run `helm-docs`)
-->

# Feature: Kubernetes Manifests

TODO

## Usage

```yaml
kubernetesManifests:
enabled: true
... [values](#values)
```

## Testing

This chart contains unit tests to verify the generated configuration. The hidden value `deployAsConfigMap` will render
the generated configuration into a ConfigMap object. While this ConfigMap is not used during regular operation, you can
use it to show the outcome of a given values file.

The unit tests use this ConfigMap to create an object with the configuration that can be asserted against. To run the
tests, use `helm test`.

Be sure perform actual integration testing in a live environment in the main [k8s-monitoring](../..) chart.

<!-- textlint-disable terminology -->
## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| petewall | <[email protected]> | |
<!-- textlint-enable terminology -->
<!-- markdownlint-disable no-bare-urls -->
<!-- markdownlint-disable list-marker-space -->
## Source Code

* <https://github.com/grafana/k8s-monitoring-helm/tree/main/charts/k8s-monitoring/charts/feature-kubernetes-manifests>
<!-- markdownlint-enable list-marker-space -->
<!-- markdownlint-enable no-bare-urls -->

## Values

### Image

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| image | object | `{"digest":"","pullPolicy":"IfNotPresent","pullSecrets":[],"registry":"ghcr.io","repository":"grafana/helm-chart-toolbox-kubectl","tag":"0.1.3"}` | The image to run to get the Kubernetes manifests from this cluster. It must contain `kubectl` and `jq` at a minimum. |

### General Settings

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| kinds | object | `{"cronjobs":{"gather":false},"daemonsets":{"gather":false},"deployments":{"gather":false},"pods":{"gather":false},"statefulsets":{"gather":false}}` | The kinds of manifests to gather. |
| namespaces | list | `[]` | Only gather manifests from these namespaces. If empty, gather from all. This affects the manifests gathered, but Also if this chart deploys ClusterRoles and ClusterRoleBindings or Roles and RoleBindings. |
| refreshInterval | string | `"1d"` | How frequently to refresh all manifests, regardless of if they have changed. At maximum, this should be set lower Than the retention period for your log storage. |

### Other Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| global.image.registry | string | `""` | |
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!--
(NOTE: Do not edit README.md directly. It is a generated file!)
( To make changes, please modify README.md.gotmpl and run `helm-docs`)
-->

# Feature: Kubernetes Manifests

TODO

## Usage

```yaml
kubernetesManifests:
enabled: true
... [values](#values)
```

## Testing

This chart contains unit tests to verify the generated configuration. The hidden value `deployAsConfigMap` will render
the generated configuration into a ConfigMap object. While this ConfigMap is not used during regular operation, you can
use it to show the outcome of a given values file.

The unit tests use this ConfigMap to create an object with the configuration that can be asserted against. To run the
tests, use `helm test`.

Be sure perform actual integration testing in a live environment in the main [k8s-monitoring](../..) chart.

<!-- textlint-disable terminology -->
{{ template "chart.maintainersSection" . }}
<!-- textlint-enable terminology -->
<!-- markdownlint-disable no-bare-urls -->
<!-- markdownlint-disable list-marker-space -->
{{ template "chart.sourcesSection" . }}
<!-- markdownlint-enable list-marker-space -->
<!-- markdownlint-enable no-bare-urls -->
{{ template "chart.requirementsSection" . }}
{{ template "chart.valuesSection" . }}
Loading
Loading