Commit Graph

15 Commits

Author SHA1 Message Date
Ryan McKinley 8fd8c6f476
SecureValues: Add explicit JSON schema (#109648) 2025-08-14 16:01:29 +03:00
Ryan McKinley 101aea9647
K8s/Meta: Support setting secure values on a struct type (#109381) 2025-08-12 00:53:56 -05:00
Ryan McKinley 295ace108d
K8s/Meta: Support extracting InlineSecureValues from an explicit struct (#109279) 2025-08-06 21:17:50 +03:00
Ryan McKinley 9786389ae8
SecureValues: Support inline secure values in GrafanaMetaAccessor (#107996) 2025-07-11 16:47:54 +00:00
Ryan McKinley af8a70bbab
K8s/Permissions: Enable a grant-permissions annotation action to set default permissions (#102527)
* create permissions

* add key

* lint

* structure as a delayed callback

* legacy API hook

* merge main

* wired up

* and folders

* watch repos

* missing return statement

* Set the correct permissions

* add TestAfterCreatePermissionCreator

* do not add perms on folder create

* fix tests

* add annotation on create

* lint

* lint

* ensure we set permissions when the FT is disabled

* remove custom folder_storage

* fix lint

* change default

* lint

* lint

* fix: annotation

* ensure permissions are added on folder legacy

* remove folderstorage again

* fix tests

* add FT

* undo change to folder

* dashboard on create

* remove annotation for folder

* fix tests

* fix prepare after rebase

* fix tests

* fix tests

* fix tests

* lint

* address comments

* add test for prepareObjectForStorage

* add again skipIfMode as per comment

---------

Co-authored-by: Georges Chaudy <chaudyg@gmail.com>
2025-04-09 13:05:37 +02:00
Ryan McKinley dc2defd84f
K8s/Annotations: Use manager/source annotations rather than repo (#101313)
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
2025-03-05 08:54:20 +02:00
Igor Suleymanov 6ccc56814c
Add resource annotations for storing manager properties (#99683)
What is this feature?

This change adds properties and known annotations to store them in for recording resource manager information, such as:

The type (kind) of the manager (ex. Terraform / kubectl / etc.)
The identity of the manager (ex. grafana/terraform-provider-grafana)
Whether the managers allows the resource to be edited by others.
Whether a resource is temporarily excluded from the manager's control.
These annotations are inspired by Kubernetes field management API (https://kubernetes.io/docs/reference/using-api/server-side-apply/#field-management) and known Kubernetes annotations
(https://kubernetes.io/docs/reference/labels-annotations-taints/#app-kubernetes-io-managed-by).

It also adds annotations for storing information about the source of a provisioned resource, such as path, checksum & timestamp.

Why do we need this feature?

To make it possible to mark resources as managed by specific managers, modifying how these resources appear in the UI and are treated in the backend APIs.

For example, we'd like to make managed resources read-only, or show specific docs / workflows based on the tool which is used to manage resources and so on.

The identity is required for ensuring that managers of the same kind can still be told apart.

Who is this feature for?

For as-code practitioners and API users.

---------

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2025-02-20 11:39:12 +02:00
Ryan McKinley 3c56e32b0c
K8s/Utils: Find title in unstructured content (#100576) 2025-02-13 14:04:03 +03:00
Ryan McKinley 1a46039037
K8s/Dashboards: Pass the legacy internal ID into labels (#98311)
---------

Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2024-12-20 21:33:49 +02:00
Ryan McKinley cc6d057a18
Provisioning: Rename k8s origin metadata to repo (#96524) 2024-11-15 17:26:14 +03:00
Ryan McKinley 9210414782
K8s: support unstructured spec+status mutation with GrafanaMetaAccessor (#92970) 2024-09-10 13:32:18 +03:00
Ryan McKinley 079f0715aa
ResourceServer: Add resource server protobuf and wrapper (#90007) 2024-07-09 15:08:13 -07:00
Ryan McKinley 9b7f9ae22e
K8s: Rename origin.key to origin.hash (#89337) 2024-06-18 22:27:16 +03:00
Ryan McKinley f2b6a9aa3d
K8s: Add numeric revisionVersion helpers to grafanaMetaAccessor (#89191) 2024-06-14 02:35:23 +03:00
Ryan McKinley 3ae95a6eb1
K8s: Update grafana resource metadata accessor (#89074) 2024-06-12 14:39:37 +03:00