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

[agent-operator] Move crds(agent, prometheus) into separate subcharts #2781

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/charts/*/charts
!/charts/agent-operator/charts/
.idea
.vscode
.project
Expand Down
10 changes: 9 additions & 1 deletion charts/agent-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: grafana-agent-operator
description: A Helm chart for Grafana Agent Operator
type: application
version: 0.3.20
version: 0.3.21
appVersion: "0.40.3"
home: https://grafana.com/docs/agent/v0.40/
icon: https://raw.githubusercontent.com/grafana/agent/v0.40.3/docs/sources/assets/logo_and_name.png
Expand All @@ -11,3 +11,11 @@ sources:
maintainers:
- name: Grafana Agent Team
email: [email protected]

dependencies:
- name: agent-crds
version: "0.0.0"
condition: crds.agent.create
- name: prometheus-crds
version: "0.0.0"
condition: crds.prometheus.create
11 changes: 10 additions & 1 deletion charts/agent-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ A Helm chart for Grafana Agent Operator

* <https://github.com/grafana/agent/tree/v0.40.3/pkg/operator>

Note that this chart does not provision custom resources like `GrafanaAgent` and `MetricsInstance` (formerly `PrometheusInstance`) or any `*Monitor` resources.
## Requirements

| Repository | Name | Version |
|------------|------|---------|
| | agent-crds | 0.0.0 |
| | prometheus-crds | 0.0.0 |

Note that this chart provisions custom resources like `GrafanaAgent` and `MetricsInstance` (formerly `PrometheusInstance`) and some `*Monitor` resources. CRD provisioning can be disabled.

To learn how to deploy these resources, please see Grafana's [Agent Operator getting started guide](https://grafana.com/docs/agent/latest/operator/getting-started/).

Expand Down Expand Up @@ -56,6 +63,8 @@ A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an
| affinity | object | `{}` | Pod affinity configuration |
| annotations | object | `{}` | Annotations for the Deployment |
| containerSecurityContext | object | `{}` | Container security context (allowPrivilegeEscalation, etc.) |
| crds.agent | object | `{"create":true}` | Whether to install CRDs for monitoring. |
| crds.prometheus.create | bool | `true` | |
| extraArgs | list | `[]` | List of additional cli arguments to configure agent-operator (example: `--log.level`) |
| fullnameOverride | string | `""` | Overrides the chart's computed fullname |
| hostAliases | list | `[]` | hostAliases to add |
Expand Down
2 changes: 1 addition & 1 deletion charts/agent-operator/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

{{ template "chart.requirementsSection" . }}

Note that this chart does not provision custom resources like `GrafanaAgent` and `MetricsInstance` (formerly `PrometheusInstance`) or any `*Monitor` resources.
Note that this chart provisions custom resources like `GrafanaAgent` and `MetricsInstance` (formerly `PrometheusInstance`) and some `*Monitor` resources. CRD provisioning can be disabled.

To learn how to deploy these resources, please see Grafana's [Agent Operator getting started guide](https://grafana.com/docs/agent/latest/operator/getting-started/).

Expand Down
3 changes: 3 additions & 0 deletions charts/agent-operator/charts/agent-crds/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
apiVersion: v2
name: agent-crds
version: 0.0.0
6 changes: 6 additions & 0 deletions charts/agent-operator/charts/agent-crds/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# agent-crds

![Version: 0.0.0](https://img.shields.io/badge/Version-0.0.0-informational?style=flat-square)

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.8.1](https://github.com/norwoodj/helm-docs/releases/v1.8.1)
Empty file.
3 changes: 3 additions & 0 deletions charts/agent-operator/charts/prometheus-crds/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
apiVersion: v2
name: prometheus-crds
version: 0.0.0
6 changes: 6 additions & 0 deletions charts/agent-operator/charts/prometheus-crds/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# prometheus-crds

![Version: 0.0.0](https://img.shields.io/badge/Version-0.0.0-informational?style=flat-square)

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.8.1](https://github.com/norwoodj/helm-docs/releases/v1.8.1)
Empty file.
7 changes: 7 additions & 0 deletions charts/agent-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ podSecurityContext: {}
# -- Container security context (allowPrivilegeEscalation, etc.)
containerSecurityContext: {}

crds:
# -- Whether to install CRDs for monitoring.
agent:
create: true
prometheus:
create: true

rbac:
# -- Toggle to create ClusterRole and ClusterRoleBinding
create: true
Expand Down
Loading