You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -52,6 +53,64 @@ type OperatorReconcileVars struct {
52
53
Pluginsstring
53
54
}
54
55
56
+
// GrafanaServiceAccountTokenSpec describes a token to create.
57
+
typeGrafanaServiceAccountTokenSpecstruct {
58
+
// Name is the name of the Kubernetes Secret (and token identifier in Grafana). The secret will contain the token value.
59
+
// +kubebuilder:validation:Required
60
+
Namestring`json:"name"`
61
+
62
+
// Expires is the optional expiration time for the token. After this time, the operator may rotate the token.
63
+
// +kubebuilder:validation:Optional
64
+
Expires*metav1.Time`json:"expires,omitempty"`
65
+
}
66
+
67
+
// GrafanaServiceAccountPermissionSpec defines a permission grant for a user or team.
68
+
// +kubebuilder:validation:XValidation:rule="(has(self.user) && self.user != '') || (has(self.team) && self.team != '')",message="one of user or team must be set"
69
+
// +kubebuilder:validation:XValidation:rule="!((has(self.user) && self.user != '') && (has(self.team) && self.team != ''))",message="user and team cannot both be set"
70
+
typeGrafanaServiceAccountPermissionSpecstruct {
71
+
// User login or email to grant permissions to (optional).
72
+
// +kubebuilder:validation:Optional
73
+
Userstring`json:"user,omitempty"`
74
+
75
+
// Team name to grant permissions to (optional).
76
+
// +kubebuilder:validation:Optional
77
+
Teamstring`json:"team,omitempty"`
78
+
79
+
// Permission level: Edit or Admin.
80
+
// +kubebuilder:validation:Required
81
+
// +kubebuilder:validation:Enum=Edit;Admin
82
+
Permissionstring`json:"permission"`
83
+
}
84
+
85
+
// GrafanaServiceAccountSpec defines the desired state of a GrafanaServiceAccount.
86
+
typeGrafanaServiceAccountSpecstruct {
87
+
// Name is the desired name of the service account in Grafana.
88
+
// +kubebuilder:validation:Required
89
+
Namestring`json:"name"`
90
+
91
+
// Role is the Grafana role for the service account (Viewer, Editor, Admin).
0 commit comments