Skip to content

feat(grafana-datasources)!: changed from tpl to secret#107

Open
CptSchnitz wants to merge 5 commits into
masterfrom
datasource-library-move-to-secret
Open

feat(grafana-datasources)!: changed from tpl to secret#107
CptSchnitz wants to merge 5 commits into
masterfrom
datasource-library-move-to-secret

Conversation

@CptSchnitz

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR converts datasource-library from a Helm library chart that emitted provisioning YAML via tpl/consumer templates into an application chart that directly renders a labeled Kubernetes Secret containing Grafana datasource provisioning YAML (for consumption by the Grafana k8s-sidecar). This is a breaking change in how consumers integrate the chart.

Changes:

  • Render Grafana datasource provisioning as a Secret (templates/datasources-secret.yaml) instead of requiring consumer charts to create a ConfigMap/template wrapper.
  • Move team/environment to instance-level and update postgres datasource generation logic + auth validation in templates.
  • Add a JSON schema for values validation and update documentation to match the new usage.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
charts/datasource-library/values.yaml Adds default values structure for datasources.postgres.
charts/datasource-library/values.schema.json Introduces schema validation for instance-level and postgres datasource entries.
charts/datasource-library/templates/datasources-secret.yaml New Secret template that wraps provisioning output for k8s-sidecar pickup.
charts/datasource-library/templates/_helpers.tpl Adds helpers for required team, resolved environment, and a computed base name.
charts/datasource-library/templates/_datasources.tpl Updates postgres provisioning generation and auth/SSL handling.
charts/datasource-library/README.md Documents the new Secret-based integration, naming, and auth model.
charts/datasource-library/Chart.yaml Updates chart metadata and changes type from library to application.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread charts/grafana-datasources/values.schema.json
Comment thread charts/datasource-library/values.schema.json

## Values

### PostgreSQL entry
Values are validated by `values.schema.json` (field types, enums, unknown-key rejection, and the `rootCertFile` requirement). Team/environment resolution and the auth-method requirement are enforced at render time.
CptSchnitz and others added 2 commits July 15, 2026 09:14
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

@ronenkapelian ronenkapelian left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. The name should be replaced from library to something meaningful and also update it on readme

  2. out of the scope, but it will be nice to add Standard Helm/Kubernetes Labels on Secret

Comment thread charts/grafana-datasources/values.schema.json
CptSchnitz and others added 2 commits July 16, 2026 09:09
The upstream 'min length for ssl files' autofix dropped the closing brace of
the ssl 'properties' object, producing invalid JSON. Restore it while keeping
the minLength additions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@CptSchnitz CptSchnitz changed the title feat(datasource-library)!: changed from tpl to secret feat(grafana-datasources)!: changed from tpl to secret Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants