Skip to content

Commit a2c2a41

Browse files
committed
chore(k8s/amour): grafana operator
1 parent 4442405 commit a2c2a41

13 files changed

+8151
-0
lines changed

k8s/amour/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ cue_export(
2929
"//k8s/amour/dcgm_exporter:cue_dcgm_exporter_library",
3030
"//k8s/amour/external_secrets:cue_external_secrets_library",
3131
"//k8s/amour/grafana:cue_grafana_library",
32+
"//k8s/amour/grafana_operator:cue_grafana_operator_library",
3233
"//k8s/amour/home_assistant:cue_home_assistant_library",
3334
"//k8s/amour/karma:cue_karma_library",
3435
"//k8s/amour/kube_state_metrics:cue_kube_state_metrics_library",
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
load("@com_github_tnarg_rules_cue//cue:cue.bzl", "cue_library")
2+
3+
cue_library(
4+
name = "cue_grafana_operator_library",
5+
srcs = [
6+
"cluster_role_binding_list.cue",
7+
"cluster_role_list.cue",
8+
"custom_resource_definition_list.cue",
9+
"deployment_list.cue",
10+
"list.cue",
11+
"namespace_list.cue",
12+
"service_account_list.cue",
13+
"service_list.cue",
14+
"vm_service_scrape_list.cue",
15+
],
16+
importpath = "github.com/uhthomas/automata/k8s/amour/grafana_operator",
17+
visibility = ["//visibility:public"],
18+
deps = [
19+
"//cue.mod/gen/github.com/VictoriaMetrics/operator/api/victoriametrics/v1beta1:cue_v1beta1_library",
20+
"//cue.mod/gen/k8s.io/api/apps/v1:cue_v1_library",
21+
"//cue.mod/gen/k8s.io/api/core/v1:cue_v1_library",
22+
"//cue.mod/gen/k8s.io/api/rbac/v1:cue_v1_library",
23+
"//cue.mod/gen/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1:cue_v1_library",
24+
],
25+
)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Grafana Operator
2+
3+
[https://github.com/grafana/grafana-operator](https://github.com/grafana/grafana-operator)
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package grafana_operator
2+
3+
import rbacv1 "k8s.io/api/rbac/v1"
4+
5+
#ClusterRoleBindingList: rbacv1.#ClusterRoleBindingList & {
6+
apiVersion: "rbac.authorization.k8s.io/v1"
7+
kind: "ClusterRoleBindingList"
8+
items: [...{
9+
apiVersion: "rbac.authorization.k8s.io/v1"
10+
kind: "ClusterRoleBinding"
11+
}]
12+
}
13+
14+
#ClusterRoleBindingList: items: [{
15+
roleRef: {
16+
apiGroup: rbacv1.#GroupName
17+
kind: "ClusterRole"
18+
name: #Name
19+
}
20+
subjects: [{
21+
name: #Name
22+
namespace: #Namespace
23+
kind: rbacv1.#ServiceAccountKind
24+
}]
25+
}]
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
package grafana_operator
2+
3+
import (
4+
rbacv1 "k8s.io/api/rbac/v1"
5+
"k8s.io/api/core/v1"
6+
)
7+
8+
#ClusterRoleList: rbacv1.#ClusterRoleList & {
9+
apiVersion: "rbac.authorization.k8s.io/v1"
10+
kind: "ClusterRoleList"
11+
items: [...{
12+
apiVersion: "rbac.authorization.k8s.io/v1"
13+
kind: "ClusterRole"
14+
}]
15+
}
16+
17+
#ClusterRoleList: items: [{
18+
rules: [{
19+
apiGroups: [v1.#GroupName]
20+
resources: ["configmaps"]
21+
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
22+
}, {
23+
apiGroups: ["coordination.k8s.io"]
24+
resources: ["leases"]
25+
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
26+
}, {
27+
apiGroups: [v1.#GroupName]
28+
resources: ["events"]
29+
verbs: ["create", "patch"]
30+
}, {
31+
apiGroups: [v1.#GroupName]
32+
resources: ["configmaps", "persistentvolumeclaims", "secrets", "serviceaccounts", "services"]
33+
verbs: ["create", "delete", "get", "list", "patch", "update", "watch"]
34+
}, {
35+
apiGroups: [v1.#GroupName]
36+
resources: ["events"]
37+
verbs: ["create", "get", "list", "patch", "watch"]
38+
}, {
39+
apiGroups: ["apps"]
40+
resources: ["deployments"]
41+
verbs: ["create", "delete", "get", "list", "patch", "update", "watch"]
42+
}, {
43+
apiGroups: ["grafana.integreatly.org"]
44+
resources: ["grafanaalertrulegroups"]
45+
verbs: ["create", "delete", "get", "list", "patch", "update", "watch"]
46+
}, {
47+
apiGroups: ["grafana.integreatly.org"]
48+
resources: ["grafanaalertrulegroups/finalizers"]
49+
verbs: ["update"]
50+
}, {
51+
apiGroups: ["grafana.integreatly.org"]
52+
resources: ["grafanaalertrulegroups/status"]
53+
verbs: ["get", "patch", "update"]
54+
}, {
55+
apiGroups: ["grafana.integreatly.org"]
56+
resources: ["grafanadashboards"]
57+
verbs: ["create", "delete", "get", "list", "patch", "update", "watch"]
58+
}, {
59+
apiGroups: ["grafana.integreatly.org"]
60+
resources: ["grafanadashboards/finalizers"]
61+
verbs: ["update"]
62+
}, {
63+
apiGroups: ["grafana.integreatly.org"]
64+
resources: ["grafanadashboards/status"]
65+
verbs: ["get", "patch", "update"]
66+
}, {
67+
apiGroups: ["grafana.integreatly.org"]
68+
resources: ["grafanadatasources"]
69+
verbs: ["create", "delete", "get", "list", "patch", "update", "watch"]
70+
}, {
71+
apiGroups: ["grafana.integreatly.org"]
72+
resources: ["grafanadatasources/finalizers"]
73+
verbs: ["update"]
74+
}, {
75+
apiGroups: ["grafana.integreatly.org"]
76+
resources: ["grafanadatasources/status"]
77+
verbs: ["get", "patch", "update"]
78+
}, {
79+
apiGroups: ["grafana.integreatly.org"]
80+
resources: ["grafanafolders"]
81+
verbs: ["create", "delete", "get", "list", "patch", "update", "watch"]
82+
}, {
83+
apiGroups: ["grafana.integreatly.org"]
84+
resources: ["grafanafolders/finalizers"]
85+
verbs: ["update"]
86+
}, {
87+
apiGroups: ["grafana.integreatly.org"]
88+
resources: ["grafanafolders/status"]
89+
verbs: ["get", "patch", "update"]
90+
}, {
91+
apiGroups: ["grafana.integreatly.org"]
92+
resources: ["grafanas"]
93+
verbs: ["create", "delete", "get", "list", "patch", "update", "watch"]
94+
}, {
95+
apiGroups: ["grafana.integreatly.org"]
96+
resources: ["grafanas/finalizers"]
97+
verbs: ["update"]
98+
}, {
99+
apiGroups: ["grafana.integreatly.org"]
100+
resources: ["grafanas/status"]
101+
verbs: ["get", "patch", "update"]
102+
}, {
103+
apiGroups: ["networking.k8s.io"]
104+
resources: ["ingresses"]
105+
verbs: ["create", "delete", "get", "list", "patch", "update", "watch"]
106+
}, {
107+
apiGroups: ["route.openshift.io"]
108+
resources: ["routes", "routes/custom-host"]
109+
verbs: ["create", "delete", "get", "list", "update", "watch"]
110+
}]
111+
}]

0 commit comments

Comments
 (0)