Menu
Grafana Cloud Enterprise Open source

Both documentation generation and kinds schemas are in active development and subject to change without prior notice.

AccessPolicy

Maturity: merged

Version: 0.0

Access rules for a scope+role. NOTE there is a unique constraint on role+scope

PropertyTypeRequiredDefaultDescription
metadataobjectYesmetadata contains embedded CommonMetadata and can be extended with custom string fields
TODO: use CommonMetadata instead of redefining here; currently needs to be defined here
without external reference as using the CommonMetadata reference breaks thema codegen.
specobjectYes
statusobjectYes

Metadata

metadata contains embedded CommonMetadata and can be extended with custom string fields TODO: use CommonMetadata instead of redefining here; currently needs to be defined here without external reference as using the CommonMetadata reference breaks thema codegen.

It extends _kubeObjectMetadata.

PropertyTypeRequiredDefaultDescription
createdBystringYes
creationTimestampstringYes(Inherited from _kubeObjectMetadata)
extraFieldsobjectYesextraFields is reserved for any fields that are pulled from the API server metadata but do not have concrete fields in the CUE metadata
finalizersstring[]Yes(Inherited from _kubeObjectMetadata)
labelsmap[string]stringYes(Inherited from _kubeObjectMetadata)
resourceVersionstringYes(Inherited from _kubeObjectMetadata)
uidstringYes(Inherited from _kubeObjectMetadata)
updateTimestampstringYes
updatedBystringYes
deletionTimestampstringNo(Inherited from _kubeObjectMetadata)

_kubeObjectMetadata

_kubeObjectMetadata is metadata found in a kubernetes object’s metadata field. It is not exhaustive and only includes fields which may be relevant to a kind’s implementation, As it is also intended to be generic enough to function with any API Server.

PropertyTypeRequiredDefaultDescription
creationTimestampstringYes
finalizersstring[]Yes
labelsmap[string]stringYes
resourceVersionstringYes
uidstringYes
deletionTimestampstringNo

ExtraFields

extraFields is reserved for any fields that are pulled from the API server metadata but do not have concrete fields in the CUE metadata

PropertyTypeRequiredDefaultDescription

Spec

PropertyTypeRequiredDefaultDescription
roleRoleRefYes
rulesAccessRule[]YesThe set of rules to apply. Note that * is required to modify
access policy rules, and that “none” will reject all actions
scopeResourceRefYes

AccessRule

PropertyTypeRequiredDefaultDescription
kindstringYesThe kind this rule applies to (dashboards, alert, etc)
verbstringYesREAD, WRITE, CREATE, DELETE, …
should move to k8s style verbs like: “get”, “list”, “watch”, “create”, “update”, “patch”, “delete”
targetstringNoSpecific sub-elements like “alert.rules” or “dashboard.permissions”????

ResourceRef

PropertyTypeRequiredDefaultDescription
kindstringYes
namestringYes

RoleRef

PropertyTypeRequiredDefaultDescription
kindstringYesPolicies can apply to roles, teams, or users
Applying policies to individual users is supported, but discouraged
Possible values are: Role, BuiltinRole, Team, User.
namestringYes
xnamestringYes

Status

PropertyTypeRequiredDefaultDescription
additionalFieldsobjectNoadditionalFields is reserved for future use
operatorStatesmap[string]status.#OperatorStateNooperatorStates is a map of operator ID to operator state evaluations.
Any operator which consumes this kind SHOULD add its state evaluation information to this field.

AdditionalFields

additionalFields is reserved for future use

PropertyTypeRequiredDefaultDescription

Status.#OperatorState

PropertyTypeRequiredDefaultDescription
lastEvaluationstringYeslastEvaluation is the ResourceVersion last evaluated
statestringYesstate describes the state of the lastEvaluation.
It is limited to three possible states for machine evaluation.
Possible values are: success, in_progress, failed.
descriptiveStatestringNodescriptiveState is an optional more descriptive state field which has no requirements on format
detailsobjectNodetails contains any extra information that is operator-specific

Details

details contains any extra information that is operator-specific

PropertyTypeRequiredDefaultDescription