Compare commits
566 Commits
ash/react-
...
sql-kvstor
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f634f37b5f | ||
|
|
f5ef25233d | ||
|
|
e156dfd92a | ||
|
|
fa3d906d41 | ||
|
|
a8c86de2d6 | ||
|
|
761a8f6c31 | ||
|
|
3c0fc606ae | ||
|
|
10a699fb6c | ||
|
|
434d370394 | ||
|
|
77dac4210f | ||
|
|
6f8b4032c2 | ||
|
|
3b328b2609 | ||
|
|
6a047e8f95 | ||
|
|
fe95e0a6db | ||
|
|
d10dc81a79 | ||
|
|
950376c0d9 | ||
|
|
151d9ec1cc | ||
|
|
aa26cc4254 | ||
|
|
d0fe342cfe | ||
|
|
1ef7c68f53 | ||
|
|
9dd8c85448 | ||
|
|
64c61c6916 | ||
|
|
f50d513252 | ||
|
|
7772c3ab2e | ||
|
|
8288ce6dd6 | ||
|
|
f5df0b05ef | ||
|
|
1f1c75f817 | ||
|
|
af7f110664 | ||
|
|
de45393eb5 | ||
|
|
4581ed89a0 | ||
|
|
050f6572a8 | ||
|
|
ffcd06c629 | ||
|
|
58e0d03f46 | ||
|
|
f116208b88 | ||
|
|
ef61b67e66 | ||
|
|
b70c6a726f | ||
|
|
e6eb40a679 | ||
|
|
fe0486915e | ||
|
|
66766fe729 | ||
|
|
a2c5d6e686 | ||
|
|
3e9662d910 | ||
|
|
9818822e87 | ||
|
|
f7e07d814a | ||
|
|
77aac05b09 | ||
|
|
a59c4e2fcc | ||
|
|
5e2a579802 | ||
|
|
5a111bc087 | ||
|
|
c2b15ca786 | ||
|
|
6d7ce16883 | ||
|
|
bfa7ce9d78 | ||
|
|
4355b3ed0d | ||
|
|
92ef1c4942 | ||
|
|
bcc5d29bf7 | ||
|
|
9376d569cc | ||
|
|
c2489d2768 | ||
|
|
67444cee78 | ||
|
|
bfee2ecc65 | ||
|
|
1535cfc17b | ||
|
|
9ad6507eef | ||
|
|
d8a5d8d882 | ||
|
|
3fffb2d998 | ||
|
|
1162fa5104 | ||
|
|
8c3c3a851f | ||
|
|
1cc21a0705 | ||
|
|
5b34d92dca | ||
|
|
668ef398d6 | ||
|
|
d92cb9f7a6 | ||
|
|
326d374266 | ||
|
|
5717da4b22 | ||
|
|
0ab58642c4 | ||
|
|
09a7a0c94f | ||
|
|
23c192f330 | ||
|
|
6b26391cf2 | ||
|
|
cd40f7e36c | ||
|
|
bfca0d578c | ||
|
|
060af9cede | ||
|
|
4ee2112ea4 | ||
|
|
9ca6ad3b49 | ||
|
|
3f48a6358f | ||
|
|
c1485ecf5f | ||
|
|
1491607e8e | ||
|
|
7c709f0b89 | ||
|
|
42bca68966 | ||
|
|
df44209e53 | ||
|
|
ed17fb22dc | ||
|
|
1bb9de6f75 | ||
|
|
6603abc873 | ||
|
|
f041563df3 | ||
|
|
ae8a8cf16e | ||
|
|
906d32b437 | ||
|
|
44a92d252b | ||
|
|
7fe5772888 | ||
|
|
0d67fac87f | ||
|
|
3e4933ec60 | ||
|
|
a2150b0b79 | ||
|
|
f5f0c1e6f6 | ||
|
|
b550750a9b | ||
|
|
e92a976de2 | ||
|
|
108693eb31 | ||
|
|
97a6ab7b1c | ||
|
|
3bd49f6546 | ||
|
|
73657be5e7 | ||
|
|
3082a762d3 | ||
|
|
b4b410f5be | ||
|
|
6eac95f860 | ||
|
|
5091c946b5 | ||
|
|
6da33546a5 | ||
|
|
ac5e54a225 | ||
|
|
0a9f93436a | ||
|
|
eaa1b62c01 | ||
|
|
7ee61a9277 | ||
|
|
00e4d98ca3 | ||
|
|
55a29bd2d1 | ||
|
|
a5b8038f35 | ||
|
|
3563388d4d | ||
|
|
6c8c4c32b5 | ||
|
|
e60ad6f195 | ||
|
|
3e31f7b713 | ||
|
|
cbd794d0b8 | ||
|
|
a67fad4734 | ||
|
|
a194219365 | ||
|
|
ec9f39d54a | ||
|
|
c9e381b96f | ||
|
|
97c8121785 | ||
|
|
59ff606106 | ||
|
|
4cb290e4cc | ||
|
|
1f14f1447f | ||
|
|
67f811b6d8 | ||
|
|
4bca10195e | ||
|
|
5162988fa1 | ||
|
|
6eabb9b2e4 | ||
|
|
d35524915c | ||
|
|
5ca48bc73d | ||
|
|
06954b7b0a | ||
|
|
1f558b1e06 | ||
|
|
a8dda428ce | ||
|
|
d1d8aa7c14 | ||
|
|
0392bf5724 | ||
|
|
16ddd536ab | ||
|
|
4b1fbcbd04 | ||
|
|
d83c35fd71 | ||
|
|
6c512dabdc | ||
|
|
3e2dccb544 | ||
|
|
735b776edc | ||
|
|
cdc6a6114c | ||
|
|
6d64c373ce | ||
|
|
b9e39cdfcc | ||
|
|
4e050267c7 | ||
|
|
ed19a92a2a | ||
|
|
d54a2b33fe | ||
|
|
4eca53890f | ||
|
|
e463781077 | ||
|
|
09942c08db | ||
|
|
f0d18beaf3 | ||
|
|
48438f49e7 | ||
|
|
6401901e5d | ||
|
|
76ab09a6a2 | ||
|
|
04902b0419 | ||
|
|
a9b52589ff | ||
|
|
d8363bdfcf | ||
|
|
559dab8b1b | ||
|
|
c4cf454cf0 | ||
|
|
96f34f8f56 | ||
|
|
4ae1774e1f | ||
|
|
ee6c8a6e20 | ||
|
|
562e7ba043 | ||
|
|
194f7cb4f0 | ||
|
|
f34f7579a2 | ||
|
|
62eef87208 | ||
|
|
34e85113d2 | ||
|
|
2d4e432239 | ||
|
|
fcc243886c | ||
|
|
43de885aad | ||
|
|
b6bd31a4aa | ||
|
|
dd0a2d4cff | ||
|
|
142340e0ff | ||
|
|
c49caead25 | ||
|
|
ac9259d6a4 | ||
|
|
70e30df6ce | ||
|
|
fb20d7311e | ||
|
|
243f1fc64b | ||
|
|
f094a9d5e5 | ||
|
|
2dc48c0b98 | ||
|
|
704c6a47e3 | ||
|
|
1a2beae38a | ||
|
|
9a542489a7 | ||
|
|
746efb4c56 | ||
|
|
32db7e176d | ||
|
|
8ce9098765 | ||
|
|
a7ace2dcdd | ||
|
|
51c18b57a2 | ||
|
|
cd91f858e6 | ||
|
|
834ff1be3c | ||
|
|
478ae025a3 | ||
|
|
5806196797 | ||
|
|
24e4e0946d | ||
|
|
aa75cc5bbe | ||
|
|
cb43dea319 | ||
|
|
f3843fc67a | ||
|
|
0e9fe9dc40 | ||
|
|
90ddd922ad | ||
|
|
1e1adafeec | ||
|
|
ecc9e9257e | ||
|
|
4fee8b34ad | ||
|
|
02464c19b8 | ||
|
|
62129bb91f | ||
|
|
3d8da61569 | ||
|
|
d7d296df8e | ||
|
|
305ed25896 | ||
|
|
8b6cc211e9 | ||
|
|
1ca95cda4a | ||
|
|
e5ed003fb2 | ||
|
|
176b0f8b48 | ||
|
|
33390a1483 | ||
|
|
e90759e5af | ||
|
|
8cb5f5646a | ||
|
|
c784de6ef5 | ||
|
|
589435b7c2 | ||
|
|
b4d2d1eaf5 | ||
|
|
36e28963d3 | ||
|
|
942b847952 | ||
|
|
488423abfc | ||
|
|
f75c853b90 | ||
|
|
4bbbd19049 | ||
|
|
f4b23253b1 | ||
|
|
06e1c83276 | ||
|
|
54041155bd | ||
|
|
b9b1028b91 | ||
|
|
f468597ad8 | ||
|
|
69060f5437 | ||
|
|
2ac4d0a13e | ||
|
|
e953e76006 | ||
|
|
c9e4c26c11 | ||
|
|
95ea758475 | ||
|
|
0931423259 | ||
|
|
75afc64dd0 | ||
|
|
67ca3c231a | ||
|
|
bcc2057456 | ||
|
|
720dfb65be | ||
|
|
7df3582237 | ||
|
|
2e0cf9bb61 | ||
|
|
0ed742cad7 | ||
|
|
6746207c36 | ||
|
|
4430699f2d | ||
|
|
acb0320796 | ||
|
|
95ffd1a55a | ||
|
|
ca5d898120 | ||
|
|
e3d73ddb81 | ||
|
|
e69f3c55f7 | ||
|
|
fbf1cdd0ce | ||
|
|
859865351d | ||
|
|
7b3145a3c1 | ||
|
|
fd14d4a5ed | ||
|
|
efd6b250d9 | ||
|
|
6bf5e3303e | ||
|
|
71d511abd8 | ||
|
|
1b278cc87e | ||
|
|
51c31e00a4 | ||
|
|
ff53276870 | ||
|
|
b739e4e802 | ||
|
|
7281bb7069 | ||
|
|
35ac04bad3 | ||
|
|
2411e78cd1 | ||
|
|
7236ba5fce | ||
|
|
612a0d1c7f | ||
|
|
06373ae47b | ||
|
|
daa28773d6 | ||
|
|
1830e2ce9d | ||
|
|
9a8d17a209 | ||
|
|
8149f586b3 | ||
|
|
c7dd159db1 | ||
|
|
a17d5a75fe | ||
|
|
2ccb7f618d | ||
|
|
b97fb638ad | ||
|
|
d9d227ec4d | ||
|
|
93f1c24b82 | ||
|
|
7c2f38641a | ||
|
|
6376484b13 | ||
|
|
d1334a6dff | ||
|
|
505e025d18 | ||
|
|
571e5c2e3c | ||
|
|
4ceb7eec52 | ||
|
|
2e507d5042 | ||
|
|
1bd5b29963 | ||
|
|
98ec655f33 | ||
|
|
1d38cf7f0d | ||
|
|
891ed6c4b7 | ||
|
|
e067b1de98 | ||
|
|
4cecab3185 | ||
|
|
867e8bb98f | ||
|
|
5abc0d0d91 | ||
|
|
3972046695 | ||
|
|
ffa5e41bec | ||
|
|
84bd99f1c1 | ||
|
|
de512fb02e | ||
|
|
3fca7cf952 | ||
|
|
8f8ed2bbec | ||
|
|
69e4b4667b | ||
|
|
0c016e210a | ||
|
|
769787ea40 | ||
|
|
b4312a220f | ||
|
|
c75a451b13 | ||
|
|
df816d00e4 | ||
|
|
782c819727 | ||
|
|
6fc82629d4 | ||
|
|
fc34b18122 | ||
|
|
ac162e203b | ||
|
|
ddeb970b4d | ||
|
|
a06905e2d3 | ||
|
|
07bf7b2ae1 | ||
|
|
0649635639 | ||
|
|
126e6dbcd8 | ||
|
|
f56fec2c10 | ||
|
|
ca5cf5fe7c | ||
|
|
06fb3fef43 | ||
|
|
414524e799 | ||
|
|
acf0da9b80 | ||
|
|
6f7c525213 | ||
|
|
684156fdf1 | ||
|
|
4cda8669a5 | ||
|
|
14c45b6db2 | ||
|
|
eeddc8cd18 | ||
|
|
99e4583cd1 | ||
|
|
cbd6b53182 | ||
|
|
259c7807cb | ||
|
|
d6fa822e89 | ||
|
|
a89377337b | ||
|
|
3b99370aac | ||
|
|
3c0409fe05 | ||
|
|
6d9e28a59f | ||
|
|
6c728f8dec | ||
|
|
445e88cb93 | ||
|
|
c98259f74a | ||
|
|
83e3b1fac7 | ||
|
|
16a0f6c86e | ||
|
|
10833172b9 | ||
|
|
d0ea82633f | ||
|
|
64da716a2e | ||
|
|
2d250ab364 | ||
|
|
b0ecc36fd6 | ||
|
|
d64cc987b8 | ||
|
|
ac7c1eed42 | ||
|
|
cfc8989d24 | ||
|
|
33b4d43248 | ||
|
|
92a6faeff2 | ||
|
|
a339a2dad3 | ||
|
|
ea90bdff9c | ||
|
|
f6e4dd9b0c | ||
|
|
460ed5b827 | ||
|
|
8010784322 | ||
|
|
f9c0924f0c | ||
|
|
4813256e0a | ||
|
|
28e8d7d56e | ||
|
|
3a6459cda3 | ||
|
|
03d738004d | ||
|
|
e3d1fc9c2c | ||
|
|
52d758dc93 | ||
|
|
452fc04d1d | ||
|
|
3e6a601fba | ||
|
|
e09deb6889 | ||
|
|
1070f94fbb | ||
|
|
137803a32a | ||
|
|
7648eac654 | ||
|
|
0a8d15dcac | ||
|
|
b5cf192331 | ||
|
|
f678f5a2cb | ||
|
|
ca5e7202b9 | ||
|
|
ce6523c5f6 | ||
|
|
83bed02a41 | ||
|
|
1759732d91 | ||
|
|
53aed34652 | ||
|
|
cf242def3a | ||
|
|
f61578a50f | ||
|
|
3965761168 | ||
|
|
f5ee26540b | ||
|
|
21b120cbae | ||
|
|
50932cbdab | ||
|
|
1f4720a0fd | ||
|
|
9cbdaef4be | ||
|
|
782b521c0f | ||
|
|
8d5e5e2ead | ||
|
|
1613d2815c | ||
|
|
7fbe2e5962 | ||
|
|
72e244c1e7 | ||
|
|
44beedd09a | ||
|
|
d6bcca2f7e | ||
|
|
20ec8ee61c | ||
|
|
1342858f36 | ||
|
|
63c5d8cb8f | ||
|
|
92375279f7 | ||
|
|
c3d7dbc258 | ||
|
|
c487952279 | ||
|
|
05dc9b2be1 | ||
|
|
d303746ff9 | ||
|
|
f185377c68 | ||
|
|
80d5cfa184 | ||
|
|
5f2074e84c | ||
|
|
bbfb8268d1 | ||
|
|
cb86be2e32 | ||
|
|
344fc5606f | ||
|
|
3cabc12f4c | ||
|
|
ee62a8d431 | ||
|
|
d399f116b8 | ||
|
|
8b31ec5040 | ||
|
|
58098f9339 | ||
|
|
f9ef1b6bd0 | ||
|
|
5dce711680 | ||
|
|
31a2d2aff4 | ||
|
|
209aa13ff7 | ||
|
|
84edc45dee | ||
|
|
0b56628622 | ||
|
|
4c8c32a1d4 | ||
|
|
c0c31afdde | ||
|
|
a4df6c8bb9 | ||
|
|
f2404361bf | ||
|
|
30bd4e7dba | ||
|
|
de88abafdd | ||
|
|
6a3e95913e | ||
|
|
0124aab805 | ||
|
|
af8d166b90 | ||
|
|
ec6e516e28 | ||
|
|
269c145051 | ||
|
|
3bfbbb1961 | ||
|
|
7eb8a9af99 | ||
|
|
51b39d8c6e | ||
|
|
284648df9e | ||
|
|
04ab552950 | ||
|
|
87794bec12 | ||
|
|
19826b5b26 | ||
|
|
2472555af0 | ||
|
|
7dbacddb18 | ||
|
|
c1808a00c2 | ||
|
|
edc7302c2f | ||
|
|
f533a5a6e5 | ||
|
|
ec0c14ac1a | ||
|
|
8bff09b88b | ||
|
|
86bf99aaaa | ||
|
|
1d0ab617e8 | ||
|
|
6093afddd4 | ||
|
|
c0b8fc6e6c | ||
|
|
86cb5d8af7 | ||
|
|
e75610ed03 | ||
|
|
c0ae0f437f | ||
|
|
2d5713e330 | ||
|
|
3176821ddc | ||
|
|
c7d77c6c64 | ||
|
|
5a031b370f | ||
|
|
25dd7e927f | ||
|
|
2c1aa65f2d | ||
|
|
1492db8ead | ||
|
|
9533cc4dbb | ||
|
|
d72e048bfe | ||
|
|
329d6a11fa | ||
|
|
7127b2538c | ||
|
|
237ab6c1b4 | ||
|
|
8263803e81 | ||
|
|
e5cf0e2086 | ||
|
|
6a3dfacc95 | ||
|
|
147ff4279b | ||
|
|
0973a44e6a | ||
|
|
75fb832826 | ||
|
|
f3e7576f0c | ||
|
|
8863ed9d6f | ||
|
|
437dcc875c | ||
|
|
3131a69f04 | ||
|
|
1cb66d86b0 | ||
|
|
79a5b024e1 | ||
|
|
238244fe5c | ||
|
|
2a5ce2f031 | ||
|
|
e1ddbda1bb | ||
|
|
5670f1c34c | ||
|
|
7df95261f3 | ||
|
|
68bc0f8076 | ||
|
|
b39708e439 | ||
|
|
74a9a288e2 | ||
|
|
7a7fd45bdd | ||
|
|
19d88de3cf | ||
|
|
fe9c21ebf8 | ||
|
|
a0180f8031 | ||
|
|
92fb6872f0 | ||
|
|
d4d8b2562e | ||
|
|
bee486be23 | ||
|
|
4bb91a7846 | ||
|
|
b77a99214a | ||
|
|
3dd4493d50 | ||
|
|
ce246936c4 | ||
|
|
555deb5d28 | ||
|
|
d216d75fbb | ||
|
|
edef69fdc8 | ||
|
|
bf65c43783 | ||
|
|
d25f5199c7 | ||
|
|
9c8a13c8c8 | ||
|
|
e91144950b | ||
|
|
5673d0b532 | ||
|
|
6783c7f998 | ||
|
|
f9fb2cfd50 | ||
|
|
7b2ea9a735 | ||
|
|
0e9a3881e7 | ||
|
|
bc9540fadb | ||
|
|
b53e3ac860 | ||
|
|
5a5aa18570 | ||
|
|
7cd3e5dc54 | ||
|
|
3c57a1880c | ||
|
|
4f2abe185c | ||
|
|
f76a4885ec | ||
|
|
5df4a3b9a3 | ||
|
|
6a15f40a85 | ||
|
|
cc4a6cff64 | ||
|
|
b9b0ff1219 | ||
|
|
815ced0f70 | ||
|
|
1bf0861738 | ||
|
|
5656f62cf4 | ||
|
|
eabb348152 | ||
|
|
f019d58a99 | ||
|
|
d2dbb816b2 | ||
|
|
e23ba8aa6c | ||
|
|
59bfb44a50 | ||
|
|
9b7c68c994 | ||
|
|
a7349af934 | ||
|
|
adcc634db6 | ||
|
|
e818234a4e | ||
|
|
81683d554d | ||
|
|
4cea71ee73 | ||
|
|
3f02f50cf9 | ||
|
|
f7eac7f7ba | ||
|
|
2362f9bd6b | ||
|
|
5ffff1e39d | ||
|
|
bda35611f1 | ||
|
|
681f27e6b3 | ||
|
|
2c6c564c18 | ||
|
|
c1e308f61e | ||
|
|
2f22073ad8 | ||
|
|
546d3ec313 | ||
|
|
466f1b8271 | ||
|
|
83ec5e6789 | ||
|
|
5ee636d47d | ||
|
|
be2944ea16 | ||
|
|
027eeb99e1 | ||
|
|
2a3b3c0003 | ||
|
|
dc77da11cf | ||
|
|
8b12bbcc55 | ||
|
|
e48eaa567e | ||
|
|
5b717af829 | ||
|
|
e21c0d4724 | ||
|
|
f03125279a | ||
|
|
bb6d7d02c7 | ||
|
|
71d10a3fa3 | ||
|
|
df4922ea78 | ||
|
|
e7a49fc472 | ||
|
|
4bdee91501 | ||
|
|
5f9ed73f82 | ||
|
|
0fe06800d5 | ||
|
|
6f82e44283 | ||
|
|
20a11e0bc0 | ||
|
|
52cd4d434f | ||
|
|
f7748676b3 | ||
|
|
df305c111e | ||
|
|
64f6bd5348 | ||
|
|
89ca1dd0e4 | ||
|
|
7ecb057414 | ||
|
|
34cf970b54 | ||
|
|
ddc5ae6f4d | ||
|
|
62c5df36d6 | ||
|
|
c74af4f3d4 | ||
|
|
87f40c65e4 | ||
|
|
8b7f119cad |
10
.gitattributes
vendored
10
.gitattributes
vendored
@@ -1 +1,11 @@
|
||||
* text=auto eol=lf
|
||||
*.gen.ts linguist-generated
|
||||
*_gen.ts linguist-generated
|
||||
*_gen.go linguist-generated
|
||||
*_gen.csv linguist-generated
|
||||
*_gen.json linguist-generated
|
||||
**/openapi_snapshots/*.json linguist-generated
|
||||
apps/**/pkg/apis/*_manifest.go linguist-generated
|
||||
public/openapi3.json linguist-generated
|
||||
public/api-merged.json linguist-generated
|
||||
public/api-enterprise-spec.json linguist-generated
|
||||
|
||||
41
.github/CODEOWNERS
vendored
41
.github/CODEOWNERS
vendored
@@ -41,12 +41,14 @@
|
||||
/docs/sources/ @irenerl24
|
||||
|
||||
/docs/sources/alerting/ @JohnnyK-Grafana
|
||||
/docs/sources/as-code/ @urbiz-grafana
|
||||
/docs/sources/developer-resources/ @urbiz-grafana
|
||||
/docs/sources/datasources/ @lwandz13
|
||||
/docs/sources/upgrade-guide/ @jtvdez
|
||||
/docs/sources/whatsnew/ @jtvdez
|
||||
|
||||
|
||||
/docs/sources/developers/plugins/ @grafana/plugins-platform-frontend @grafana/plugins-platform-backend
|
||||
/docs/sources/developer-resources/plugins/ @grafana/plugins-platform-frontend @grafana/plugins-platform-backend
|
||||
/docs/sources/visualizations/dashboards/ @imatwawana
|
||||
/docs/sources/visualizations/panels-visualizations/ @imatwawana
|
||||
|
||||
@@ -96,7 +98,9 @@
|
||||
/apps/iam/ @grafana/access-squad
|
||||
/apps/sdk.mk @grafana/grafana-app-platform-squad
|
||||
/apps/correlations @grafana/datapro
|
||||
/apps/example/ @grafana/grafana-app-platform-squad
|
||||
/apps/logsdrilldown/ @grafana/observability-logs
|
||||
/apps/annotation/ @grafana/grafana-backend-services-squad
|
||||
/pkg/api/ @grafana/grafana-backend-group
|
||||
/pkg/apis/ @grafana/grafana-app-platform-squad
|
||||
/pkg/apis/query @grafana/grafana-datasources-core-services
|
||||
@@ -150,7 +154,7 @@
|
||||
/pkg/promlib @grafana/oss-big-tent
|
||||
/pkg/storage/ @grafana/grafana-search-and-storage
|
||||
/pkg/storage/secret/ @grafana/grafana-operator-experience-squad
|
||||
/pkg/services/annotations/ @grafana/grafana-search-and-storage
|
||||
/pkg/services/annotations/ @grafana/grafana-backend-services-squad
|
||||
/pkg/services/apikey/ @grafana/identity-squad
|
||||
/pkg/services/cleanup/ @grafana/grafana-backend-group
|
||||
/pkg/services/contexthandler/ @grafana/grafana-backend-group @grafana/grafana-app-platform-squad
|
||||
@@ -166,7 +170,7 @@
|
||||
/pkg/services/kmsproviders/ @grafana/grafana-operator-experience-squad
|
||||
/pkg/services/licensing/ @grafana/grafana-operator-experience-squad
|
||||
/pkg/services/dsquerierclient/ @grafana/grafana-datasources-core-services
|
||||
/pkg/services/navtree/ @grafana/grafana-backend-group
|
||||
/pkg/services/navtree/ @grafana/grafana-backend-group @grafana/grafana-search-navigate-organise
|
||||
/pkg/services/notifications/ @grafana/grafana-backend-group
|
||||
/pkg/services/org/ @grafana/grafana-backend-group
|
||||
/pkg/services/playlist/ @grafana/grafana-app-platform-squad
|
||||
@@ -180,7 +184,7 @@
|
||||
/pkg/services/search/ @grafana/grafana-search-and-storage
|
||||
/pkg/services/searchusers/ @grafana/grafana-search-and-storage
|
||||
/pkg/services/secrets/ @grafana/grafana-operator-experience-squad
|
||||
/pkg/services/shorturls/ @grafana/grafana-backend-group
|
||||
/pkg/services/shorturls/ @grafana/sharing-squad
|
||||
/pkg/services/sqlstore/ @grafana/grafana-search-and-storage
|
||||
/pkg/services/ssosettings/ @grafana/identity-squad
|
||||
/pkg/services/star/ @grafana/grafana-search-and-storage
|
||||
@@ -198,6 +202,7 @@
|
||||
/pkg/tests/apis/features @grafana/grafana-backend-services-squad
|
||||
/pkg/tests/apis/folder @grafana/grafana-search-and-storage
|
||||
/pkg/tests/apis/iam @grafana/identity-access-team
|
||||
/pkg/tests/apis/shorturl @grafana/sharing-squad
|
||||
/pkg/tests/api/correlations/ @grafana/datapro
|
||||
/pkg/tsdb/grafanads/ @grafana/grafana-backend-group
|
||||
/pkg/tsdb/opentsdb/ @grafana/partner-datasources
|
||||
@@ -224,6 +229,7 @@
|
||||
/devenv/datasources.yaml @grafana/grafana-backend-group
|
||||
/devenv/datasources_docker.yaml @grafana/grafana-backend-group
|
||||
/devenv/dev-dashboards-without-uid/ @grafana/dashboards-squad
|
||||
/devenv/scopes/ @grafana/grafana-operator-experience-squad
|
||||
|
||||
/devenv/dev-dashboards/annotations @grafana/dataviz-squad
|
||||
/devenv/dev-dashboards/migrations @grafana/dataviz-squad
|
||||
@@ -240,6 +246,7 @@
|
||||
/devenv/dev-dashboards/panel-library @grafana/dataviz-squad
|
||||
/devenv/dev-dashboards/panel-piechart @grafana/dataviz-squad
|
||||
/devenv/dev-dashboards/panel-stat @grafana/dataviz-squad
|
||||
/devenv/dev-dashboards/panel-status-history @grafana/dataviz-squad
|
||||
/devenv/dev-dashboards/panel-table @grafana/dataviz-squad
|
||||
/devenv/dev-dashboards/panel-timeline @grafana/dataviz-squad
|
||||
/devenv/dev-dashboards/panel-timeseries @grafana/dataviz-squad
|
||||
@@ -249,7 +256,6 @@
|
||||
/devenv/dev-dashboards/all-panels.json @grafana/dataviz-squad
|
||||
/devenv/dev-dashboards/dashboards.go @grafana/dataviz-squad
|
||||
/devenv/dev-dashboards/home.json @grafana/dataviz-squad
|
||||
|
||||
/devenv/dev-dashboards/datasource-elasticsearch/ @grafana/partner-datasources
|
||||
/devenv/dev-dashboards/datasource-opentsdb/ @grafana/partner-datasources
|
||||
/devenv/dev-dashboards/datasource-influxdb/ @grafana/partner-datasources
|
||||
@@ -413,8 +419,8 @@
|
||||
|
||||
/crowdin.yml @grafana/grafana-frontend-platform
|
||||
/public/locales/ @grafanabot
|
||||
/public/locales/i18next-parser.config.cjs @grafana/grafana-frontend-platform
|
||||
/public/locales/i18next-parser-enterprise.config.cjs @grafana/grafana-frontend-platform
|
||||
i18next.config.ts @grafana/grafana-frontend-platform
|
||||
/public/locales/enterprise/i18next.config.ts @grafana/grafana-frontend-platform
|
||||
/public/app/core/internationalization/ @grafana/grafana-frontend-platform
|
||||
/e2e/ @grafana/grafana-frontend-platform
|
||||
/e2e-playwright/cloud-plugins-suite/ @grafana/partner-datasources
|
||||
@@ -471,22 +477,12 @@
|
||||
/e2e-playwright/fixtures/long-trace-response.json @grafana/observability-traces-and-profiling
|
||||
/e2e-playwright/fixtures/tempo-response.json @grafana/oss-big-tent
|
||||
/e2e-playwright/fixtures/prometheus-response.json @grafana/datapro
|
||||
/e2e-playwright/panels-suite/canvas-scene.spec.ts @grafana/dataviz-squad
|
||||
/e2e-playwright/panels-suite/ @grafana/dataviz-squad
|
||||
/e2e-playwright/panels-suite/dashlist.spec.ts @grafana/grafana-search-navigate-organise
|
||||
/e2e-playwright/panels-suite/datagrid-data-change.spec.ts @grafana/dataviz-squad
|
||||
/e2e-playwright/panels-suite/datagrid-editing-features.spec.ts @grafana/dataviz-squad
|
||||
/e2e-playwright/panels-suite/frontend-sandbox-panel.spec.ts @grafana/plugins-platform-frontend
|
||||
/e2e-playwright/panels-suite/geomap-layer-types.spec.ts @grafana/dataviz-squad
|
||||
/e2e-playwright/panels-suite/geomap-map-controls.spec.ts @grafana/dataviz-squad
|
||||
/e2e-playwright/panels-suite/geomap-spatial-operations-transform.spec.ts @grafana/dataviz-squad
|
||||
/e2e-playwright/panels-suite/panelEdit_base.spec.ts @grafana/dashboards-squad
|
||||
/e2e-playwright/panels-suite/panelEdit_queries.spec.ts @grafana/dashboards-squad
|
||||
/e2e-playwright/panels-suite/panelEdit_transforms.spec.ts @grafana/datapro
|
||||
/e2e-playwright/panels-suite/table-footer.spec.ts @grafana/dataviz-squad
|
||||
/e2e-playwright/panels-suite/table-kitchenSink.spec.ts @grafana/dataviz-squad
|
||||
/e2e-playwright/panels-suite/table-markdown.spec.ts @grafana/dataviz-squad
|
||||
/e2e-playwright/panels-suite/table-sparkline.spec.ts @grafana/dataviz-squad
|
||||
/e2e-playwright/panels-suite/table-utils.ts @grafana/dataviz-squad
|
||||
/e2e-playwright/plugin-e2e/ @grafana/oss-big-tent @grafana/partner-datasources
|
||||
/e2e-playwright/plugin-e2e/plugin-e2e-api-tests/ @grafana/plugins-platform-frontend
|
||||
/e2e-playwright/smoke-tests-suite/ @grafana/grafana-frontend-platform
|
||||
@@ -503,6 +499,7 @@
|
||||
/e2e-playwright/various-suite/frontend-sandbox-app.spec.ts @grafana/plugins-platform-frontend
|
||||
/e2e-playwright/various-suite/frontend-sandbox-datasource.spec.ts @grafana/plugins-platform-frontend
|
||||
/e2e-playwright/various-suite/gauge.spec.ts @grafana/dataviz-squad
|
||||
/e2e-playwright/various-suite/grafana-datasource-random-walk.spec.ts @grafana/grafana-frontend-platform
|
||||
/e2e-playwright/various-suite/graph-auto-migrate.spec.ts @grafana/dataviz-squad
|
||||
/e2e-playwright/various-suite/inspect-drawer.spec.ts @grafana/dashboards-squad
|
||||
/e2e-playwright/various-suite/keybinds.spec.ts @grafana/grafana-frontend-platform
|
||||
@@ -554,6 +551,7 @@
|
||||
/packages/grafana-data/src/geo/ @grafana/dataviz-squad
|
||||
/packages/grafana-data/src/monaco/ @grafana/partner-datasources
|
||||
/packages/grafana-data/src/panel/ @grafana/dashboards-squad
|
||||
/packages/grafana-data/src/panel/suggestions/ @grafana/dataviz-squad
|
||||
/packages/grafana-data/src/query/ @grafana/grafana-datasources-core-services
|
||||
/packages/grafana-data/src/rbac/ @grafana/access-squad
|
||||
/packages/grafana-data/src/table/ @grafana/dataviz-squad
|
||||
@@ -562,6 +560,7 @@
|
||||
/packages/grafana-data/src/transformations/ @grafana/datapro
|
||||
/packages/grafana-data/src/types/ @grafana/grafana-frontend-platform
|
||||
/packages/grafana-data/src/types/scopes.ts @grafana/grafana-operator-experience-squad
|
||||
/packages/grafana-data/src/types/suggestions.ts @grafana/dataviz-squad
|
||||
/packages/grafana-data/src/utils/__snapshots__/ @grafanabot
|
||||
/packages/grafana-data/src/utils/anyToNumber.ts @grafana/grafana-frontend-platform
|
||||
/packages/grafana-data/src/utils/arrayUtils* @grafana/grafana-frontend-platform
|
||||
@@ -719,6 +718,7 @@
|
||||
/packages/grafana-ui/src/components/BarGauge/ @grafana/dataviz-squad
|
||||
/packages/grafana-ui/src/components/DataLinks/ @grafana/dataviz-squad
|
||||
/packages/grafana-ui/src/components/Gauge/ @grafana/dataviz-squad
|
||||
/packages/grafana-ui/src/components/RadialGauge/ @grafana/dataviz-squad
|
||||
/packages/grafana-ui/src/components/PluginSignatureBadge/ @grafana/plugins-platform-frontend
|
||||
/packages/grafana-ui/src/components/Sparkline/ @grafana/grafana-frontend-platform @grafana/app-o11y-visualizations
|
||||
/packages/grafana-ui/src/components/Table/ @grafana/dataviz-squad
|
||||
@@ -794,7 +794,7 @@ playwright.storybook.config.ts @grafana/grafana-frontend-platform
|
||||
/public/app/core/components/ColorScale/ @grafana/dataviz-squad
|
||||
/public/app/core/components/DynamicImports/ @grafana/grafana-search-navigate-organise
|
||||
/public/app/core/components/EmptyListCTA/ @grafana/grafana-frontend-platform
|
||||
/public/app/core/components/FolderFilter/ @grafana/sharing-squad
|
||||
/public/app/core/components/FolderFilter/ @grafana/grafana-search-navigate-organise
|
||||
/public/app/core/components/Footer/ @grafana/grafana-search-navigate-organise
|
||||
/public/app/core/components/ForgottenPassword/ @grafana/grafana-search-navigate-organise
|
||||
/public/app/core/components/Form/ @grafana/grafana-frontend-platform
|
||||
@@ -836,7 +836,6 @@ playwright.storybook.config.ts @grafana/grafana-frontend-platform
|
||||
/public/app/core/constants.ts @grafana/grafana-frontend-platform
|
||||
/public/app/core/context/ @grafana/grafana-frontend-platform
|
||||
/public/app/core/copy/appNotification.ts @grafana/grafana-search-navigate-organise
|
||||
/public/app/core/core.ts @grafana/grafana-frontend-platform
|
||||
/public/app/core/crash/ @grafana/observability-traces-and-profiling
|
||||
/public/app/core/history/ @grafana/observability-traces-and-profiling
|
||||
/public/app/core/hooks/useBusEvent.ts @grafana/grafana-frontend-platform
|
||||
@@ -945,6 +944,7 @@ playwright.storybook.config.ts @grafana/grafana-frontend-platform
|
||||
/public/app/features/notifications/ @grafana/grafana-search-navigate-organise
|
||||
/public/app/features/org/ @grafana/grafana-search-navigate-organise
|
||||
/public/app/features/panel/ @grafana/dashboards-squad
|
||||
/public/app/features/panel/suggestions/ @grafana/dataviz-squad
|
||||
/public/app/features/playlist/ @grafana/dashboards-squad
|
||||
/public/app/features/plugins/ @grafana/plugins-platform-frontend
|
||||
/public/app/features/profile/ @grafana/grafana-frontend-platform
|
||||
@@ -1171,6 +1171,7 @@ embed.go @grafana/grafana-as-code
|
||||
/pkg/registry/ @grafana/grafana-as-code
|
||||
/pkg/registry/apis/ @grafana/grafana-app-platform-squad
|
||||
/pkg/registry/apis/folders @grafana/grafana-search-and-storage
|
||||
/pkg/registry/apis/datasource @grafana/grafana-datasources-core-services
|
||||
/pkg/registry/apis/query @grafana/grafana-datasources-core-services
|
||||
/pkg/registry/apis/secret @grafana/grafana-operator-experience-squad
|
||||
/pkg/registry/apis/userstorage @grafana/grafana-app-platform-squad @grafana/plugins-platform-backend
|
||||
|
||||
8
.github/actions/change-detection/action.yml
vendored
8
.github/actions/change-detection/action.yml
vendored
@@ -31,6 +31,9 @@ outputs:
|
||||
dockerfile:
|
||||
description: Whether the dockerfile or self have changed in any way
|
||||
value: ${{ steps.changed-files.outputs.dockerfile_any_changed || 'true' }}
|
||||
devenv:
|
||||
description: Whether the devenv or self have changed in any way
|
||||
value: ${{ steps.changed-files.outputs.devenv_any_changed || 'true' }}
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
@@ -136,6 +139,9 @@ runs:
|
||||
- '.vale.ini'
|
||||
- '.github/actions/change-detection/**'
|
||||
- '${{ inputs.self }}'
|
||||
devenv:
|
||||
- 'devenv/**'
|
||||
- '${{ inputs.self }}'
|
||||
- name: Print all change groups
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -157,3 +163,5 @@ runs:
|
||||
echo " --> ${{ steps.changed-files.outputs.docs_all_changed_files }}"
|
||||
echo "Dockerfile: ${{ steps.changed-files.outputs.dockerfile_any_changed || 'true' }}"
|
||||
echo " --> ${{ steps.changed-files.outputs.dockerfile_all_changed_files }}"
|
||||
echo "devenv: ${{ steps.changed-files.outputs.devenv_any_changed || 'true' }}"
|
||||
echo " --> ${{ steps.changed-files.outputs.devenv_all_changed_files }}"
|
||||
|
||||
4
.github/renovate.json5
vendored
4
.github/renovate.json5
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
extends: ["config:recommended"],
|
||||
enabledManagers: ["npm"],
|
||||
enabledManagers: ["npm", "docker-compose"],
|
||||
ignorePresets: [
|
||||
"github>grafana/grafana-renovate-config//presets/labels",
|
||||
],
|
||||
@@ -26,7 +26,7 @@
|
||||
"@types/slate-react", // we don't want to continue using this on the long run, use Monaco editor instead of Slate
|
||||
"@types/slate", // we don't want to continue using this on the long run, use Monaco editor instead of Slate
|
||||
],
|
||||
includePaths: ["package.json", "packages/**", "public/app/plugins/**"],
|
||||
includePaths: ["package.json", "packages/**", "public/app/plugins/**", "devenv/frontend-service/docker-compose.yaml"],
|
||||
ignorePaths: ["emails/**", "**/mocks/**"],
|
||||
labels: ["area/frontend", "dependencies", "no-changelog"],
|
||||
postUpdateOptions: ["yarnDedupeHighest"],
|
||||
|
||||
2
.github/workflows/backend-code-checks.yml
vendored
2
.github/workflows/backend-code-checks.yml
vendored
@@ -79,7 +79,7 @@ jobs:
|
||||
make swagger-clean && make openapi3-gen
|
||||
|
||||
# Check if the generated specs differ from what's in the repository
|
||||
for f in public/api-merged.json public/openapi3.json; do git add $f; done
|
||||
for f in public/api-merged.json public/openapi3.json public/api-enterprise-spec.json; do git add $f; done
|
||||
if [ -z "$(git diff --name-only --cached)" ]; then
|
||||
echo "OpenAPI specs are up to date!"
|
||||
else
|
||||
|
||||
2
.github/workflows/backport-trigger.yml
vendored
2
.github/workflows/backport-trigger.yml
vendored
@@ -40,7 +40,7 @@ jobs:
|
||||
}' "$GITHUB_EVENT_PATH" > /tmp/pr_info.json
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: pr_info
|
||||
path: /tmp/pr_info.json
|
||||
|
||||
2
.github/workflows/backport-workflow.yml
vendored
2
.github/workflows/backport-workflow.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
||||
private_key: ${{ fromJSON(steps.secrets.outputs.secrets).APP_PEM }}
|
||||
|
||||
- name: Download PR info artifact
|
||||
uses: actions/download-artifact@v5
|
||||
uses: actions/download-artifact@v6
|
||||
id: download-pr-info
|
||||
with:
|
||||
github-token: ${{ github.token }}
|
||||
|
||||
@@ -193,7 +193,7 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
- name: store build artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: build-artifacts
|
||||
path: ${{ steps.get_dir.outputs.dir }}/ci/packages/*.zip
|
||||
|
||||
@@ -64,7 +64,7 @@ jobs:
|
||||
run: zip -r ./pr_built_packages.zip ./packages/**/*.tgz
|
||||
|
||||
- name: Upload build output as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: buildPr
|
||||
path: './pr/pr_built_packages.zip'
|
||||
@@ -116,7 +116,7 @@ jobs:
|
||||
run: zip -r ./base_built_packages.zip ./packages/**/*.tgz
|
||||
|
||||
- name: Upload build output as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: buildBase
|
||||
path: './base/base_built_packages.zip'
|
||||
@@ -141,12 +141,12 @@ jobs:
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Get built packages from pr
|
||||
uses: actions/download-artifact@v5
|
||||
uses: actions/download-artifact@v6
|
||||
with:
|
||||
name: buildPr
|
||||
|
||||
- name: Get built packages from base
|
||||
uses: actions/download-artifact@v5
|
||||
uses: actions/download-artifact@v6
|
||||
with:
|
||||
name: buildBase
|
||||
|
||||
@@ -189,7 +189,7 @@ jobs:
|
||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||
|
||||
- name: Upload check output as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: levitate
|
||||
path: levitate/
|
||||
@@ -225,7 +225,7 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'Download artifact'
|
||||
uses: actions/download-artifact@v5
|
||||
uses: actions/download-artifact@v6
|
||||
with:
|
||||
name: levitate
|
||||
|
||||
|
||||
30
.github/workflows/pr-e2e-tests.yml
vendored
30
.github/workflows/pr-e2e-tests.yml
vendored
@@ -94,14 +94,14 @@ jobs:
|
||||
id: artifact
|
||||
|
||||
- name: Upload grafana.tar.gz
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
retention-days: 1
|
||||
name: grafana-tar-gz
|
||||
path: build-dir/grafana.tar.gz
|
||||
|
||||
- name: Upload grafana docker tarball
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
retention-days: 1
|
||||
name: grafana-docker-tar-gz
|
||||
@@ -133,7 +133,7 @@ jobs:
|
||||
# We want a static binary, so we need to set CGO_ENABLED=0
|
||||
CGO_ENABLED=0 go build -o ./e2e-runner ./e2e/
|
||||
echo "artifact=e2e-runner-${{github.run_number}}" >> "$GITHUB_OUTPUT"
|
||||
- uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v5
|
||||
id: upload
|
||||
with:
|
||||
retention-days: 1
|
||||
@@ -159,7 +159,7 @@ jobs:
|
||||
with:
|
||||
registry: 'us-docker.pkg.dev'
|
||||
environment: 'dev'
|
||||
- uses: actions/download-artifact@4a24838f3d5601fd639834081e118c2995d51e1c
|
||||
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
|
||||
with:
|
||||
name: grafana-docker-tar-gz
|
||||
path: .
|
||||
@@ -221,10 +221,10 @@ jobs:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/download-artifact@v5
|
||||
- uses: actions/download-artifact@v6
|
||||
with:
|
||||
name: grafana-tar-gz
|
||||
- uses: actions/download-artifact@v5
|
||||
- uses: actions/download-artifact@v6
|
||||
with:
|
||||
name: ${{ needs.build-e2e-runner.outputs.artifact }}
|
||||
- name: chmod +x
|
||||
@@ -245,7 +245,7 @@ jobs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
echo "suite=$(echo "$SUITE" | sed 's/\//-/g')" >> "$GITHUB_OUTPUT"
|
||||
- uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v5
|
||||
if: success() || failure()
|
||||
with:
|
||||
name: ${{ steps.set-suite-name.outputs.suite }}-${{ github.run_number }}
|
||||
@@ -298,7 +298,7 @@ jobs:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/download-artifact@v5
|
||||
- uses: actions/download-artifact@v6
|
||||
with:
|
||||
name: grafana-tar-gz
|
||||
- name: Run E2E tests
|
||||
@@ -307,7 +307,7 @@ jobs:
|
||||
version: 0.18.8
|
||||
verb: run
|
||||
args: go run ./pkg/build/e2e-playwright --package=grafana.tar.gz --shard=${{ matrix.shard }}/${{ matrix.shardTotal }} --blob-dir=./blob-report
|
||||
- uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v5
|
||||
if: success() || failure()
|
||||
with:
|
||||
name: playwright-blob-${{ github.run_number }}-${{ matrix.shard }}
|
||||
@@ -360,7 +360,7 @@ jobs:
|
||||
run: |
|
||||
docker cp cpp-e2e-deploy:/outputs.json /tmp/outputs.json
|
||||
|
||||
- uses: actions/download-artifact@v5
|
||||
- uses: actions/download-artifact@v6
|
||||
with:
|
||||
name: grafana-tar-gz
|
||||
|
||||
@@ -400,7 +400,7 @@ jobs:
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Download blob reports from GitHub Actions Artifacts
|
||||
uses: actions/download-artifact@v5
|
||||
uses: actions/download-artifact@v6
|
||||
with:
|
||||
path: blobs
|
||||
pattern: playwright-blob-*
|
||||
@@ -439,7 +439,7 @@ jobs:
|
||||
|
||||
- name: Upload HTML report
|
||||
id: upload-html
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: playwright-html-${{ github.run_number }}
|
||||
path: playwright-report
|
||||
@@ -479,7 +479,7 @@ jobs:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/download-artifact@v5
|
||||
- uses: actions/download-artifact@v6
|
||||
with:
|
||||
name: grafana-tar-gz
|
||||
- name: Run PR a11y test
|
||||
@@ -498,7 +498,7 @@ jobs:
|
||||
args: go run ./pkg/build/a11y --package=grafana.tar.gz --no-threshold-fail --results=./pa11y-ci-results.json
|
||||
- name: Upload pa11y results
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
retention-days: 1
|
||||
name: pa11y-ci-results
|
||||
@@ -531,7 +531,7 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: yarn install --immutable
|
||||
- name: Get pa11y results
|
||||
uses: actions/download-artifact@v5
|
||||
uses: actions/download-artifact@v6
|
||||
with:
|
||||
name: pa11y-ci-results
|
||||
- name: Extract and publish metrics
|
||||
|
||||
24
.github/workflows/pr-frontend-unit-tests.yml
vendored
24
.github/workflows/pr-frontend-unit-tests.yml
vendored
@@ -18,6 +18,7 @@ jobs:
|
||||
contents: read
|
||||
outputs:
|
||||
changed: ${{ steps.detect-changes.outputs.frontend }}
|
||||
devenv-changed: ${{ steps.detect-changes.outputs.devenv }}
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
@@ -169,3 +170,26 @@ jobs:
|
||||
needs: ${{ toJson(needs) }}
|
||||
failure-message: "One or more unit test jobs have failed"
|
||||
success-message: "All unit tests completed successfully"
|
||||
|
||||
devenv:
|
||||
needs:
|
||||
- detect-changes
|
||||
if: needs.detect-changes.outputs.devenv-changed == 'true'
|
||||
runs-on: ubuntu-x64-large
|
||||
name: "Devenv frontend-service build"
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup Docker
|
||||
uses: docker/setup-docker-action@3fb92d6d9c634363128c8cce4bc3b2826526370a # v4
|
||||
- name: Setup Node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
- name: Install Tilt
|
||||
run: curl -fsSL https://raw.githubusercontent.com/tilt-dev/tilt/master/scripts/install.sh | bash
|
||||
- name: Create empty config files # TODO: the tiltfile should conditionally mount these only if they exist, like the enterprise license
|
||||
run: |
|
||||
touch devenv/frontend-service/configs/grafana-api.local.ini
|
||||
touch devenv/frontend-service/configs/frontend-service.local.ini
|
||||
- name: Test frontend-service Tiltfile
|
||||
run: tilt ci --file devenv/frontend-service/Tiltfile
|
||||
|
||||
68
.github/workflows/pr-test-integration.yml
vendored
68
.github/workflows/pr-test-integration.yml
vendored
@@ -78,6 +78,7 @@ jobs:
|
||||
# We don't need more than this since it has to wait for the other tests.
|
||||
shard: [
|
||||
1/4, 2/4, 3/4, 4/4,
|
||||
profiled,
|
||||
]
|
||||
fail-fast: false
|
||||
|
||||
@@ -96,13 +97,74 @@ jobs:
|
||||
go-version-file: go.mod
|
||||
cache: true
|
||||
- name: Run tests
|
||||
if: matrix.shard != 'profiled'
|
||||
env:
|
||||
SHARD: ${{ matrix.shard }}
|
||||
CGO_ENABLED: 0
|
||||
SKIP_PACKAGES: |-
|
||||
pkg/tests/apis/folder
|
||||
pkg/tests/apis/dashboard
|
||||
run: |
|
||||
set -euo pipefail
|
||||
readarray -t PACKAGES <<< "$(./scripts/ci/backend-tests/pkgs-with-tests-named.sh -b TestIntegration | ./scripts/ci/backend-tests/shard.sh -N"$SHARD" -d-)"
|
||||
# ionice since tests are IO intensive
|
||||
CGO_ENABLED=0 ionice -c2 -n7 go test -p=4 -tags=sqlite -timeout=8m -run '^TestIntegration' "${PACKAGES[@]}"
|
||||
# Build regex pattern like: pkg1$|pkg2$|pkg3$
|
||||
SKIP_PATTERN=$(echo "$SKIP_PACKAGES" | sed '/^$/d' | sed 's|.*|&$|' | paste -sd '|' -)
|
||||
readarray -t PACKAGES <<< "$(./scripts/ci/backend-tests/pkgs-with-tests-named.sh -b TestIntegration | ./scripts/ci/backend-tests/shard.sh -N "$SHARD" -d - | grep -Ev "($SKIP_PATTERN)")"
|
||||
go test -tags=sqlite -timeout=8m -run '^TestIntegration' "${PACKAGES[@]}"
|
||||
- name: Run profiled tests
|
||||
id: run-profiled-tests
|
||||
if: matrix.shard == 'profiled'
|
||||
env:
|
||||
CGO_ENABLED: 0
|
||||
PROFILED_PACKAGES: |-
|
||||
pkg/tests/apis/folder
|
||||
pkg/tests/apis/dashboard
|
||||
run: |
|
||||
set -euo pipefail
|
||||
# Build regex pattern line: pkg1$|pkg2$|pkg3$
|
||||
PROFILE_PATTERN=$(echo "$PROFILED_PACKAGES" | sed '/^$/d' | sed 's|.*|&$|' | paste -sd '|' -)
|
||||
readarray -t PACKAGES <<< "$(./scripts/ci/backend-tests/pkgs-with-tests-named.sh -b TestIntegration | grep -E "($PROFILE_PATTERN)")"
|
||||
if [ ${#PACKAGES[@]} -eq 0 ]; then
|
||||
echo "⚠️ No profiled packages found"
|
||||
exit 0
|
||||
fi
|
||||
mkdir -p profiles
|
||||
EXIT_CODE=0
|
||||
# Run each profiled package sequentially
|
||||
for full_pkg in "${PACKAGES[@]}"; do
|
||||
# Build valid file name
|
||||
pkg_name=$(basename "$full_pkg" | tr '/' '_' | tr '.' '_')
|
||||
echo "📦 Running $full_pkg"
|
||||
set +e
|
||||
go test -tags=sqlite -timeout=8m -run '^TestIntegration' \
|
||||
-outputdir=profiles \
|
||||
-cpuprofile="cpu_${pkg_name}.prof" \
|
||||
-memprofile="mem_${pkg_name}.prof" \
|
||||
-trace="trace_${pkg_name}.out" \
|
||||
"$full_pkg" 2>&1 | tee "profiles/test_${pkg_name}.log"
|
||||
TEST_EXIT=$?
|
||||
set -e
|
||||
if [ $TEST_EXIT -ne 0 ]; then
|
||||
echo "❌ $full_pkg failed with exit code $TEST_EXIT"
|
||||
EXIT_CODE=1
|
||||
else
|
||||
echo "✅ $full_pkg passed"
|
||||
fi
|
||||
done
|
||||
# Set output for artifact upload
|
||||
if [ $EXIT_CODE -ne 0 ]; then
|
||||
echo "upload_artifacts=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "upload_artifacts=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
exit $EXIT_CODE
|
||||
- name: Output test profiles and traces
|
||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v4
|
||||
if: matrix.shard == 'profiled' && !cancelled() && steps.run-profiled-tests.outputs.upload_artifacts == 'true'
|
||||
with:
|
||||
name: integration-test-profiles-sqlite-nocgo-${{ github.run_number }}
|
||||
path: profiles/
|
||||
retention-days: 7
|
||||
if-no-files-found: ignore
|
||||
mysql:
|
||||
needs: detect-changes
|
||||
if: needs.detect-changes.outputs.changed == 'true'
|
||||
|
||||
2
.github/workflows/publish-artifact.yml
vendored
2
.github/workflows/publish-artifact.yml
vendored
@@ -44,7 +44,7 @@ jobs:
|
||||
permissions:
|
||||
id-token: write
|
||||
steps:
|
||||
- uses: actions/download-artifact@4a24838f3d5601fd639834081e118c2995d51e1c
|
||||
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
|
||||
with:
|
||||
name: ${{ inputs.name }}
|
||||
pattern: ${{ inputs.pattern }}
|
||||
|
||||
27
.github/workflows/release-build.yml
vendored
27
.github/workflows/release-build.yml
vendored
@@ -187,12 +187,12 @@ jobs:
|
||||
output: artifacts-${{ matrix.name }}.txt
|
||||
verify: ${{ matrix.verify }}
|
||||
build-id: ${{ github.run_id }}
|
||||
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
||||
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
|
||||
with:
|
||||
name: artifacts-list-${{ matrix.name }}
|
||||
path: ${{ steps.build.outputs.file }}
|
||||
retention-days: 1
|
||||
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
||||
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
|
||||
with:
|
||||
name: artifacts-${{ matrix.name }}
|
||||
path: ${{ steps.build.outputs.dist-dir }}
|
||||
@@ -224,27 +224,27 @@ jobs:
|
||||
- build
|
||||
steps:
|
||||
- uses: grafana/shared-workflows/actions/dockerhub-login@dockerhub-login/v1.0.2
|
||||
- uses: actions/download-artifact@4a24838f3d5601fd639834081e118c2995d51e1c
|
||||
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
|
||||
with:
|
||||
name: artifacts-list-linux-amd64
|
||||
path: .
|
||||
- uses: actions/download-artifact@4a24838f3d5601fd639834081e118c2995d51e1c
|
||||
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
|
||||
with:
|
||||
name: artifacts-list-linux-arm64
|
||||
path: .
|
||||
- uses: actions/download-artifact@4a24838f3d5601fd639834081e118c2995d51e1c
|
||||
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
|
||||
with:
|
||||
name: artifacts-list-linux-armv7
|
||||
path: .
|
||||
- uses: actions/download-artifact@4a24838f3d5601fd639834081e118c2995d51e1c
|
||||
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
|
||||
with:
|
||||
name: artifacts-linux-amd64
|
||||
path: dist
|
||||
- uses: actions/download-artifact@4a24838f3d5601fd639834081e118c2995d51e1c
|
||||
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
|
||||
with:
|
||||
name: artifacts-linux-arm64
|
||||
path: dist
|
||||
- uses: actions/download-artifact@4a24838f3d5601fd639834081e118c2995d51e1c
|
||||
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
|
||||
with:
|
||||
name: artifacts-linux-armv7
|
||||
path: dist
|
||||
@@ -320,13 +320,21 @@ jobs:
|
||||
repositories: '["grafana"]'
|
||||
permissions: '{"issues": "write", "pull_requests": "write", "contents": "read"}'
|
||||
- name: Find PR
|
||||
continue-on-error: true
|
||||
id: find-pr
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
|
||||
GRAFANA_COMMIT: ${{ needs.setup.outputs.grafana-commit }}
|
||||
run: echo "ISSUE_NUMBER=$(gh api "/repos/grafana/grafana/commits/${GRAFANA_COMMIT}/pulls" | jq -r '.[0].number')" >> "$GITHUB_ENV"
|
||||
REPO: ${{ github.repository }}
|
||||
run: |
|
||||
set -eo pipefail
|
||||
gh api "/repos/${REPO}/commits/${GRAFANA_COMMIT}/pulls" | jq -r '.[0].number' | tee issue_number.txt
|
||||
echo "ISSUE_NUMBER=$(cat issue_number.txt)" >> "$GITHUB_ENV"
|
||||
- name: Find Comment
|
||||
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3
|
||||
if: ${{ steps.find-pr.outcome == 'success' }}
|
||||
id: fc
|
||||
continue-on-error: true
|
||||
with:
|
||||
issue-number: ${{ env.ISSUE_NUMBER }}
|
||||
comment-author: 'grafana-delivery-bot[bot]'
|
||||
@@ -334,6 +342,7 @@ jobs:
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
- name: Create or update comment
|
||||
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v4
|
||||
if: ${{ steps.find-pr.outcome == 'success' }} # Run even if comment wasn't found
|
||||
with:
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
comment-id: ${{ steps.fc.outputs.comment-id }}
|
||||
|
||||
4
.github/workflows/storybook-a11y.yml
vendored
4
.github/workflows/storybook-a11y.yml
vendored
@@ -34,7 +34,7 @@ jobs:
|
||||
id-token: write
|
||||
needs: detect-changes
|
||||
if: needs.detect-changes.outputs.changed == 'true'
|
||||
name: "Run Storybook a11y tests"
|
||||
name: "Run Storybook a11y tests (light theme)"
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
@@ -64,7 +64,7 @@ jobs:
|
||||
id-token: write
|
||||
needs: detect-changes
|
||||
if: needs.detect-changes.outputs.changed == 'true'
|
||||
name: "Run Storybook a11y tests"
|
||||
name: "Run Storybook a11y tests (dark theme)"
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
|
||||
2
.github/workflows/trufflehog.yml
vendored
2
.github/workflows/trufflehog.yml
vendored
@@ -31,6 +31,6 @@ jobs:
|
||||
persist-credentials: false
|
||||
fetch-depth: ${{ steps.fetch_depth.outputs.fetch_depth }}
|
||||
- name: Trufflehog
|
||||
uses: trufflesecurity/trufflehog@ad6fc8fb446b8fafbf7ea8193d2d6bfd42f45690 # v3.90.11
|
||||
uses: trufflesecurity/trufflehog@b84c3d14d189e16da175e2c27fa8136603783ffc # v3.90.12
|
||||
with:
|
||||
extra_args: --results=verified
|
||||
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -250,9 +250,12 @@ public/mockServiceWorker.js
|
||||
/e2e-playwright/test-plugins/*/dist
|
||||
/apps/provisioning/cmd/job-controller/bin/
|
||||
|
||||
|
||||
# Ignore unified storage kv store files
|
||||
/grafana-kv-data
|
||||
|
||||
# Ignore debug output from test library
|
||||
/pkg/storage/secret/metadata/testdata/rapid/TestStateMachine/
|
||||
|
||||
/codeowners-manifest/
|
||||
|
||||
# Ignore grafana/hippocampus local cache folder
|
||||
|
||||
@@ -83,7 +83,7 @@ linters:
|
||||
deny:
|
||||
- pkg: github.com/grafana/grafana/pkg
|
||||
desc: apps/playlist is not allowed to import grafana core
|
||||
apps-secret:
|
||||
apps-secret:
|
||||
list-mode: lax
|
||||
files:
|
||||
- ./apps/secret/*
|
||||
@@ -105,6 +105,8 @@ linters:
|
||||
- '**/pkg/tsdb/graphite/**/*'
|
||||
- '**/pkg/tsdb/mysql/*'
|
||||
- '**/pkg/tsdb/mysql/**/*'
|
||||
- '**/pkg/tsdb/opentsdb/*'
|
||||
- '**/pkg/tsdb/opentsdb/**/*'
|
||||
- '**/pkg/tsdb/parca/*'
|
||||
- '**/pkg/tsdb/parca/**/*'
|
||||
- '**/pkg/tsdb/tempo/*'
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -25,6 +25,6 @@ plugins:
|
||||
path: .yarn/plugins/@yarnpkg/plugin-licenses.cjs
|
||||
spec: "https://raw.githubusercontent.com/mhassan1/yarn-plugin-licenses/v0.15.0/bundles/@yarnpkg/plugin-licenses.js"
|
||||
|
||||
yarnPath: .yarn/releases/yarn-4.10.3.cjs
|
||||
yarnPath: .yarn/releases/yarn-4.11.0.cjs
|
||||
|
||||
enableScripts: false
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
Thank you for your interest in contributing to Grafana! We welcome all people who want to contribute in a healthy and constructive manner within our community. To help us create a safe and positive community experience for all, we require all participants to adhere to the [Code of Conduct](CODE_OF_CONDUCT.md).
|
||||
|
||||
This document is a guide to help you through the process of contributing to Grafana. Be sure to check out the [Grafana Champions program](https://grafana.com/community/champions/?src=github&camp=community-cross-platform-engagement) as you start to contribute. It’s designed to recognize and empower individuals who are actively contributing to the growth and success of the Grafana ecosystem.
|
||||
This document is a guide to help you through the process of contributing to Grafana. Be sure to check out the [Grafana Champions program](https://grafana.com/community/champions/?src=github&camp=community-cross-platform-engagement) as you start to contribute. It's designed to recognize and empower individuals who are actively contributing to the growth and success of the Grafana ecosystem.
|
||||
|
||||
> **Help us improve!** We'd love to hear about your contributor experience. Take a moment to share your feedback in our [Open Source Contributor Experience Survey](https://gra.fan/ome). Your input helps us make contributing to Grafana better for everyone.
|
||||
|
||||
Whether you're a new contributor or a seasoned veteran, we hope these resources help you connect with the community.
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ ARG JS_SRC=js-builder
|
||||
FROM alpine:3.22.2 AS alpine-base
|
||||
FROM ubuntu:22.04 AS ubuntu-base
|
||||
FROM golang:1.25.3-alpine AS go-builder-base
|
||||
FROM --platform=${JS_PLATFORM} node:22-alpine AS js-builder-base
|
||||
FROM --platform=${JS_PLATFORM} node:24-alpine AS js-builder-base
|
||||
# Javascript build stage
|
||||
FROM --platform=${JS_PLATFORM} ${JS_IMAGE} AS js-builder
|
||||
ARG JS_NODE_ENV=production
|
||||
@@ -95,6 +95,7 @@ COPY pkg/aggregator pkg/aggregator
|
||||
COPY apps/playlist apps/playlist
|
||||
COPY apps/plugins apps/plugins
|
||||
COPY apps/shorturl apps/shorturl
|
||||
COPY apps/annotation apps/annotation
|
||||
COPY apps/correlations apps/correlations
|
||||
COPY apps/preferences apps/preferences
|
||||
COPY apps/provisioning apps/provisioning
|
||||
@@ -114,6 +115,7 @@ COPY apps/alerting/notifications apps/alerting/notifications
|
||||
COPY apps/alerting/rules apps/alerting/rules
|
||||
COPY pkg/codegen pkg/codegen
|
||||
COPY pkg/plugins/codegen pkg/plugins/codegen
|
||||
COPY apps/example apps/example
|
||||
|
||||
RUN go mod download
|
||||
|
||||
|
||||
8
Makefile
8
Makefile
@@ -135,14 +135,14 @@ i18n-extract-enterprise:
|
||||
@echo "Skipping i18n extract for Enterprise: not enabled"
|
||||
else
|
||||
i18n-extract-enterprise:
|
||||
@echo "Extracting i18n strings for Enterprise"
|
||||
yarn run i18next --config public/locales/i18next-parser-enterprise.config.cjs
|
||||
@echo "Extracting i18n strings for Enterprise"
|
||||
cd public/locales/enterprise && yarn run i18next-cli extract --sync-primary
|
||||
endif
|
||||
|
||||
.PHONY: i18n-extract
|
||||
i18n-extract: i18n-extract-enterprise
|
||||
@echo "Extracting i18n strings for OSS"
|
||||
yarn run i18next --config public/locales/i18next-parser.config.cjs
|
||||
yarn run i18next-cli extract --sync-primary
|
||||
@echo "Extracting i18n strings for packages"
|
||||
yarn run packages:i18n-extract
|
||||
@echo "Extracting i18n strings for plugins"
|
||||
@@ -178,7 +178,7 @@ gen-apps: do-gen-apps gofmt ## Generate code for Grafana App SDK apps and run go
|
||||
@if [ -n "$$CODEGEN_VERIFY" ]; then \
|
||||
echo "Verifying generated code is up to date..."; \
|
||||
if ! git diff --quiet; then \
|
||||
echo "Error: Generated apps code is not up to date. Please run 'make gen-apps' to regenerate."; \
|
||||
echo "Error: Generated code is not up to date. Please run 'make gen-apps', 'make gen-cue', and 'make gen-jsonnet' to regenerate."; \
|
||||
git diff --name-only; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
The open-source platform for monitoring and observability
|
||||
|
||||
[](LICENSE)
|
||||
[](https://drone.grafana.net/grafana/grafana)
|
||||
[](https://goreportcard.com/report/github.com/grafana/grafana)
|
||||
|
||||
Grafana allows you to query, visualize, alert on and understand your metrics no matter where they are stored. Create, explore, and share dashboards with your team and foster a data-driven culture:
|
||||
@@ -36,6 +35,8 @@ If you're interested in contributing to the Grafana project:
|
||||
- Explore our [beginner-friendly issues](https://github.com/grafana/grafana/issues?q=is%3Aopen+is%3Aissue+label%3A%22beginner+friendly%22).
|
||||
- Look through our [style guide and Storybook](https://developers.grafana.com/ui/latest/index.html).
|
||||
|
||||
> Share your contributor experience in our [feedback survey](https://gra.fan/ome) to help us improve.
|
||||
|
||||
## Get involved
|
||||
|
||||
- Follow [@grafana on X (formerly Twitter)](https://x.com/grafana/).
|
||||
|
||||
@@ -1,5 +1,34 @@
|
||||
include ../sdk.mk
|
||||
|
||||
.PHONY: generate
|
||||
.PHONY: etcd
|
||||
etcd:
|
||||
@docker run -d --name etcd --env ALLOW_NONE_AUTHENTICATION=yes -p 22379:2379 bitnamilegacy/etcd:latest
|
||||
|
||||
.PHONY: generate # Run Grafana App SDK code generation
|
||||
generate: install-app-sdk update-app-sdk
|
||||
@$(APP_SDK_BIN) generate -g ./pkg/apis --grouping=group --postprocess --defencoding=none --useoldmanifestkinds
|
||||
@$(APP_SDK_BIN) generate \
|
||||
--source=./kinds/ \
|
||||
--gogenpath=./pkg/apis \
|
||||
--grouping=group \
|
||||
--defencoding=none
|
||||
|
||||
.PHONY: run
|
||||
run:
|
||||
@go run ./pkg/standalone/server.go --etcd-servers=http://127.0.0.1:22379 --secure-port 7445
|
||||
|
||||
.PHONY: create-checks
|
||||
create-checks:
|
||||
@echo "Creating plugin check..."
|
||||
@curl -k -X POST https://localhost:7445/apis/advisor.grafana.app/v0alpha1/namespaces/stacks-1/checks \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"kind":"Check","apiVersion":"advisor.grafana.app/v0alpha1","spec":{"data":{}},"metadata":{"generateName":"check-","labels":{"advisor.grafana.app/type":"plugin"},"namespace":"stacks-1"},"status":{"report":{"count":0,"failures":[]}}}' \
|
||||
&& echo "Plugin check created successfully"
|
||||
@echo "Creating datasource check..."
|
||||
@curl -k -X POST https://localhost:7445/apis/advisor.grafana.app/v0alpha1/namespaces/stacks-1/checks \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"kind":"Check","apiVersion":"advisor.grafana.app/v0alpha1","spec":{"data":{}},"metadata":{"generateName":"check-","labels":{"advisor.grafana.app/type":"datasource"},"namespace":"stacks-1"},"status":{"report":{"count":0,"failures":[]}}}' \
|
||||
&& echo "Datasource check created successfully"
|
||||
|
||||
delete-checks:
|
||||
@curl -k -X DELETE https://localhost:7445/apis/advisor.grafana.app/v0alpha1/namespaces/stacks-1/checks \
|
||||
&& echo "All checks deleted successfully"
|
||||
|
||||
@@ -4,34 +4,53 @@ go 1.25.3
|
||||
|
||||
require (
|
||||
github.com/Masterminds/semver/v3 v3.4.0
|
||||
github.com/google/go-cmp v0.7.0
|
||||
github.com/google/go-github/v70 v70.0.0
|
||||
github.com/grafana/authlib/types v0.0.0-20250710201142-9542f2f28d43
|
||||
github.com/grafana/authlib/types v0.0.0-20250926065801-df98203cff37
|
||||
github.com/grafana/grafana v0.0.0-00010101000000-000000000000
|
||||
github.com/grafana/grafana-app-sdk v0.40.2
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.2
|
||||
github.com/grafana/grafana-plugin-sdk-go v0.278.0
|
||||
github.com/grafana/grafana/pkg/apimachinery v0.0.0-20250804150913-990f1c69ecc2
|
||||
github.com/stretchr/testify v1.10.0
|
||||
k8s.io/apimachinery v0.33.3
|
||||
k8s.io/apiserver v0.33.3
|
||||
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff
|
||||
github.com/grafana/grafana-app-sdk v0.48.2
|
||||
github.com/grafana/grafana-app-sdk/logging v0.48.1
|
||||
github.com/grafana/grafana-plugin-sdk-go v0.281.0
|
||||
github.com/grafana/grafana/pkg/apimachinery v0.0.0
|
||||
github.com/stretchr/testify v1.11.1
|
||||
k8s.io/apimachinery v0.34.2
|
||||
k8s.io/apiserver v0.34.2
|
||||
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912
|
||||
)
|
||||
|
||||
// transitive dependencies that need replaced
|
||||
// TODO: stop depending on grafana core
|
||||
replace github.com/grafana/grafana => ../..
|
||||
|
||||
replace github.com/prometheus/alertmanager => github.com/grafana/prometheus-alertmanager v0.25.1-0.20250620093340-be61a673dee6
|
||||
replace github.com/grafana/grafana/apps/provisioning => ../provisioning
|
||||
|
||||
replace github.com/grafana/grafana/pkg/apimachinery => ../../pkg/apimachinery
|
||||
|
||||
replace github.com/grafana/grafana/pkg/apiserver => ../../pkg/apiserver
|
||||
|
||||
replace github.com/grafana/grafana/apps/dashboard => ../dashboard
|
||||
|
||||
replace github.com/grafana/grafana/pkg/aggregator => ../../pkg/aggregator
|
||||
|
||||
replace github.com/grafana/grafana/apps/folder => ../folder
|
||||
|
||||
replace github.com/grafana/grafana/apps/secret => ../secret
|
||||
|
||||
replace github.com/grafana/grafana/apps/iam => ../iam
|
||||
|
||||
replace github.com/grafana/grafana/apps/plugins => ../plugins
|
||||
|
||||
replace github.com/prometheus/alertmanager => github.com/grafana/prometheus-alertmanager v0.25.1-0.20250911094103-5456b6e45604
|
||||
|
||||
require (
|
||||
cloud.google.com/go/compute/metadata v0.7.0 // indirect
|
||||
dario.cat/mergo v1.0.2 // indirect
|
||||
filippo.io/edwards25519 v1.1.0 // indirect
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.1 // indirect
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.10.1 // indirect
|
||||
github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 // indirect
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.19.1 // indirect
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.12.0 // indirect
|
||||
github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 // indirect
|
||||
github.com/Azure/go-ntlmssp v0.0.0-20220621081337-cb9428e4ac1e // indirect
|
||||
github.com/AzureAD/microsoft-authentication-library-for-go v1.4.2 // indirect
|
||||
github.com/AzureAD/microsoft-authentication-library-for-go v1.5.0 // indirect
|
||||
github.com/BurntSushi/toml v1.5.0 // indirect
|
||||
github.com/Masterminds/goutils v1.1.1 // indirect
|
||||
github.com/Masterminds/semver v1.5.0 // indirect
|
||||
@@ -40,19 +59,19 @@ require (
|
||||
github.com/VividCortex/mysqlerr v0.0.0-20170204212430-6c6b55f8796f // indirect
|
||||
github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b // indirect
|
||||
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
|
||||
github.com/apache/arrow-go/v18 v18.3.0 // indirect
|
||||
github.com/apache/arrow-go/v18 v18.4.1 // indirect
|
||||
github.com/armon/go-metrics v0.4.1 // indirect
|
||||
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
|
||||
github.com/at-wat/mqtt-go v0.19.4 // indirect
|
||||
github.com/aws/aws-sdk-go v1.55.7 // indirect
|
||||
github.com/aws/aws-sdk-go-v2 v1.36.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.17.70 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.36 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.36 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.4 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.17 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.34.0 // indirect
|
||||
github.com/aws/smithy-go v1.22.4 // indirect
|
||||
github.com/aws/aws-sdk-go-v2 v1.39.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.18.14 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.8 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.8 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.8 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.38.5 // indirect
|
||||
github.com/aws/smithy-go v1.23.1 // indirect
|
||||
github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df // indirect
|
||||
github.com/benbjohnson/clock v1.3.5 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
@@ -62,13 +81,11 @@ require (
|
||||
github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874 // indirect
|
||||
github.com/bwmarrin/snowflake v0.3.0 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
|
||||
github.com/cenkalti/backoff/v5 v5.0.2 // indirect
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||
github.com/cheekybits/genny v1.0.0 // indirect
|
||||
github.com/chromedp/cdproto v0.0.0-20250429231605-6ed5b53462d4 // indirect
|
||||
github.com/cloudflare/circl v1.6.1 // indirect
|
||||
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||
github.com/diegoholiveira/jsonlogic/v3 v3.7.4 // indirect
|
||||
@@ -78,102 +95,106 @@ require (
|
||||
github.com/dolthub/go-icu-regex v0.0.0-20250327004329-6799764f2dad // indirect
|
||||
github.com/dolthub/go-mysql-server v0.19.1-0.20250410182021-5632d67cd46e // indirect
|
||||
github.com/dolthub/jsonpath v0.0.2-0.20240227200619-19675ab05c71 // indirect
|
||||
github.com/dolthub/vitess v0.0.0-20250410090211-143e6b272ad4 // indirect
|
||||
github.com/dolthub/vitess v0.0.0-20250930230441-70c2c6a98e33 // indirect
|
||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||
github.com/elazarl/goproxy v1.7.2 // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
|
||||
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.13.0 // indirect
|
||||
github.com/fatih/color v1.18.0 // indirect
|
||||
github.com/felixge/httpsnoop v1.0.4 // indirect
|
||||
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
|
||||
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
|
||||
github.com/gchaincl/sqlhooks v1.3.0 // indirect
|
||||
github.com/getkin/kin-openapi v0.132.0 // indirect
|
||||
github.com/getkin/kin-openapi v0.133.0 // indirect
|
||||
github.com/go-asn1-ber/asn1-ber v1.5.4 // indirect
|
||||
github.com/go-jose/go-jose/v3 v3.0.4 // indirect
|
||||
github.com/go-jose/go-jose/v4 v4.1.2 // indirect
|
||||
github.com/go-kit/log v0.2.1 // indirect
|
||||
github.com/go-ldap/ldap/v3 v3.4.4 // indirect
|
||||
github.com/go-logfmt/logfmt v0.6.0 // indirect
|
||||
github.com/go-logfmt/logfmt v0.6.1 // indirect
|
||||
github.com/go-logr/logr v1.4.3 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-openapi/analysis v0.23.0 // indirect
|
||||
github.com/go-openapi/errors v0.22.0 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.21.0 // indirect
|
||||
github.com/go-openapi/jsonreference v0.21.0 // indirect
|
||||
github.com/go-openapi/loads v0.22.0 // indirect
|
||||
github.com/go-openapi/analysis v0.24.0 // indirect
|
||||
github.com/go-openapi/errors v0.22.3 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.22.1 // indirect
|
||||
github.com/go-openapi/jsonreference v0.21.2 // indirect
|
||||
github.com/go-openapi/loads v0.23.1 // indirect
|
||||
github.com/go-openapi/runtime v0.28.0 // indirect
|
||||
github.com/go-openapi/spec v0.21.0 // indirect
|
||||
github.com/go-openapi/strfmt v0.23.0 // indirect
|
||||
github.com/go-openapi/spec v0.22.0 // indirect
|
||||
github.com/go-openapi/strfmt v0.24.0 // indirect
|
||||
github.com/go-openapi/swag v0.23.0 // indirect
|
||||
github.com/go-openapi/validate v0.24.0 // indirect
|
||||
github.com/go-redis/redis/v8 v8.11.5 // indirect
|
||||
github.com/go-openapi/swag/conv v0.25.1 // indirect
|
||||
github.com/go-openapi/swag/fileutils v0.25.1 // indirect
|
||||
github.com/go-openapi/swag/jsonname v0.25.1 // indirect
|
||||
github.com/go-openapi/swag/jsonutils v0.25.1 // indirect
|
||||
github.com/go-openapi/swag/loading v0.25.1 // indirect
|
||||
github.com/go-openapi/swag/mangling v0.25.1 // indirect
|
||||
github.com/go-openapi/swag/stringutils v0.25.1 // indirect
|
||||
github.com/go-openapi/swag/typeutils v0.25.1 // indirect
|
||||
github.com/go-openapi/swag/yamlutils v0.25.1 // indirect
|
||||
github.com/go-openapi/validate v0.25.0 // indirect
|
||||
github.com/go-sql-driver/mysql v1.9.3 // indirect
|
||||
github.com/go-stack/stack v1.8.1 // indirect
|
||||
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
|
||||
github.com/gobwas/glob v0.2.3 // indirect
|
||||
github.com/goccy/go-json v0.10.5 // indirect
|
||||
github.com/gofrs/uuid v4.4.0+incompatible // indirect
|
||||
github.com/gogo/googleapis v1.4.1 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
|
||||
github.com/golang-jwt/jwt/v5 v5.2.3 // indirect
|
||||
github.com/golang-jwt/jwt/v5 v5.3.0 // indirect
|
||||
github.com/golang-migrate/migrate/v4 v4.7.0 // indirect
|
||||
github.com/golang/mock v1.7.0-rc.1 // indirect
|
||||
github.com/golang/protobuf v1.5.4 // indirect
|
||||
github.com/google/btree v1.1.3 // indirect
|
||||
github.com/google/flatbuffers v25.2.10+incompatible // indirect
|
||||
github.com/google/gnostic-models v0.6.9 // indirect
|
||||
github.com/google/go-cmp v0.7.0 // indirect
|
||||
github.com/google/gnostic-models v0.7.0 // indirect
|
||||
github.com/google/go-querystring v1.1.0 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/google/wire v0.6.0 // indirect
|
||||
github.com/gorilla/mux v1.8.1 // indirect
|
||||
github.com/grafana/alerting v0.0.0-20250729175202-b4b881b7b263 // indirect
|
||||
github.com/grafana/authlib v0.0.0-20250710201142-9542f2f28d43 // indirect
|
||||
github.com/google/wire v0.7.0 // indirect
|
||||
github.com/grafana/alerting v0.0.0-20251009192429-9427c24835ae // indirect
|
||||
github.com/grafana/authlib v0.0.0-20250930082137-a40e2c2b094f // indirect
|
||||
github.com/grafana/dataplane/sdata v0.0.9 // indirect
|
||||
github.com/grafana/dskit v0.0.0-20250611075409-46f51e1ce914 // indirect
|
||||
github.com/grafana/grafana-aws-sdk v1.1.0 // indirect
|
||||
github.com/grafana/grafana-azure-sdk-go/v2 v2.2.0 // indirect
|
||||
github.com/grafana/grafana/apps/provisioning v0.0.0-20250804150913-990f1c69ecc2 // indirect
|
||||
github.com/grafana/grafana/pkg/apiserver v0.0.0-20250804150913-990f1c69ecc2 // indirect
|
||||
github.com/grafana/dskit v0.0.0-20250908063411-6b6da59b5cc4 // indirect
|
||||
github.com/grafana/grafana-aws-sdk v1.3.0 // indirect
|
||||
github.com/grafana/grafana-azure-sdk-go/v2 v2.3.1 // indirect
|
||||
github.com/grafana/grafana/apps/plugins v0.0.0 // indirect
|
||||
github.com/grafana/grafana/apps/provisioning v0.0.0 // indirect
|
||||
github.com/grafana/grafana/pkg/apiserver v0.0.0 // indirect
|
||||
github.com/grafana/otel-profiling-go v0.5.1 // indirect
|
||||
github.com/grafana/pyroscope-go/godeltaprof v0.1.8 // indirect
|
||||
github.com/grafana/sqlds/v4 v4.2.4 // indirect
|
||||
github.com/grafana/pyroscope-go/godeltaprof v0.1.9 // indirect
|
||||
github.com/grafana/sqlds/v4 v4.2.7 // indirect
|
||||
github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.1.0 // indirect
|
||||
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.2 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/go-hclog v1.6.3 // indirect
|
||||
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
|
||||
github.com/hashicorp/go-metrics v0.5.4 // indirect
|
||||
github.com/hashicorp/go-msgpack/v2 v2.1.2 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/hashicorp/go-plugin v1.6.3 // indirect
|
||||
github.com/hashicorp/go-plugin v1.7.0 // indirect
|
||||
github.com/hashicorp/go-sockaddr v1.0.7 // indirect
|
||||
github.com/hashicorp/golang-lru v1.0.2 // indirect
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
|
||||
github.com/hashicorp/memberlist v0.5.2 // indirect
|
||||
github.com/hashicorp/yamux v0.1.1 // indirect
|
||||
github.com/hashicorp/yamux v0.1.2 // indirect
|
||||
github.com/huandu/xstrings v1.5.0 // indirect
|
||||
github.com/jaegertracing/jaeger-idl v0.5.0 // indirect
|
||||
github.com/jessevdk/go-flags v1.6.1 // indirect
|
||||
github.com/jmespath-community/go-jmespath v1.1.1 // indirect
|
||||
github.com/jmespath/go-jmespath v0.4.0 // indirect
|
||||
github.com/jmoiron/sqlx v1.3.5 // indirect
|
||||
github.com/jmoiron/sqlx v1.4.0 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
github.com/jpillora/backoff v1.0.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/jszwedko/go-datemath v0.1.1-0.20230526204004-640a500621d6 // indirect
|
||||
github.com/klauspost/compress v1.18.0 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.2.10 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
|
||||
github.com/kylelemons/godebug v1.1.0 // indirect
|
||||
github.com/lestrrat-go/strftime v1.0.4 // indirect
|
||||
github.com/lib/pq v1.10.9 // indirect
|
||||
github.com/magefile/mage v1.15.0 // indirect
|
||||
github.com/mailru/easyjson v0.9.0 // indirect
|
||||
github.com/mattetti/filebuffer v1.0.1 // indirect
|
||||
github.com/mattn/go-colorable v0.1.14 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.16 // indirect
|
||||
github.com/mattn/go-sqlite3 v1.14.22 // indirect
|
||||
github.com/mattn/go-sqlite3 v1.14.32 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
|
||||
github.com/mdlayher/socket v0.4.1 // indirect
|
||||
github.com/mdlayher/vsock v1.2.1 // indirect
|
||||
@@ -188,7 +209,7 @@ require (
|
||||
github.com/mithrandie/go-text v1.6.0 // indirect
|
||||
github.com/mithrandie/ternary v1.1.1 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
|
||||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
|
||||
@@ -199,9 +220,9 @@ require (
|
||||
github.com/oklog/run v1.1.0 // indirect
|
||||
github.com/oklog/ulid v1.3.1 // indirect
|
||||
github.com/olekukonko/tablewriter v0.0.5 // indirect
|
||||
github.com/open-feature/go-sdk v1.14.1 // indirect
|
||||
github.com/open-feature/go-sdk-contrib/providers/go-feature-flag v0.2.3 // indirect
|
||||
github.com/open-feature/go-sdk-contrib/providers/ofrep v0.1.5 // indirect
|
||||
github.com/open-feature/go-sdk v1.16.0 // indirect
|
||||
github.com/open-feature/go-sdk-contrib/providers/go-feature-flag v0.2.6 // indirect
|
||||
github.com/open-feature/go-sdk-contrib/providers/ofrep v0.1.6 // indirect
|
||||
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
|
||||
github.com/perimeterx/marshmallow v1.1.5 // indirect
|
||||
github.com/pierrec/lz4/v4 v4.1.22 // indirect
|
||||
@@ -209,41 +230,38 @@ require (
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
||||
github.com/prometheus/alertmanager v0.28.0 // indirect
|
||||
github.com/prometheus/client_golang v1.22.0 // indirect
|
||||
github.com/prometheus/client_golang v1.23.2 // indirect
|
||||
github.com/prometheus/client_model v0.6.2 // indirect
|
||||
github.com/prometheus/common v0.65.0 // indirect
|
||||
github.com/prometheus/common v0.67.1 // indirect
|
||||
github.com/prometheus/common/sigv4 v0.1.0 // indirect
|
||||
github.com/prometheus/exporter-toolkit v0.14.0 // indirect
|
||||
github.com/prometheus/procfs v0.16.1 // indirect
|
||||
github.com/puzpuzpuz/xsync/v2 v2.5.1 // indirect
|
||||
github.com/redis/go-redis/v9 v9.14.0 // indirect
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
||||
github.com/rivo/uniseg v0.4.7 // indirect
|
||||
github.com/rs/cors v1.11.1 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect
|
||||
github.com/shopspring/decimal v1.4.0 // indirect
|
||||
github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c // indirect
|
||||
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 // indirect
|
||||
github.com/shurcooL/vfsgen v0.0.0-20230704071429-0000e147ea92 // indirect
|
||||
github.com/sirupsen/logrus v1.9.3 // indirect
|
||||
github.com/spf13/cast v1.7.1 // indirect
|
||||
github.com/spf13/pflag v1.0.7 // indirect
|
||||
github.com/spf13/cast v1.10.0 // indirect
|
||||
github.com/spf13/pflag v1.0.10 // indirect
|
||||
github.com/stretchr/objx v0.5.2 // indirect
|
||||
github.com/tetratelabs/wazero v1.8.2 // indirect
|
||||
github.com/thomaspoignant/go-feature-flag v1.42.0 // indirect
|
||||
github.com/tjhop/slog-gokit v0.1.3 // indirect
|
||||
github.com/unknwon/bra v0.0.0-20200517080246-1e3013ecaff8 // indirect
|
||||
github.com/unknwon/com v1.0.1 // indirect
|
||||
github.com/unknwon/log v0.0.0-20200308114134-929b1006e34a // indirect
|
||||
github.com/urfave/cli v1.22.16 // indirect
|
||||
github.com/tjhop/slog-gokit v0.1.5 // indirect
|
||||
github.com/woodsbury/decimal128 v1.3.0 // indirect
|
||||
github.com/x448/float16 v0.8.4 // indirect
|
||||
github.com/zeebo/xxh3 v1.0.2 // indirect
|
||||
go.mongodb.org/mongo-driver v1.17.3 // indirect
|
||||
go.mongodb.org/mongo-driver v1.17.4 // indirect
|
||||
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.61.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 // indirect
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.36.0 // indirect
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.30.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 // indirect
|
||||
go.opentelemetry.io/contrib/propagators/jaeger v1.38.0 // indirect
|
||||
go.opentelemetry.io/contrib/samplers/jaegerremote v0.32.0 // indirect
|
||||
go.opentelemetry.io/otel v1.38.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/jaeger v1.17.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 // indirect
|
||||
@@ -252,48 +270,51 @@ require (
|
||||
go.opentelemetry.io/otel/metric v1.38.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.38.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.38.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.7.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.7.1 // indirect
|
||||
go.uber.org/atomic v1.11.0 // indirect
|
||||
go.yaml.in/yaml/v2 v2.4.2 // indirect
|
||||
golang.org/x/crypto v0.40.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
|
||||
golang.org/x/mod v0.26.0 // indirect
|
||||
golang.org/x/net v0.42.0 // indirect
|
||||
golang.org/x/oauth2 v0.30.0 // indirect
|
||||
golang.org/x/sync v0.16.0 // indirect
|
||||
golang.org/x/sys v0.34.0 // indirect
|
||||
golang.org/x/term v0.33.0 // indirect
|
||||
golang.org/x/text v0.27.0 // indirect
|
||||
golang.org/x/time v0.11.0 // indirect
|
||||
golang.org/x/tools v0.35.0 // indirect
|
||||
go.uber.org/mock v0.6.0 // indirect
|
||||
go.yaml.in/yaml/v2 v2.4.3 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
||||
golang.org/x/crypto v0.44.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20251002181428-27f1f14c8bb9 // indirect
|
||||
golang.org/x/mod v0.30.0 // indirect
|
||||
golang.org/x/net v0.47.0 // indirect
|
||||
golang.org/x/oauth2 v0.32.0 // indirect
|
||||
golang.org/x/sync v0.18.0 // indirect
|
||||
golang.org/x/sys v0.38.0 // indirect
|
||||
golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54 // indirect
|
||||
golang.org/x/term v0.37.0 // indirect
|
||||
golang.org/x/text v0.31.0 // indirect
|
||||
golang.org/x/time v0.14.0 // indirect
|
||||
golang.org/x/tools v0.39.0 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
|
||||
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
|
||||
gonum.org/v1/gonum v0.16.0 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect
|
||||
google.golang.org/grpc v1.74.2 // indirect
|
||||
google.golang.org/protobuf v1.36.6 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250908214217-97024824d090 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20251002232023-7c0ddcbb5797 // indirect
|
||||
google.golang.org/grpc v1.76.0 // indirect
|
||||
google.golang.org/protobuf v1.36.10 // indirect
|
||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
|
||||
gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/mail.v2 v2.3.1 // indirect
|
||||
gopkg.in/src-d/go-errors.v1 v1.0.0 // indirect
|
||||
gopkg.in/telebot.v3 v3.2.1 // indirect
|
||||
gopkg.in/telebot.v3 v3.3.8 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
k8s.io/api v0.33.3 // indirect
|
||||
k8s.io/apiextensions-apiserver v0.33.3 // indirect
|
||||
k8s.io/client-go v0.33.3 // indirect
|
||||
k8s.io/component-base v0.33.3 // indirect
|
||||
k8s.io/api v0.34.2 // indirect
|
||||
k8s.io/apiextensions-apiserver v0.34.2 // indirect
|
||||
k8s.io/client-go v0.34.2 // indirect
|
||||
k8s.io/component-base v0.34.2 // indirect
|
||||
k8s.io/klog/v2 v2.130.1 // indirect
|
||||
k8s.io/utils v0.0.0-20241210054802-24370beab758 // indirect
|
||||
modernc.org/libc v1.65.0 // indirect
|
||||
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect
|
||||
modernc.org/libc v1.66.10 // indirect
|
||||
modernc.org/mathutil v1.7.1 // indirect
|
||||
modernc.org/memory v1.10.0 // indirect
|
||||
modernc.org/sqlite v1.38.0 // indirect
|
||||
modernc.org/memory v1.11.0 // indirect
|
||||
modernc.org/sqlite v1.39.1 // indirect
|
||||
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
|
||||
sigs.k8s.io/randfill v1.0.0 // indirect
|
||||
sigs.k8s.io/yaml v1.5.0 // indirect
|
||||
xorm.io/builder v0.3.6 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
|
||||
sigs.k8s.io/yaml v1.6.0 // indirect
|
||||
xorm.io/builder v0.3.13 // indirect
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,57 +1,49 @@
|
||||
package advisor
|
||||
|
||||
check: {
|
||||
kind: "Check"
|
||||
pluralName: "Checks"
|
||||
current: "v0alpha1"
|
||||
checkv0alpha1: {
|
||||
kind: "Check"
|
||||
plural: "checks"
|
||||
scope: "Namespaced"
|
||||
validation: {
|
||||
operations: [
|
||||
"CREATE",
|
||||
"UPDATE",
|
||||
]
|
||||
}
|
||||
versions: {
|
||||
"v0alpha1": {
|
||||
codegen: {
|
||||
ts: {enabled: false}
|
||||
go: {enabled: true}
|
||||
}
|
||||
schema: {
|
||||
#Data: {
|
||||
// Generic data input that a check can receive
|
||||
data?: [string]: string
|
||||
}
|
||||
#ErrorLink: {
|
||||
// URL to a page with more information about the error
|
||||
url: string
|
||||
// Human readable error message
|
||||
message: string
|
||||
}
|
||||
#ReportFailure: {
|
||||
// Severity of the failure
|
||||
severity: "high" | "low"
|
||||
// Step ID that the failure is associated with
|
||||
stepID: string
|
||||
// Human readable identifier of the item that failed
|
||||
item: string
|
||||
// ID of the item that failed
|
||||
itemID: string
|
||||
// Links to actions that can be taken to resolve the failure
|
||||
links: [...#ErrorLink]
|
||||
// More information about the failure, not meant to be displayed to the user. Used for LLM suggestions.
|
||||
moreInfo?: string
|
||||
}
|
||||
#Report: {
|
||||
// Number of elements analyzed
|
||||
count: int
|
||||
// List of failures
|
||||
failures: [...#ReportFailure]
|
||||
}
|
||||
spec: #Data
|
||||
status: {
|
||||
report: #Report
|
||||
}
|
||||
}
|
||||
schema: {
|
||||
#Data: {
|
||||
// Generic data input that a check can receive
|
||||
data?: [string]: string
|
||||
}
|
||||
#ErrorLink: {
|
||||
// URL to a page with more information about the error
|
||||
url: string
|
||||
// Human readable error message
|
||||
message: string
|
||||
}
|
||||
#ReportFailure: {
|
||||
// Severity of the failure
|
||||
severity: "high" | "low"
|
||||
// Step ID that the failure is associated with
|
||||
stepID: string
|
||||
// Human readable identifier of the item that failed
|
||||
item: string
|
||||
// ID of the item that failed
|
||||
itemID: string
|
||||
// Links to actions that can be taken to resolve the failure
|
||||
links: [...#ErrorLink]
|
||||
// More information about the failure, not meant to be displayed to the user. Used for LLM suggestions.
|
||||
moreInfo?: string
|
||||
}
|
||||
#Report: {
|
||||
// Number of elements analyzed
|
||||
count: int
|
||||
// List of failures
|
||||
failures: [...#ReportFailure]
|
||||
}
|
||||
spec: #Data
|
||||
status: {
|
||||
report: #Report
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,27 +1,19 @@
|
||||
package advisor
|
||||
|
||||
checktype: {
|
||||
kind: "CheckType"
|
||||
pluralName: "CheckTypes"
|
||||
current: "v0alpha1"
|
||||
versions: {
|
||||
"v0alpha1": {
|
||||
codegen: {
|
||||
ts: {enabled: false}
|
||||
go: {enabled: true}
|
||||
}
|
||||
schema: {
|
||||
#Step: {
|
||||
title: string
|
||||
description: string
|
||||
stepID: string
|
||||
resolution: string
|
||||
}
|
||||
spec: {
|
||||
name: string
|
||||
steps: [...#Step]
|
||||
}
|
||||
}
|
||||
checktypev0alpha1: {
|
||||
kind: "CheckType"
|
||||
plural: "checktypes"
|
||||
scope: "Namespaced"
|
||||
schema: {
|
||||
#Step: {
|
||||
title: string
|
||||
description: string
|
||||
stepID: string
|
||||
resolution: string
|
||||
}
|
||||
spec: {
|
||||
name: string
|
||||
steps: [...#Step]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,29 @@
|
||||
package advisor
|
||||
|
||||
manifest: {
|
||||
appName: "advisor"
|
||||
groupOverride: "advisor.grafana.app"
|
||||
kinds: [
|
||||
check,
|
||||
checktype,
|
||||
]
|
||||
appName: "advisor"
|
||||
groupOverride: "advisor.grafana.app"
|
||||
versions: {
|
||||
"v0alpha1": {
|
||||
codegen: {
|
||||
ts: {enabled: false}
|
||||
go: {enabled: true}
|
||||
}
|
||||
kinds: [
|
||||
checkv0alpha1,
|
||||
checktypev0alpha1,
|
||||
]
|
||||
routes: {
|
||||
namespaced: {
|
||||
"/register": {
|
||||
"POST": {
|
||||
response: {
|
||||
message: string
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
99
apps/advisor/pkg/apis/advisor/v0alpha1/check_client_gen.go
generated
Normal file
99
apps/advisor/pkg/apis/advisor/v0alpha1/check_client_gen.go
generated
Normal file
@@ -0,0 +1,99 @@
|
||||
package v0alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/grafana/grafana-app-sdk/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
type CheckClient struct {
|
||||
client *resource.TypedClient[*Check, *CheckList]
|
||||
}
|
||||
|
||||
func NewCheckClient(client resource.Client) *CheckClient {
|
||||
return &CheckClient{
|
||||
client: resource.NewTypedClient[*Check, *CheckList](client, CheckKind()),
|
||||
}
|
||||
}
|
||||
|
||||
func NewCheckClientFromGenerator(generator resource.ClientGenerator) (*CheckClient, error) {
|
||||
c, err := generator.ClientFor(CheckKind())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return NewCheckClient(c), nil
|
||||
}
|
||||
|
||||
func (c *CheckClient) Get(ctx context.Context, identifier resource.Identifier) (*Check, error) {
|
||||
return c.client.Get(ctx, identifier)
|
||||
}
|
||||
|
||||
func (c *CheckClient) List(ctx context.Context, namespace string, opts resource.ListOptions) (*CheckList, error) {
|
||||
return c.client.List(ctx, namespace, opts)
|
||||
}
|
||||
|
||||
func (c *CheckClient) ListAll(ctx context.Context, namespace string, opts resource.ListOptions) (*CheckList, error) {
|
||||
resp, err := c.client.List(ctx, namespace, resource.ListOptions{
|
||||
ResourceVersion: opts.ResourceVersion,
|
||||
Limit: opts.Limit,
|
||||
LabelFilters: opts.LabelFilters,
|
||||
FieldSelectors: opts.FieldSelectors,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for resp.GetContinue() != "" {
|
||||
page, err := c.client.List(ctx, namespace, resource.ListOptions{
|
||||
Continue: resp.GetContinue(),
|
||||
ResourceVersion: opts.ResourceVersion,
|
||||
Limit: opts.Limit,
|
||||
LabelFilters: opts.LabelFilters,
|
||||
FieldSelectors: opts.FieldSelectors,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
resp.SetContinue(page.GetContinue())
|
||||
resp.SetResourceVersion(page.GetResourceVersion())
|
||||
resp.SetItems(append(resp.GetItems(), page.GetItems()...))
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *CheckClient) Create(ctx context.Context, obj *Check, opts resource.CreateOptions) (*Check, error) {
|
||||
// Make sure apiVersion and kind are set
|
||||
obj.APIVersion = GroupVersion.Identifier()
|
||||
obj.Kind = CheckKind().Kind()
|
||||
return c.client.Create(ctx, obj, opts)
|
||||
}
|
||||
|
||||
func (c *CheckClient) Update(ctx context.Context, obj *Check, opts resource.UpdateOptions) (*Check, error) {
|
||||
return c.client.Update(ctx, obj, opts)
|
||||
}
|
||||
|
||||
func (c *CheckClient) Patch(ctx context.Context, identifier resource.Identifier, req resource.PatchRequest, opts resource.PatchOptions) (*Check, error) {
|
||||
return c.client.Patch(ctx, identifier, req, opts)
|
||||
}
|
||||
|
||||
func (c *CheckClient) UpdateStatus(ctx context.Context, identifier resource.Identifier, newStatus CheckStatus, opts resource.UpdateOptions) (*Check, error) {
|
||||
return c.client.Update(ctx, &Check{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: CheckKind().Kind(),
|
||||
APIVersion: GroupVersion.Identifier(),
|
||||
},
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
ResourceVersion: opts.ResourceVersion,
|
||||
Namespace: identifier.Namespace,
|
||||
Name: identifier.Name,
|
||||
},
|
||||
Status: newStatus,
|
||||
}, resource.UpdateOptions{
|
||||
Subresource: "status",
|
||||
ResourceVersion: opts.ResourceVersion,
|
||||
})
|
||||
}
|
||||
|
||||
func (c *CheckClient) Delete(ctx context.Context, identifier resource.Identifier, opts resource.DeleteOptions) error {
|
||||
return c.client.Delete(ctx, identifier, opts)
|
||||
}
|
||||
99
apps/advisor/pkg/apis/advisor/v0alpha1/checktype_client_gen.go
generated
Normal file
99
apps/advisor/pkg/apis/advisor/v0alpha1/checktype_client_gen.go
generated
Normal file
@@ -0,0 +1,99 @@
|
||||
package v0alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/grafana/grafana-app-sdk/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
type CheckTypeClient struct {
|
||||
client *resource.TypedClient[*CheckType, *CheckTypeList]
|
||||
}
|
||||
|
||||
func NewCheckTypeClient(client resource.Client) *CheckTypeClient {
|
||||
return &CheckTypeClient{
|
||||
client: resource.NewTypedClient[*CheckType, *CheckTypeList](client, CheckTypeKind()),
|
||||
}
|
||||
}
|
||||
|
||||
func NewCheckTypeClientFromGenerator(generator resource.ClientGenerator) (*CheckTypeClient, error) {
|
||||
c, err := generator.ClientFor(CheckTypeKind())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return NewCheckTypeClient(c), nil
|
||||
}
|
||||
|
||||
func (c *CheckTypeClient) Get(ctx context.Context, identifier resource.Identifier) (*CheckType, error) {
|
||||
return c.client.Get(ctx, identifier)
|
||||
}
|
||||
|
||||
func (c *CheckTypeClient) List(ctx context.Context, namespace string, opts resource.ListOptions) (*CheckTypeList, error) {
|
||||
return c.client.List(ctx, namespace, opts)
|
||||
}
|
||||
|
||||
func (c *CheckTypeClient) ListAll(ctx context.Context, namespace string, opts resource.ListOptions) (*CheckTypeList, error) {
|
||||
resp, err := c.client.List(ctx, namespace, resource.ListOptions{
|
||||
ResourceVersion: opts.ResourceVersion,
|
||||
Limit: opts.Limit,
|
||||
LabelFilters: opts.LabelFilters,
|
||||
FieldSelectors: opts.FieldSelectors,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for resp.GetContinue() != "" {
|
||||
page, err := c.client.List(ctx, namespace, resource.ListOptions{
|
||||
Continue: resp.GetContinue(),
|
||||
ResourceVersion: opts.ResourceVersion,
|
||||
Limit: opts.Limit,
|
||||
LabelFilters: opts.LabelFilters,
|
||||
FieldSelectors: opts.FieldSelectors,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
resp.SetContinue(page.GetContinue())
|
||||
resp.SetResourceVersion(page.GetResourceVersion())
|
||||
resp.SetItems(append(resp.GetItems(), page.GetItems()...))
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *CheckTypeClient) Create(ctx context.Context, obj *CheckType, opts resource.CreateOptions) (*CheckType, error) {
|
||||
// Make sure apiVersion and kind are set
|
||||
obj.APIVersion = GroupVersion.Identifier()
|
||||
obj.Kind = CheckTypeKind().Kind()
|
||||
return c.client.Create(ctx, obj, opts)
|
||||
}
|
||||
|
||||
func (c *CheckTypeClient) Update(ctx context.Context, obj *CheckType, opts resource.UpdateOptions) (*CheckType, error) {
|
||||
return c.client.Update(ctx, obj, opts)
|
||||
}
|
||||
|
||||
func (c *CheckTypeClient) Patch(ctx context.Context, identifier resource.Identifier, req resource.PatchRequest, opts resource.PatchOptions) (*CheckType, error) {
|
||||
return c.client.Patch(ctx, identifier, req, opts)
|
||||
}
|
||||
|
||||
func (c *CheckTypeClient) UpdateStatus(ctx context.Context, identifier resource.Identifier, newStatus CheckTypeStatus, opts resource.UpdateOptions) (*CheckType, error) {
|
||||
return c.client.Update(ctx, &CheckType{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: CheckTypeKind().Kind(),
|
||||
APIVersion: GroupVersion.Identifier(),
|
||||
},
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
ResourceVersion: opts.ResourceVersion,
|
||||
Namespace: identifier.Namespace,
|
||||
Name: identifier.Name,
|
||||
},
|
||||
Status: newStatus,
|
||||
}, resource.UpdateOptions{
|
||||
Subresource: "status",
|
||||
ResourceVersion: opts.ResourceVersion,
|
||||
})
|
||||
}
|
||||
|
||||
func (c *CheckTypeClient) Delete(ctx context.Context, identifier resource.Identifier, opts resource.DeleteOptions) error {
|
||||
return c.client.Delete(ctx, identifier, opts)
|
||||
}
|
||||
13
apps/advisor/pkg/apis/advisor/v0alpha1/createregister_response_body_types_gen.go
generated
Normal file
13
apps/advisor/pkg/apis/advisor/v0alpha1/createregister_response_body_types_gen.go
generated
Normal file
@@ -0,0 +1,13 @@
|
||||
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
|
||||
|
||||
package v0alpha1
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
type CreateRegisterBody struct {
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
// NewCreateRegisterBody creates a new CreateRegisterBody object.
|
||||
func NewCreateRegisterBody() *CreateRegisterBody {
|
||||
return &CreateRegisterBody{}
|
||||
}
|
||||
37
apps/advisor/pkg/apis/advisor/v0alpha1/createregister_response_object_types_gen.go
generated
Normal file
37
apps/advisor/pkg/apis/advisor/v0alpha1/createregister_response_object_types_gen.go
generated
Normal file
@@ -0,0 +1,37 @@
|
||||
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
|
||||
|
||||
package v0alpha1
|
||||
|
||||
import (
|
||||
"github.com/grafana/grafana-app-sdk/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
type CreateRegister struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
CreateRegisterBody `json:",inline"`
|
||||
}
|
||||
|
||||
func NewCreateRegister() *CreateRegister {
|
||||
return &CreateRegister{}
|
||||
}
|
||||
|
||||
func (t *CreateRegisterBody) DeepCopyInto(dst *CreateRegisterBody) {
|
||||
_ = resource.CopyObjectInto(dst, t)
|
||||
}
|
||||
|
||||
func (o *CreateRegister) DeepCopyObject() runtime.Object {
|
||||
dst := NewCreateRegister()
|
||||
o.DeepCopyInto(dst)
|
||||
return dst
|
||||
}
|
||||
|
||||
func (o *CreateRegister) DeepCopyInto(dst *CreateRegister) {
|
||||
dst.TypeMeta.APIVersion = o.TypeMeta.APIVersion
|
||||
dst.TypeMeta.Kind = o.TypeMeta.Kind
|
||||
o.CreateRegisterBody.DeepCopyInto(&dst.CreateRegisterBody)
|
||||
}
|
||||
|
||||
var _ runtime.Object = NewCreateRegister()
|
||||
112
apps/advisor/pkg/apis/advisor_manifest.go
generated
112
apps/advisor/pkg/apis/advisor_manifest.go
generated
@@ -12,22 +12,26 @@ import (
|
||||
|
||||
"github.com/grafana/grafana-app-sdk/app"
|
||||
"github.com/grafana/grafana-app-sdk/resource"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/kube-openapi/pkg/spec3"
|
||||
"k8s.io/kube-openapi/pkg/validation/spec"
|
||||
|
||||
v0alpha1 "github.com/grafana/grafana/apps/advisor/pkg/apis/advisor/v0alpha1"
|
||||
)
|
||||
|
||||
var (
|
||||
rawSchemaCheckv0alpha1 = []byte(`{"spec":{"properties":{"data":{"additionalProperties":{"type":"string"},"description":"Generic data input that a check can receive","type":"object"}},"type":"object"},"status":{"properties":{"additionalFields":{"description":"additionalFields is reserved for future use","type":"object","x-kubernetes-preserve-unknown-fields":true},"operatorStates":{"additionalProperties":{"properties":{"descriptiveState":{"description":"descriptiveState is an optional more descriptive state field which has no requirements on format","type":"string"},"details":{"description":"details contains any extra information that is operator-specific","type":"object","x-kubernetes-preserve-unknown-fields":true},"lastEvaluation":{"description":"lastEvaluation is the ResourceVersion last evaluated","type":"string"},"state":{"description":"state describes the state of the lastEvaluation.\nIt is limited to three possible states for machine evaluation.","enum":["success","in_progress","failed"],"type":"string"}},"required":["lastEvaluation","state"],"type":"object"},"description":"operatorStates is a map of operator ID to operator state evaluations.\nAny operator which consumes this kind SHOULD add its state evaluation information to this field.","type":"object"},"report":{"properties":{"count":{"description":"Number of elements analyzed","type":"integer"},"failures":{"description":"List of failures","items":{"properties":{"item":{"description":"Human readable identifier of the item that failed","type":"string"},"itemID":{"description":"ID of the item that failed","type":"string"},"links":{"description":"Links to actions that can be taken to resolve the failure","items":{"properties":{"message":{"description":"Human readable error message","type":"string"},"url":{"description":"URL to a page with more information about the error","type":"string"}},"required":["url","message"],"type":"object"},"type":"array"},"moreInfo":{"description":"More information about the failure, not meant to be displayed to the user. Used for LLM suggestions.","type":"string"},"severity":{"description":"Severity of the failure","enum":["high","low"],"type":"string"},"stepID":{"description":"Step ID that the failure is associated with","type":"string"}},"required":["severity","stepID","item","itemID","links"],"type":"object"},"type":"array"}},"required":["count","failures"],"type":"object"}},"required":["report"],"type":"object"}}`)
|
||||
rawSchemaCheckv0alpha1 = []byte(`{"Check":{"properties":{"spec":{"$ref":"#/components/schemas/spec"},"status":{"$ref":"#/components/schemas/status"}},"required":["spec"]},"ErrorLink":{"additionalProperties":false,"properties":{"message":{"description":"Human readable error message","type":"string"},"url":{"description":"URL to a page with more information about the error","type":"string"}},"required":["url","message"],"type":"object"},"OperatorState":{"additionalProperties":false,"properties":{"descriptiveState":{"description":"descriptiveState is an optional more descriptive state field which has no requirements on format","type":"string"},"details":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"details contains any extra information that is operator-specific","type":"object"},"lastEvaluation":{"description":"lastEvaluation is the ResourceVersion last evaluated","type":"string"},"state":{"description":"state describes the state of the lastEvaluation.\nIt is limited to three possible states for machine evaluation.","enum":["success","in_progress","failed"],"type":"string"}},"required":["lastEvaluation","state"],"type":"object"},"Report":{"additionalProperties":false,"properties":{"count":{"description":"Number of elements analyzed","type":"integer"},"failures":{"description":"List of failures","items":{"$ref":"#/components/schemas/ReportFailure"},"type":"array"}},"required":["count","failures"],"type":"object"},"ReportFailure":{"additionalProperties":false,"properties":{"item":{"description":"Human readable identifier of the item that failed","type":"string"},"itemID":{"description":"ID of the item that failed","type":"string"},"links":{"description":"Links to actions that can be taken to resolve the failure","items":{"$ref":"#/components/schemas/ErrorLink"},"type":"array"},"moreInfo":{"description":"More information about the failure, not meant to be displayed to the user. Used for LLM suggestions.","type":"string"},"severity":{"description":"Severity of the failure","enum":["high","low"],"type":"string"},"stepID":{"description":"Step ID that the failure is associated with","type":"string"}},"required":["severity","stepID","item","itemID","links"],"type":"object"},"spec":{"additionalProperties":false,"properties":{"data":{"additionalProperties":{"type":"string"},"description":"Generic data input that a check can receive","type":"object"}},"type":"object"},"status":{"additionalProperties":false,"properties":{"additionalFields":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"additionalFields is reserved for future use","type":"object"},"operatorStates":{"additionalProperties":{"$ref":"#/components/schemas/OperatorState"},"description":"operatorStates is a map of operator ID to operator state evaluations.\nAny operator which consumes this kind SHOULD add its state evaluation information to this field.","type":"object"},"report":{"$ref":"#/components/schemas/Report"}},"required":["report"],"type":"object"}}`)
|
||||
versionSchemaCheckv0alpha1 app.VersionSchema
|
||||
_ = json.Unmarshal(rawSchemaCheckv0alpha1, &versionSchemaCheckv0alpha1)
|
||||
rawSchemaCheckTypev0alpha1 = []byte(`{"spec":{"properties":{"name":{"type":"string"},"steps":{"items":{"properties":{"description":{"type":"string"},"resolution":{"type":"string"},"stepID":{"type":"string"},"title":{"type":"string"}},"required":["title","description","stepID","resolution"],"type":"object"},"type":"array"}},"required":["name","steps"],"type":"object"},"status":{"properties":{"additionalFields":{"description":"additionalFields is reserved for future use","type":"object","x-kubernetes-preserve-unknown-fields":true},"operatorStates":{"additionalProperties":{"properties":{"descriptiveState":{"description":"descriptiveState is an optional more descriptive state field which has no requirements on format","type":"string"},"details":{"description":"details contains any extra information that is operator-specific","type":"object","x-kubernetes-preserve-unknown-fields":true},"lastEvaluation":{"description":"lastEvaluation is the ResourceVersion last evaluated","type":"string"},"state":{"description":"state describes the state of the lastEvaluation.\nIt is limited to three possible states for machine evaluation.","enum":["success","in_progress","failed"],"type":"string"}},"required":["lastEvaluation","state"],"type":"object"},"description":"operatorStates is a map of operator ID to operator state evaluations.\nAny operator which consumes this kind SHOULD add its state evaluation information to this field.","type":"object"}},"type":"object"}}`)
|
||||
rawSchemaCheckTypev0alpha1 = []byte(`{"CheckType":{"properties":{"spec":{"$ref":"#/components/schemas/spec"},"status":{"$ref":"#/components/schemas/status"}},"required":["spec"]},"OperatorState":{"additionalProperties":false,"properties":{"descriptiveState":{"description":"descriptiveState is an optional more descriptive state field which has no requirements on format","type":"string"},"details":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"details contains any extra information that is operator-specific","type":"object"},"lastEvaluation":{"description":"lastEvaluation is the ResourceVersion last evaluated","type":"string"},"state":{"description":"state describes the state of the lastEvaluation.\nIt is limited to three possible states for machine evaluation.","enum":["success","in_progress","failed"],"type":"string"}},"required":["lastEvaluation","state"],"type":"object"},"Step":{"additionalProperties":false,"properties":{"description":{"type":"string"},"resolution":{"type":"string"},"stepID":{"type":"string"},"title":{"type":"string"}},"required":["title","description","stepID","resolution"],"type":"object"},"spec":{"additionalProperties":false,"properties":{"name":{"type":"string"},"steps":{"items":{"$ref":"#/components/schemas/Step"},"type":"array"}},"required":["name","steps"],"type":"object"},"status":{"additionalProperties":false,"properties":{"additionalFields":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"additionalFields is reserved for future use","type":"object"},"operatorStates":{"additionalProperties":{"$ref":"#/components/schemas/OperatorState"},"description":"operatorStates is a map of operator ID to operator state evaluations.\nAny operator which consumes this kind SHOULD add its state evaluation information to this field.","type":"object"}},"type":"object"}}`)
|
||||
versionSchemaCheckTypev0alpha1 app.VersionSchema
|
||||
_ = json.Unmarshal(rawSchemaCheckTypev0alpha1, &versionSchemaCheckTypev0alpha1)
|
||||
)
|
||||
|
||||
var appManifestData = app.ManifestData{
|
||||
AppName: "advisor",
|
||||
Group: "advisor.grafana.app",
|
||||
AppName: "advisor",
|
||||
Group: "advisor.grafana.app",
|
||||
PreferredVersion: "v0alpha1",
|
||||
Versions: []app.ManifestVersion{
|
||||
{
|
||||
Name: "v0alpha1",
|
||||
@@ -57,6 +61,62 @@ var appManifestData = app.ManifestData{
|
||||
Schema: &versionSchemaCheckTypev0alpha1,
|
||||
},
|
||||
},
|
||||
Routes: app.ManifestVersionRoutes{
|
||||
Namespaced: map[string]spec3.PathProps{
|
||||
"/register": {
|
||||
Post: &spec3.Operation{
|
||||
OperationProps: spec3.OperationProps{
|
||||
|
||||
OperationId: "createRegister",
|
||||
|
||||
Responses: &spec3.Responses{
|
||||
ResponsesProps: spec3.ResponsesProps{
|
||||
Default: &spec3.Response{
|
||||
ResponseProps: spec3.ResponseProps{
|
||||
Description: "Default OK response",
|
||||
Content: map[string]*spec3.MediaType{
|
||||
"application/json": {
|
||||
MediaTypeProps: spec3.MediaTypeProps{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"apiVersion": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"string"},
|
||||
Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
|
||||
},
|
||||
},
|
||||
"kind": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"string"},
|
||||
Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
||||
},
|
||||
},
|
||||
"message": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"string"},
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{
|
||||
"message",
|
||||
"apiVersion",
|
||||
"kind",
|
||||
},
|
||||
}},
|
||||
}},
|
||||
},
|
||||
},
|
||||
},
|
||||
}},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Cluster: map[string]spec3.PathProps{},
|
||||
Schemas: map[string]spec.Schema{},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -81,11 +141,14 @@ func ManifestGoTypeAssociator(kind, version string) (goType resource.Kind, exist
|
||||
return goType, exists
|
||||
}
|
||||
|
||||
var customRouteToGoResponseType = map[string]any{}
|
||||
var customRouteToGoResponseType = map[string]any{
|
||||
"v0alpha1||<namespace>/register|POST": v0alpha1.CreateRegister{},
|
||||
}
|
||||
|
||||
// ManifestCustomRouteResponsesAssociator returns the associated response go type for a given kind, version, custom route path, and method, if one exists.
|
||||
// kind may be empty for custom routes which are not kind subroutes. Leading slashes are removed from subroute paths.
|
||||
// If there is no association for the provided kind, version, custom route path, and method, exists will return false.
|
||||
// Resource routes (those without a kind) should prefix their route with "<namespace>/" if the route is namespaced (otherwise the route is assumed to be cluster-scope)
|
||||
func ManifestCustomRouteResponsesAssociator(kind, version, path, verb string) (goType any, exists bool) {
|
||||
if len(path) > 0 && path[0] == '/' {
|
||||
path = path[1:]
|
||||
@@ -93,3 +156,42 @@ func ManifestCustomRouteResponsesAssociator(kind, version, path, verb string) (g
|
||||
goType, exists = customRouteToGoResponseType[fmt.Sprintf("%s|%s|%s|%s", version, kind, path, strings.ToUpper(verb))]
|
||||
return goType, exists
|
||||
}
|
||||
|
||||
var customRouteToGoParamsType = map[string]runtime.Object{}
|
||||
|
||||
func ManifestCustomRouteQueryAssociator(kind, version, path, verb string) (goType runtime.Object, exists bool) {
|
||||
if len(path) > 0 && path[0] == '/' {
|
||||
path = path[1:]
|
||||
}
|
||||
goType, exists = customRouteToGoParamsType[fmt.Sprintf("%s|%s|%s|%s", version, kind, path, strings.ToUpper(verb))]
|
||||
return goType, exists
|
||||
}
|
||||
|
||||
var customRouteToGoRequestBodyType = map[string]any{}
|
||||
|
||||
func ManifestCustomRouteRequestBodyAssociator(kind, version, path, verb string) (goType any, exists bool) {
|
||||
if len(path) > 0 && path[0] == '/' {
|
||||
path = path[1:]
|
||||
}
|
||||
goType, exists = customRouteToGoRequestBodyType[fmt.Sprintf("%s|%s|%s|%s", version, kind, path, strings.ToUpper(verb))]
|
||||
return goType, exists
|
||||
}
|
||||
|
||||
type GoTypeAssociator struct{}
|
||||
|
||||
func NewGoTypeAssociator() *GoTypeAssociator {
|
||||
return &GoTypeAssociator{}
|
||||
}
|
||||
|
||||
func (g *GoTypeAssociator) KindToGoType(kind, version string) (goType resource.Kind, exists bool) {
|
||||
return ManifestGoTypeAssociator(kind, version)
|
||||
}
|
||||
func (g *GoTypeAssociator) CustomRouteReturnGoType(kind, version, path, verb string) (goType any, exists bool) {
|
||||
return ManifestCustomRouteResponsesAssociator(kind, version, path, verb)
|
||||
}
|
||||
func (g *GoTypeAssociator) CustomRouteQueryGoType(kind, version, path, verb string) (goType runtime.Object, exists bool) {
|
||||
return ManifestCustomRouteQueryAssociator(kind, version, path, verb)
|
||||
}
|
||||
func (g *GoTypeAssociator) CustomRouteRequestBodyGoType(kind, version, path, verb string) (goType any, exists bool) {
|
||||
return ManifestCustomRouteRequestBodyAssociator(kind, version, path, verb)
|
||||
}
|
||||
|
||||
@@ -2,7 +2,9 @@ package app
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/grafana/grafana-app-sdk/app"
|
||||
"github.com/grafana/grafana-app-sdk/k8s"
|
||||
@@ -16,10 +18,15 @@ import (
|
||||
"github.com/grafana/grafana/apps/advisor/pkg/app/checkscheduler"
|
||||
"github.com/grafana/grafana/apps/advisor/pkg/app/checktyperegisterer"
|
||||
"github.com/grafana/grafana/pkg/apimachinery/identity"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
)
|
||||
|
||||
func New(cfg app.Config) (app.App, error) {
|
||||
// Needed until https://github.com/grafana/grafana-app-sdk/pull/1077
|
||||
if cfg.KubeConfig.APIPath == "" {
|
||||
cfg.KubeConfig.APIPath = "apis"
|
||||
}
|
||||
// Read config
|
||||
specificConfig, ok := cfg.SpecificConfig.(checkregistry.AdvisorAppConfig)
|
||||
if !ok {
|
||||
@@ -45,6 +52,16 @@ func New(cfg app.Config) (app.App, error) {
|
||||
checkMap[c.ID()] = c
|
||||
}
|
||||
|
||||
ctr, err := checktyperegisterer.New(cfg, log)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
csch, err := checkscheduler.New(cfg, log)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
simpleConfig := simple.AppConfig{
|
||||
Name: "advisor",
|
||||
KubeConfig: cfg.KubeConfig,
|
||||
@@ -106,6 +123,37 @@ func New(cfg app.Config) (app.App, error) {
|
||||
Kind: advisorv0alpha1.CheckTypeKind(),
|
||||
},
|
||||
},
|
||||
VersionedCustomRoutes: map[string]simple.AppVersionRouteHandlers{
|
||||
"v0alpha1": {
|
||||
{
|
||||
Namespaced: true,
|
||||
Path: "register",
|
||||
Method: "POST",
|
||||
}: func(ctx context.Context, w app.CustomRouteResponseWriter, req *app.CustomRouteRequest) error {
|
||||
logger := log.WithContext(ctx)
|
||||
namespace := req.ResourceIdentifier.Namespace
|
||||
|
||||
// Register check types for the namespace
|
||||
err := ctr.RegisterCheckTypesInNamespace(ctx, logger, namespace)
|
||||
if err != nil {
|
||||
logger.Error("Failed to register check types", "namespace", namespace, "error", err)
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
_ = json.NewEncoder(w).Encode(map[string]string{"error": err.Error()})
|
||||
return err
|
||||
}
|
||||
|
||||
// Return typed response matching the manifest
|
||||
return json.NewEncoder(w).Encode(advisorv0alpha1.CreateRegister{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
APIVersion: fmt.Sprintf("%s/%s", advisorv0alpha1.APIGroup, advisorv0alpha1.APIVersion),
|
||||
},
|
||||
CreateRegisterBody: advisorv0alpha1.CreateRegisterBody{
|
||||
Message: "Check types registered successfully",
|
||||
},
|
||||
})
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
a, err := simple.NewApp(simpleConfig)
|
||||
@@ -119,17 +167,9 @@ func New(cfg app.Config) (app.App, error) {
|
||||
}
|
||||
|
||||
// Save check types as resources
|
||||
ctr, err := checktyperegisterer.New(cfg, log)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
a.AddRunnable(ctr)
|
||||
|
||||
// Start scheduler
|
||||
csch, err := checkscheduler.New(cfg, log)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
a.AddRunnable(csch)
|
||||
|
||||
return a, nil
|
||||
|
||||
@@ -3,6 +3,7 @@ package app
|
||||
import (
|
||||
"context"
|
||||
|
||||
claims "github.com/grafana/authlib/types"
|
||||
"github.com/grafana/grafana/pkg/apimachinery/identity"
|
||||
"k8s.io/apiserver/pkg/authorization/authorizer"
|
||||
)
|
||||
@@ -15,7 +16,22 @@ func GetAuthorizer() authorizer.Authorizer {
|
||||
return authorizer.DecisionNoOpinion, "", nil
|
||||
}
|
||||
|
||||
// require a user
|
||||
// Check for service identity
|
||||
if identity.IsServiceIdentity(ctx) {
|
||||
return authorizer.DecisionAllow, "", nil
|
||||
}
|
||||
|
||||
// Check for access policy identity
|
||||
info, ok := claims.AuthInfoFrom(ctx)
|
||||
if ok && claims.IsIdentityType(info.GetIdentityType(), claims.TypeAccessPolicy) {
|
||||
// For access policy identities, we need to use ResourceAuthorizer
|
||||
// This requires an AccessClient, which should be provided by the API server
|
||||
// For now, we'll use the default ResourceAuthorizer from the API server
|
||||
// This will be set up by the API server's authorization chain
|
||||
return authorizer.DecisionNoOpinion, "", nil
|
||||
}
|
||||
|
||||
// For regular Grafana users, check if they are admin
|
||||
u, err := identity.GetRequester(ctx)
|
||||
if err != nil {
|
||||
return authorizer.DecisionDeny, "valid user is required", err
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
claims "github.com/grafana/authlib/types"
|
||||
"github.com/grafana/grafana/pkg/apimachinery/identity"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"k8s.io/apiserver/pkg/authorization/authorizer"
|
||||
@@ -79,4 +80,12 @@ func (m *mockUser) HasRole(role identity.RoleType) bool {
|
||||
return role == identity.RoleAdmin && m.isGrafanaAdmin
|
||||
}
|
||||
|
||||
func (m *mockUser) GetUID() string {
|
||||
return "test-uid"
|
||||
}
|
||||
|
||||
func (m *mockUser) GetIdentityType() claims.IdentityType {
|
||||
return claims.TypeUser
|
||||
}
|
||||
|
||||
// Implement other methods of identity.Requester as needed
|
||||
|
||||
@@ -26,7 +26,7 @@ const (
|
||||
type check struct {
|
||||
DatasourceSvc datasources.DataSourceService
|
||||
PluginStore pluginstore.Store
|
||||
PluginContextProvider pluginContextProvider
|
||||
PluginContextProvider PluginContextProvider
|
||||
PluginClient plugins.Client
|
||||
PluginRepo repo.Service
|
||||
GrafanaVersion string
|
||||
@@ -37,7 +37,7 @@ type check struct {
|
||||
func New(
|
||||
datasourceSvc datasources.DataSourceService,
|
||||
pluginStore pluginstore.Store,
|
||||
pluginContextProvider pluginContextProvider,
|
||||
pluginContextProvider PluginContextProvider,
|
||||
pluginClient plugins.Client,
|
||||
pluginRepo repo.Service,
|
||||
grafanaVersion string,
|
||||
@@ -168,6 +168,6 @@ func (c *check) canBeInstalled(ctx context.Context, pluginType string) (bool, er
|
||||
return isAvailableInRepo, nil
|
||||
}
|
||||
|
||||
type pluginContextProvider interface {
|
||||
type PluginContextProvider interface {
|
||||
GetWithDataSource(ctx context.Context, pluginID string, user identity.Requester, ds *datasources.DataSource) (backend.PluginContext, error)
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
)
|
||||
|
||||
type healthCheckStep struct {
|
||||
PluginContextProvider pluginContextProvider
|
||||
PluginContextProvider PluginContextProvider
|
||||
PluginClient plugins.Client
|
||||
}
|
||||
|
||||
|
||||
@@ -86,6 +86,11 @@ func New(cfg app.Config, log logging.Logger) (app.Runnable, error) {
|
||||
|
||||
func (r *Runner) Run(ctx context.Context) error {
|
||||
logger := r.log.WithContext(ctx)
|
||||
if r.stackID == "" && r.orgService == nil {
|
||||
logger.Debug("Check scheduler disabled")
|
||||
return nil
|
||||
}
|
||||
|
||||
// We still need the context to eventually be cancelled to exit this function
|
||||
// but we don't want the requests to fail because of it
|
||||
ctxWithoutCancel := context.WithoutCancel(ctx)
|
||||
|
||||
@@ -34,8 +34,10 @@ type Runner struct {
|
||||
retryDelay time.Duration
|
||||
}
|
||||
|
||||
var _ app.Runnable = (*Runner)(nil)
|
||||
|
||||
// NewRunner creates a new Runner.
|
||||
func New(cfg app.Config, log logging.Logger) (app.Runnable, error) {
|
||||
func New(cfg app.Config, log logging.Logger) (*Runner, error) {
|
||||
// Read config
|
||||
specificConfig, ok := cfg.SpecificConfig.(checkregistry.AdvisorAppConfig)
|
||||
if !ok {
|
||||
@@ -64,6 +66,11 @@ func New(cfg app.Config, log logging.Logger) (app.Runnable, error) {
|
||||
|
||||
func (r *Runner) Run(ctx context.Context) error {
|
||||
logger := r.log.WithContext(ctx)
|
||||
// If stackID is empty and OrgService is nil, do nothing (on-demand registration only)
|
||||
if r.stackID == "" && r.orgService == nil {
|
||||
logger.Debug("Auto-registration of checktypes disabled")
|
||||
return nil
|
||||
}
|
||||
|
||||
// Determine namespaces based on StackID or OrgID
|
||||
namespaces, err := checks.GetNamespaces(ctx, r.stackID, r.orgService)
|
||||
@@ -74,37 +81,9 @@ func (r *Runner) Run(ctx context.Context) error {
|
||||
|
||||
// Register check types in each namespace
|
||||
for _, namespace := range namespaces {
|
||||
for _, t := range r.checkRegistry.Checks() {
|
||||
steps := t.Steps()
|
||||
stepTypes := make([]advisorv0alpha1.CheckTypeStep, len(steps))
|
||||
for i, s := range steps {
|
||||
stepTypes[i] = advisorv0alpha1.CheckTypeStep{
|
||||
Title: s.Title(),
|
||||
Description: s.Description(),
|
||||
StepID: s.ID(),
|
||||
Resolution: s.Resolution(),
|
||||
}
|
||||
}
|
||||
obj := &advisorv0alpha1.CheckType{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: t.ID(),
|
||||
Namespace: namespace,
|
||||
Annotations: map[string]string{
|
||||
checks.NameAnnotation: t.Name(),
|
||||
// Flag to indicate feature availability
|
||||
checks.RetryAnnotation: "1",
|
||||
checks.IgnoreStepsAnnotation: "1",
|
||||
},
|
||||
},
|
||||
Spec: advisorv0alpha1.CheckTypeSpec{
|
||||
Name: t.ID(),
|
||||
Steps: stepTypes,
|
||||
},
|
||||
}
|
||||
err := r.registerCheckType(ctx, logger, t.ID(), obj)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err := r.RegisterCheckTypesInNamespace(ctx, logger, namespace)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to register check types in namespace %s: %w", namespace, err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
@@ -238,3 +217,38 @@ func isAPIServerShuttingDown(err error, logger logging.Logger) bool {
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (r *Runner) RegisterCheckTypesInNamespace(ctx context.Context, logger logging.Logger, namespace string) error {
|
||||
for _, t := range r.checkRegistry.Checks() {
|
||||
steps := t.Steps()
|
||||
stepTypes := make([]advisorv0alpha1.CheckTypeStep, len(steps))
|
||||
for i, s := range steps {
|
||||
stepTypes[i] = advisorv0alpha1.CheckTypeStep{
|
||||
Title: s.Title(),
|
||||
Description: s.Description(),
|
||||
StepID: s.ID(),
|
||||
Resolution: s.Resolution(),
|
||||
}
|
||||
}
|
||||
obj := &advisorv0alpha1.CheckType{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: t.ID(),
|
||||
Namespace: namespace,
|
||||
Annotations: map[string]string{
|
||||
checks.NameAnnotation: t.Name(),
|
||||
// Flag to indicate feature availability
|
||||
checks.RetryAnnotation: "1",
|
||||
checks.IgnoreStepsAnnotation: "1",
|
||||
},
|
||||
},
|
||||
Spec: advisorv0alpha1.CheckTypeSpec{
|
||||
Name: t.ID(),
|
||||
Steps: stepTypes,
|
||||
},
|
||||
}
|
||||
if err := r.registerCheckType(ctx, logger, t.ID(), obj); err != nil {
|
||||
return fmt.Errorf("failed to register check type %s: %w", t.ID(), err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -3,9 +3,9 @@ module github.com/grafana/grafana/apps/alerting/alertenrichment
|
||||
go 1.25.3
|
||||
|
||||
require (
|
||||
github.com/grafana/grafana-app-sdk v0.47.0
|
||||
github.com/grafana/grafana-app-sdk v0.48.2
|
||||
github.com/grafana/grafana/pkg/apimachinery v0.0.0-20250901080157-a0280d701b28
|
||||
k8s.io/apimachinery v0.34.1
|
||||
k8s.io/apimachinery v0.34.2
|
||||
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912
|
||||
)
|
||||
|
||||
@@ -27,8 +27,8 @@ require (
|
||||
github.com/x448/float16 v0.8.4 // indirect
|
||||
go.yaml.in/yaml/v2 v2.4.3 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
||||
golang.org/x/net v0.45.0 // indirect
|
||||
golang.org/x/text v0.30.0 // indirect
|
||||
golang.org/x/net v0.47.0 // indirect
|
||||
golang.org/x/text v0.31.0 // indirect
|
||||
google.golang.org/protobuf v1.36.10 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
|
||||
@@ -23,8 +23,8 @@ github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7O
|
||||
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/grafana/grafana-app-sdk v0.47.0 h1:zTKV+p6zM9y+In+dAcaHczbJJsQj9WKglSBcQXMOA+8=
|
||||
github.com/grafana/grafana-app-sdk v0.47.0/go.mod h1:kywXmkppq0oReUMzkjTW8Fq2EBzyN7v914jttTWnWxA=
|
||||
github.com/grafana/grafana-app-sdk v0.48.2 h1:CQQDhwo1fWaXQVKvxxOcK6azbuY3E2TgJHNAZlYYn7U=
|
||||
github.com/grafana/grafana-app-sdk v0.48.2/go.mod h1:LDOvQ7OOyHLcXdSa0InATCa5OMoYAd6E1+rGLrMgHuk=
|
||||
github.com/grafana/grafana/pkg/apimachinery v0.0.0-20250901080157-a0280d701b28 h1:PgMfX4OPENz/iXmtDDIW9+poZY4UD0hhmXm7flVclDo=
|
||||
github.com/grafana/grafana/pkg/apimachinery v0.0.0-20250901080157-a0280d701b28/go.mod h1:av5N0Naq+8VV9MLF7zAkihy/mVq5UbS2EvRSJukDHlY=
|
||||
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
|
||||
@@ -73,8 +73,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.45.0 h1:RLBg5JKixCy82FtLJpeNlVM0nrSqpCRYzVU1n8kj0tM=
|
||||
golang.org/x/net v0.45.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY=
|
||||
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
|
||||
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
@@ -83,8 +83,8 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k=
|
||||
golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM=
|
||||
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
|
||||
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
@@ -102,8 +102,8 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
|
||||
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
k8s.io/apimachinery v0.34.1 h1:dTlxFls/eikpJxmAC7MVE8oOeP1zryV7iRyIjB0gky4=
|
||||
k8s.io/apimachinery v0.34.1/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw=
|
||||
k8s.io/apimachinery v0.34.2 h1:zQ12Uk3eMHPxrsbUJgNF8bTauTVR2WgqJsTmwTE/NW4=
|
||||
k8s.io/apimachinery v0.34.2/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw=
|
||||
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
|
||||
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
|
||||
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZcmKS3g6CthxToOb37KgwE=
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
include ../../sdk.mk
|
||||
|
||||
.PHONY: generate
|
||||
generate: do-generate ## Run Grafana App SDK code generation
|
||||
|
||||
.PHONY: do-generate
|
||||
do-generate: install-app-sdk update-app-sdk
|
||||
@$(APP_SDK_BIN) generate --grouping=group --gogenpath=./pkg/apis --defencoding=yaml --postprocess
|
||||
.PHONY: generate # Run Grafana App SDK code generation
|
||||
generate: install-app-sdk update-app-sdk
|
||||
@$(APP_SDK_BIN) generate \
|
||||
--source=./kinds/ \
|
||||
--gogenpath=./pkg/apis \
|
||||
--grouping=group \
|
||||
--genoperatorstate=false \
|
||||
--defencoding=none
|
||||
|
||||
@@ -3,10 +3,10 @@ module github.com/grafana/grafana/apps/alerting/notifications
|
||||
go 1.25.3
|
||||
|
||||
require (
|
||||
github.com/grafana/grafana-app-sdk v0.47.0
|
||||
github.com/grafana/grafana-app-sdk/logging v0.46.0
|
||||
k8s.io/apimachinery v0.34.1
|
||||
k8s.io/apiserver v0.34.1
|
||||
github.com/grafana/grafana-app-sdk v0.48.2
|
||||
github.com/grafana/grafana-app-sdk/logging v0.48.1
|
||||
k8s.io/apimachinery v0.34.2
|
||||
k8s.io/apiserver v0.34.2
|
||||
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912
|
||||
)
|
||||
|
||||
@@ -84,13 +84,13 @@ require (
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
go.yaml.in/yaml/v2 v2.4.3 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
||||
golang.org/x/net v0.45.0 // indirect
|
||||
golang.org/x/net v0.47.0 // indirect
|
||||
golang.org/x/oauth2 v0.32.0 // indirect
|
||||
golang.org/x/sync v0.17.0 // indirect
|
||||
golang.org/x/sys v0.37.0 // indirect
|
||||
golang.org/x/term v0.35.0 // indirect
|
||||
golang.org/x/text v0.30.0 // indirect
|
||||
golang.org/x/time v0.13.0 // indirect
|
||||
golang.org/x/sync v0.18.0 // indirect
|
||||
golang.org/x/sys v0.38.0 // indirect
|
||||
golang.org/x/term v0.37.0 // indirect
|
||||
golang.org/x/text v0.31.0 // indirect
|
||||
golang.org/x/time v0.14.0 // indirect
|
||||
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250908214217-97024824d090 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20251002232023-7c0ddcbb5797 // indirect
|
||||
@@ -99,10 +99,10 @@ require (
|
||||
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
k8s.io/api v0.34.1 // indirect
|
||||
k8s.io/apiextensions-apiserver v0.34.1 // indirect
|
||||
k8s.io/client-go v0.34.1 // indirect
|
||||
k8s.io/component-base v0.34.1 // indirect
|
||||
k8s.io/api v0.34.2 // indirect
|
||||
k8s.io/apiextensions-apiserver v0.34.2 // indirect
|
||||
k8s.io/client-go v0.34.2 // indirect
|
||||
k8s.io/component-base v0.34.2 // indirect
|
||||
k8s.io/klog/v2 v2.130.1 // indirect
|
||||
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect
|
||||
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 // indirect
|
||||
|
||||
@@ -71,10 +71,10 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo=
|
||||
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA=
|
||||
github.com/grafana/grafana-app-sdk v0.47.0 h1:zTKV+p6zM9y+In+dAcaHczbJJsQj9WKglSBcQXMOA+8=
|
||||
github.com/grafana/grafana-app-sdk v0.47.0/go.mod h1:kywXmkppq0oReUMzkjTW8Fq2EBzyN7v914jttTWnWxA=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.46.0 h1:JhQ+ZK5orcmM+dZ3YZdT9uCizJEFU2I6JBNUSFWvCC8=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.46.0/go.mod h1:Gh/nBWnspK3oDNWtiM5qUF/fardHzOIEez+SPI3JeHA=
|
||||
github.com/grafana/grafana-app-sdk v0.48.2 h1:CQQDhwo1fWaXQVKvxxOcK6azbuY3E2TgJHNAZlYYn7U=
|
||||
github.com/grafana/grafana-app-sdk v0.48.2/go.mod h1:LDOvQ7OOyHLcXdSa0InATCa5OMoYAd6E1+rGLrMgHuk=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.48.1 h1:veM0X5LAPyN3KsDLglWjIofndbGuf7MqnrDuDN+F/Ng=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.48.1/go.mod h1:Gh/nBWnspK3oDNWtiM5qUF/fardHzOIEez+SPI3JeHA=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.1.0 h1:QGLs/O40yoNK9vmy4rhUGBVyMf1lISBGtXRpsu/Qu/o=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.1.0/go.mod h1:hM2alZsMUni80N33RBe6J0e423LB+odMj7d3EMP9l20=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.2 h1:sGm2vDRFUrQJO/Veii4h4zG2vvqG6uWNkBHSTqXOZk0=
|
||||
@@ -224,8 +224,8 @@ go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI=
|
||||
golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8=
|
||||
golang.org/x/crypto v0.44.0 h1:A97SsFvM3AIwEEmTBiaxPPTYpDC47w720rdiiUvgoAU=
|
||||
golang.org/x/crypto v0.44.0/go.mod h1:013i+Nw79BMiQiMsOPcVCB5ZIJbYkerPrGnOa00tvmc=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
@@ -236,8 +236,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.45.0 h1:RLBg5JKixCy82FtLJpeNlVM0nrSqpCRYzVU1n8kj0tM=
|
||||
golang.org/x/net v0.45.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY=
|
||||
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
|
||||
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.32.0 h1:jsCblLleRMDrxMN29H3z/k1KliIvpLgCkE6R8FXXNgY=
|
||||
golang.org/x/oauth2 v0.32.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA=
|
||||
@@ -246,29 +246,29 @@ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
|
||||
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
||||
golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
|
||||
golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
|
||||
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||
golang.org/x/term v0.35.0 h1:bZBVKBudEyhRcajGcNc3jIfWPqV4y/Kt2XcoigOWtDQ=
|
||||
golang.org/x/term v0.35.0/go.mod h1:TPGtkTLesOwf2DE8CgVYiZinHAOuy5AYUYT1lENIZnA=
|
||||
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
|
||||
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||
golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU=
|
||||
golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k=
|
||||
golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM=
|
||||
golang.org/x/time v0.13.0 h1:eUlYslOIt32DgYD6utsuUeHs4d7AsEYLuIAdg7FlYgI=
|
||||
golang.org/x/time v0.13.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4=
|
||||
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
|
||||
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
|
||||
golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI=
|
||||
golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4=
|
||||
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE=
|
||||
golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w=
|
||||
golang.org/x/tools v0.39.0 h1:ik4ho21kwuQln40uelmciQPp9SipgNDdrafrYA4TmQQ=
|
||||
golang.org/x/tools v0.39.0/go.mod h1:JnefbkDPyD8UU2kI5fuf8ZX4/yUeh9W877ZeBONxUqQ=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
@@ -300,18 +300,18 @@ gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYs
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
k8s.io/api v0.34.1 h1:jC+153630BMdlFukegoEL8E/yT7aLyQkIVuwhmwDgJM=
|
||||
k8s.io/api v0.34.1/go.mod h1:SB80FxFtXn5/gwzCoN6QCtPD7Vbu5w2n1S0J5gFfTYk=
|
||||
k8s.io/apiextensions-apiserver v0.34.1 h1:NNPBva8FNAPt1iSVwIE0FsdrVriRXMsaWFMqJbII2CI=
|
||||
k8s.io/apiextensions-apiserver v0.34.1/go.mod h1:hP9Rld3zF5Ay2Of3BeEpLAToP+l4s5UlxiHfqRaRcMc=
|
||||
k8s.io/apimachinery v0.34.1 h1:dTlxFls/eikpJxmAC7MVE8oOeP1zryV7iRyIjB0gky4=
|
||||
k8s.io/apimachinery v0.34.1/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw=
|
||||
k8s.io/apiserver v0.34.1 h1:U3JBGdgANK3dfFcyknWde1G6X1F4bg7PXuvlqt8lITA=
|
||||
k8s.io/apiserver v0.34.1/go.mod h1:eOOc9nrVqlBI1AFCvVzsob0OxtPZUCPiUJL45JOTBG0=
|
||||
k8s.io/client-go v0.34.1 h1:ZUPJKgXsnKwVwmKKdPfw4tB58+7/Ik3CrjOEhsiZ7mY=
|
||||
k8s.io/client-go v0.34.1/go.mod h1:kA8v0FP+tk6sZA0yKLRG67LWjqufAoSHA2xVGKw9Of8=
|
||||
k8s.io/component-base v0.34.1 h1:v7xFgG+ONhytZNFpIz5/kecwD+sUhVE6HU7qQUiRM4A=
|
||||
k8s.io/component-base v0.34.1/go.mod h1:mknCpLlTSKHzAQJJnnHVKqjxR7gBeHRv0rPXA7gdtQ0=
|
||||
k8s.io/api v0.34.2 h1:fsSUNZhV+bnL6Aqrp6O7lMTy6o5x2C4XLjnh//8SLYY=
|
||||
k8s.io/api v0.34.2/go.mod h1:MMBPaWlED2a8w4RSeanD76f7opUoypY8TFYkSM+3XHw=
|
||||
k8s.io/apiextensions-apiserver v0.34.2 h1:WStKftnGeoKP4AZRz/BaAAEJvYp4mlZGN0UCv+uvsqo=
|
||||
k8s.io/apiextensions-apiserver v0.34.2/go.mod h1:398CJrsgXF1wytdaanynDpJ67zG4Xq7yj91GrmYN2SE=
|
||||
k8s.io/apimachinery v0.34.2 h1:zQ12Uk3eMHPxrsbUJgNF8bTauTVR2WgqJsTmwTE/NW4=
|
||||
k8s.io/apimachinery v0.34.2/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw=
|
||||
k8s.io/apiserver v0.34.2 h1:2/yu8suwkmES7IzwlehAovo8dDE07cFRC7KMDb1+MAE=
|
||||
k8s.io/apiserver v0.34.2/go.mod h1:gqJQy2yDOB50R3JUReHSFr+cwJnL8G1dzTA0YLEqAPI=
|
||||
k8s.io/client-go v0.34.2 h1:Co6XiknN+uUZqiddlfAjT68184/37PS4QAzYvQvDR8M=
|
||||
k8s.io/client-go v0.34.2/go.mod h1:2VYDl1XXJsdcAxw7BenFslRQX28Dxz91U9MWKjX97fE=
|
||||
k8s.io/component-base v0.34.2 h1:HQRqK9x2sSAsd8+R4xxRirlTjowsg6fWCPwWYeSvogQ=
|
||||
k8s.io/component-base v0.34.2/go.mod h1:9xw2FHJavUHBFpiGkZoKuYZ5pdtLKe97DEByaA+hHbM=
|
||||
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
|
||||
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
|
||||
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZcmKS3g6CthxToOb37KgwE=
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
|
||||
"github.com/grafana/grafana-app-sdk/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
type ReceiverClient struct {
|
||||
@@ -76,24 +75,6 @@ func (c *ReceiverClient) Patch(ctx context.Context, identifier resource.Identifi
|
||||
return c.client.Patch(ctx, identifier, req, opts)
|
||||
}
|
||||
|
||||
func (c *ReceiverClient) UpdateStatus(ctx context.Context, identifier resource.Identifier, newStatus ReceiverStatus, opts resource.UpdateOptions) (*Receiver, error) {
|
||||
return c.client.Update(ctx, &Receiver{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: ReceiverKind().Kind(),
|
||||
APIVersion: GroupVersion.Identifier(),
|
||||
},
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
ResourceVersion: opts.ResourceVersion,
|
||||
Namespace: identifier.Namespace,
|
||||
Name: identifier.Name,
|
||||
},
|
||||
Status: newStatus,
|
||||
}, resource.UpdateOptions{
|
||||
Subresource: "status",
|
||||
ResourceVersion: opts.ResourceVersion,
|
||||
})
|
||||
}
|
||||
|
||||
func (c *ReceiverClient) Delete(ctx context.Context, identifier resource.Identifier, opts resource.DeleteOptions) error {
|
||||
return c.client.Delete(ctx, identifier, opts)
|
||||
}
|
||||
|
||||
@@ -21,8 +21,6 @@ type Receiver struct {
|
||||
|
||||
// Spec is the spec of the Receiver
|
||||
Spec ReceiverSpec `json:"spec" yaml:"spec"`
|
||||
|
||||
Status ReceiverStatus `json:"status" yaml:"status"`
|
||||
}
|
||||
|
||||
func (o *Receiver) GetSpec() any {
|
||||
@@ -39,15 +37,11 @@ func (o *Receiver) SetSpec(spec any) error {
|
||||
}
|
||||
|
||||
func (o *Receiver) GetSubresources() map[string]any {
|
||||
return map[string]any{
|
||||
"status": o.Status,
|
||||
}
|
||||
return map[string]any{}
|
||||
}
|
||||
|
||||
func (o *Receiver) GetSubresource(name string) (any, bool) {
|
||||
switch name {
|
||||
case "status":
|
||||
return o.Status, true
|
||||
default:
|
||||
return nil, false
|
||||
}
|
||||
@@ -55,13 +49,6 @@ func (o *Receiver) GetSubresource(name string) (any, bool) {
|
||||
|
||||
func (o *Receiver) SetSubresource(name string, value any) error {
|
||||
switch name {
|
||||
case "status":
|
||||
cast, ok := value.(ReceiverStatus)
|
||||
if !ok {
|
||||
return fmt.Errorf("cannot set status type %#v, not of type ReceiverStatus", value)
|
||||
}
|
||||
o.Status = cast
|
||||
return nil
|
||||
default:
|
||||
return fmt.Errorf("subresource '%s' does not exist", name)
|
||||
}
|
||||
@@ -233,7 +220,6 @@ func (o *Receiver) DeepCopyInto(dst *Receiver) {
|
||||
dst.TypeMeta.Kind = o.TypeMeta.Kind
|
||||
o.ObjectMeta.DeepCopyInto(&dst.ObjectMeta)
|
||||
o.Spec.DeepCopyInto(&dst.Spec)
|
||||
o.Status.DeepCopyInto(&dst.Status)
|
||||
}
|
||||
|
||||
// Interface compliance compile-time check
|
||||
@@ -305,15 +291,3 @@ func (s *ReceiverSpec) DeepCopy() *ReceiverSpec {
|
||||
func (s *ReceiverSpec) DeepCopyInto(dst *ReceiverSpec) {
|
||||
resource.CopyObjectInto(dst, s)
|
||||
}
|
||||
|
||||
// DeepCopy creates a full deep copy of ReceiverStatus
|
||||
func (s *ReceiverStatus) DeepCopy() *ReceiverStatus {
|
||||
cpy := &ReceiverStatus{}
|
||||
s.DeepCopyInto(cpy)
|
||||
return cpy
|
||||
}
|
||||
|
||||
// DeepCopyInto deep copies ReceiverStatus into another ReceiverStatus object
|
||||
func (s *ReceiverStatus) DeepCopyInto(dst *ReceiverStatus) {
|
||||
resource.CopyObjectInto(dst, s)
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
|
||||
"github.com/grafana/grafana-app-sdk/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
type RoutingTreeClient struct {
|
||||
@@ -76,24 +75,6 @@ func (c *RoutingTreeClient) Patch(ctx context.Context, identifier resource.Ident
|
||||
return c.client.Patch(ctx, identifier, req, opts)
|
||||
}
|
||||
|
||||
func (c *RoutingTreeClient) UpdateStatus(ctx context.Context, identifier resource.Identifier, newStatus RoutingTreeStatus, opts resource.UpdateOptions) (*RoutingTree, error) {
|
||||
return c.client.Update(ctx, &RoutingTree{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: RoutingTreeKind().Kind(),
|
||||
APIVersion: GroupVersion.Identifier(),
|
||||
},
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
ResourceVersion: opts.ResourceVersion,
|
||||
Namespace: identifier.Namespace,
|
||||
Name: identifier.Name,
|
||||
},
|
||||
Status: newStatus,
|
||||
}, resource.UpdateOptions{
|
||||
Subresource: "status",
|
||||
ResourceVersion: opts.ResourceVersion,
|
||||
})
|
||||
}
|
||||
|
||||
func (c *RoutingTreeClient) Delete(ctx context.Context, identifier resource.Identifier, opts resource.DeleteOptions) error {
|
||||
return c.client.Delete(ctx, identifier, opts)
|
||||
}
|
||||
|
||||
@@ -21,8 +21,6 @@ type RoutingTree struct {
|
||||
|
||||
// Spec is the spec of the RoutingTree
|
||||
Spec RoutingTreeSpec `json:"spec" yaml:"spec"`
|
||||
|
||||
Status RoutingTreeStatus `json:"status" yaml:"status"`
|
||||
}
|
||||
|
||||
func (o *RoutingTree) GetSpec() any {
|
||||
@@ -39,15 +37,11 @@ func (o *RoutingTree) SetSpec(spec any) error {
|
||||
}
|
||||
|
||||
func (o *RoutingTree) GetSubresources() map[string]any {
|
||||
return map[string]any{
|
||||
"status": o.Status,
|
||||
}
|
||||
return map[string]any{}
|
||||
}
|
||||
|
||||
func (o *RoutingTree) GetSubresource(name string) (any, bool) {
|
||||
switch name {
|
||||
case "status":
|
||||
return o.Status, true
|
||||
default:
|
||||
return nil, false
|
||||
}
|
||||
@@ -55,13 +49,6 @@ func (o *RoutingTree) GetSubresource(name string) (any, bool) {
|
||||
|
||||
func (o *RoutingTree) SetSubresource(name string, value any) error {
|
||||
switch name {
|
||||
case "status":
|
||||
cast, ok := value.(RoutingTreeStatus)
|
||||
if !ok {
|
||||
return fmt.Errorf("cannot set status type %#v, not of type RoutingTreeStatus", value)
|
||||
}
|
||||
o.Status = cast
|
||||
return nil
|
||||
default:
|
||||
return fmt.Errorf("subresource '%s' does not exist", name)
|
||||
}
|
||||
@@ -233,7 +220,6 @@ func (o *RoutingTree) DeepCopyInto(dst *RoutingTree) {
|
||||
dst.TypeMeta.Kind = o.TypeMeta.Kind
|
||||
o.ObjectMeta.DeepCopyInto(&dst.ObjectMeta)
|
||||
o.Spec.DeepCopyInto(&dst.Spec)
|
||||
o.Status.DeepCopyInto(&dst.Status)
|
||||
}
|
||||
|
||||
// Interface compliance compile-time check
|
||||
@@ -305,15 +291,3 @@ func (s *RoutingTreeSpec) DeepCopy() *RoutingTreeSpec {
|
||||
func (s *RoutingTreeSpec) DeepCopyInto(dst *RoutingTreeSpec) {
|
||||
resource.CopyObjectInto(dst, s)
|
||||
}
|
||||
|
||||
// DeepCopy creates a full deep copy of RoutingTreeStatus
|
||||
func (s *RoutingTreeStatus) DeepCopy() *RoutingTreeStatus {
|
||||
cpy := &RoutingTreeStatus{}
|
||||
s.DeepCopyInto(cpy)
|
||||
return cpy
|
||||
}
|
||||
|
||||
// DeepCopyInto deep copies RoutingTreeStatus into another RoutingTreeStatus object
|
||||
func (s *RoutingTreeStatus) DeepCopyInto(dst *RoutingTreeStatus) {
|
||||
resource.CopyObjectInto(dst, s)
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
|
||||
"github.com/grafana/grafana-app-sdk/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
type TemplateGroupClient struct {
|
||||
@@ -76,24 +75,6 @@ func (c *TemplateGroupClient) Patch(ctx context.Context, identifier resource.Ide
|
||||
return c.client.Patch(ctx, identifier, req, opts)
|
||||
}
|
||||
|
||||
func (c *TemplateGroupClient) UpdateStatus(ctx context.Context, identifier resource.Identifier, newStatus TemplateGroupStatus, opts resource.UpdateOptions) (*TemplateGroup, error) {
|
||||
return c.client.Update(ctx, &TemplateGroup{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: TemplateGroupKind().Kind(),
|
||||
APIVersion: GroupVersion.Identifier(),
|
||||
},
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
ResourceVersion: opts.ResourceVersion,
|
||||
Namespace: identifier.Namespace,
|
||||
Name: identifier.Name,
|
||||
},
|
||||
Status: newStatus,
|
||||
}, resource.UpdateOptions{
|
||||
Subresource: "status",
|
||||
ResourceVersion: opts.ResourceVersion,
|
||||
})
|
||||
}
|
||||
|
||||
func (c *TemplateGroupClient) Delete(ctx context.Context, identifier resource.Identifier, opts resource.DeleteOptions) error {
|
||||
return c.client.Delete(ctx, identifier, opts)
|
||||
}
|
||||
|
||||
@@ -21,8 +21,6 @@ type TemplateGroup struct {
|
||||
|
||||
// Spec is the spec of the TemplateGroup
|
||||
Spec TemplateGroupSpec `json:"spec" yaml:"spec"`
|
||||
|
||||
Status TemplateGroupStatus `json:"status" yaml:"status"`
|
||||
}
|
||||
|
||||
func (o *TemplateGroup) GetSpec() any {
|
||||
@@ -39,15 +37,11 @@ func (o *TemplateGroup) SetSpec(spec any) error {
|
||||
}
|
||||
|
||||
func (o *TemplateGroup) GetSubresources() map[string]any {
|
||||
return map[string]any{
|
||||
"status": o.Status,
|
||||
}
|
||||
return map[string]any{}
|
||||
}
|
||||
|
||||
func (o *TemplateGroup) GetSubresource(name string) (any, bool) {
|
||||
switch name {
|
||||
case "status":
|
||||
return o.Status, true
|
||||
default:
|
||||
return nil, false
|
||||
}
|
||||
@@ -55,13 +49,6 @@ func (o *TemplateGroup) GetSubresource(name string) (any, bool) {
|
||||
|
||||
func (o *TemplateGroup) SetSubresource(name string, value any) error {
|
||||
switch name {
|
||||
case "status":
|
||||
cast, ok := value.(TemplateGroupStatus)
|
||||
if !ok {
|
||||
return fmt.Errorf("cannot set status type %#v, not of type TemplateGroupStatus", value)
|
||||
}
|
||||
o.Status = cast
|
||||
return nil
|
||||
default:
|
||||
return fmt.Errorf("subresource '%s' does not exist", name)
|
||||
}
|
||||
@@ -233,7 +220,6 @@ func (o *TemplateGroup) DeepCopyInto(dst *TemplateGroup) {
|
||||
dst.TypeMeta.Kind = o.TypeMeta.Kind
|
||||
o.ObjectMeta.DeepCopyInto(&dst.ObjectMeta)
|
||||
o.Spec.DeepCopyInto(&dst.Spec)
|
||||
o.Status.DeepCopyInto(&dst.Status)
|
||||
}
|
||||
|
||||
// Interface compliance compile-time check
|
||||
@@ -305,15 +291,3 @@ func (s *TemplateGroupSpec) DeepCopy() *TemplateGroupSpec {
|
||||
func (s *TemplateGroupSpec) DeepCopyInto(dst *TemplateGroupSpec) {
|
||||
resource.CopyObjectInto(dst, s)
|
||||
}
|
||||
|
||||
// DeepCopy creates a full deep copy of TemplateGroupStatus
|
||||
func (s *TemplateGroupStatus) DeepCopy() *TemplateGroupStatus {
|
||||
cpy := &TemplateGroupStatus{}
|
||||
s.DeepCopyInto(cpy)
|
||||
return cpy
|
||||
}
|
||||
|
||||
// DeepCopyInto deep copies TemplateGroupStatus into another TemplateGroupStatus object
|
||||
func (s *TemplateGroupStatus) DeepCopyInto(dst *TemplateGroupStatus) {
|
||||
resource.CopyObjectInto(dst, s)
|
||||
}
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
|
||||
|
||||
package v0alpha1
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
type TemplateGroupstatusOperatorState struct {
|
||||
// lastEvaluation is the ResourceVersion last evaluated
|
||||
LastEvaluation string `json:"lastEvaluation"`
|
||||
// state describes the state of the lastEvaluation.
|
||||
// It is limited to three possible states for machine evaluation.
|
||||
State TemplateGroupStatusOperatorStateState `json:"state"`
|
||||
// descriptiveState is an optional more descriptive state field which has no requirements on format
|
||||
DescriptiveState *string `json:"descriptiveState,omitempty"`
|
||||
// details contains any extra information that is operator-specific
|
||||
Details map[string]interface{} `json:"details,omitempty"`
|
||||
}
|
||||
|
||||
// NewTemplateGroupstatusOperatorState creates a new TemplateGroupstatusOperatorState object.
|
||||
func NewTemplateGroupstatusOperatorState() *TemplateGroupstatusOperatorState {
|
||||
return &TemplateGroupstatusOperatorState{}
|
||||
}
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
type TemplateGroupStatus struct {
|
||||
// operatorStates 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.
|
||||
OperatorStates map[string]TemplateGroupstatusOperatorState `json:"operatorStates,omitempty"`
|
||||
// additionalFields is reserved for future use
|
||||
AdditionalFields map[string]interface{} `json:"additionalFields,omitempty"`
|
||||
}
|
||||
|
||||
// NewTemplateGroupStatus creates a new TemplateGroupStatus object.
|
||||
func NewTemplateGroupStatus() *TemplateGroupStatus {
|
||||
return &TemplateGroupStatus{}
|
||||
}
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
type TemplateGroupStatusOperatorStateState string
|
||||
|
||||
const (
|
||||
TemplateGroupStatusOperatorStateStateSuccess TemplateGroupStatusOperatorStateState = "success"
|
||||
TemplateGroupStatusOperatorStateStateInProgress TemplateGroupStatusOperatorStateState = "in_progress"
|
||||
TemplateGroupStatusOperatorStateStateFailed TemplateGroupStatusOperatorStateState = "failed"
|
||||
)
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
|
||||
"github.com/grafana/grafana-app-sdk/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
type TimeIntervalClient struct {
|
||||
@@ -76,24 +75,6 @@ func (c *TimeIntervalClient) Patch(ctx context.Context, identifier resource.Iden
|
||||
return c.client.Patch(ctx, identifier, req, opts)
|
||||
}
|
||||
|
||||
func (c *TimeIntervalClient) UpdateStatus(ctx context.Context, identifier resource.Identifier, newStatus TimeIntervalStatus, opts resource.UpdateOptions) (*TimeInterval, error) {
|
||||
return c.client.Update(ctx, &TimeInterval{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: TimeIntervalKind().Kind(),
|
||||
APIVersion: GroupVersion.Identifier(),
|
||||
},
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
ResourceVersion: opts.ResourceVersion,
|
||||
Namespace: identifier.Namespace,
|
||||
Name: identifier.Name,
|
||||
},
|
||||
Status: newStatus,
|
||||
}, resource.UpdateOptions{
|
||||
Subresource: "status",
|
||||
ResourceVersion: opts.ResourceVersion,
|
||||
})
|
||||
}
|
||||
|
||||
func (c *TimeIntervalClient) Delete(ctx context.Context, identifier resource.Identifier, opts resource.DeleteOptions) error {
|
||||
return c.client.Delete(ctx, identifier, opts)
|
||||
}
|
||||
|
||||
@@ -21,8 +21,6 @@ type TimeInterval struct {
|
||||
|
||||
// Spec is the spec of the TimeInterval
|
||||
Spec TimeIntervalSpec `json:"spec" yaml:"spec"`
|
||||
|
||||
Status TimeIntervalStatus `json:"status" yaml:"status"`
|
||||
}
|
||||
|
||||
func (o *TimeInterval) GetSpec() any {
|
||||
@@ -39,15 +37,11 @@ func (o *TimeInterval) SetSpec(spec any) error {
|
||||
}
|
||||
|
||||
func (o *TimeInterval) GetSubresources() map[string]any {
|
||||
return map[string]any{
|
||||
"status": o.Status,
|
||||
}
|
||||
return map[string]any{}
|
||||
}
|
||||
|
||||
func (o *TimeInterval) GetSubresource(name string) (any, bool) {
|
||||
switch name {
|
||||
case "status":
|
||||
return o.Status, true
|
||||
default:
|
||||
return nil, false
|
||||
}
|
||||
@@ -55,13 +49,6 @@ func (o *TimeInterval) GetSubresource(name string) (any, bool) {
|
||||
|
||||
func (o *TimeInterval) SetSubresource(name string, value any) error {
|
||||
switch name {
|
||||
case "status":
|
||||
cast, ok := value.(TimeIntervalStatus)
|
||||
if !ok {
|
||||
return fmt.Errorf("cannot set status type %#v, not of type TimeIntervalStatus", value)
|
||||
}
|
||||
o.Status = cast
|
||||
return nil
|
||||
default:
|
||||
return fmt.Errorf("subresource '%s' does not exist", name)
|
||||
}
|
||||
@@ -233,7 +220,6 @@ func (o *TimeInterval) DeepCopyInto(dst *TimeInterval) {
|
||||
dst.TypeMeta.Kind = o.TypeMeta.Kind
|
||||
o.ObjectMeta.DeepCopyInto(&dst.ObjectMeta)
|
||||
o.Spec.DeepCopyInto(&dst.Spec)
|
||||
o.Status.DeepCopyInto(&dst.Status)
|
||||
}
|
||||
|
||||
// Interface compliance compile-time check
|
||||
@@ -305,15 +291,3 @@ func (s *TimeIntervalSpec) DeepCopy() *TimeIntervalSpec {
|
||||
func (s *TimeIntervalSpec) DeepCopyInto(dst *TimeIntervalSpec) {
|
||||
resource.CopyObjectInto(dst, s)
|
||||
}
|
||||
|
||||
// DeepCopy creates a full deep copy of TimeIntervalStatus
|
||||
func (s *TimeIntervalStatus) DeepCopy() *TimeIntervalStatus {
|
||||
cpy := &TimeIntervalStatus{}
|
||||
s.DeepCopyInto(cpy)
|
||||
return cpy
|
||||
}
|
||||
|
||||
// DeepCopyInto deep copies TimeIntervalStatus into another TimeIntervalStatus object
|
||||
func (s *TimeIntervalStatus) DeepCopyInto(dst *TimeIntervalStatus) {
|
||||
resource.CopyObjectInto(dst, s)
|
||||
}
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
|
||||
|
||||
package v0alpha1
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
type TimeIntervalstatusOperatorState struct {
|
||||
// lastEvaluation is the ResourceVersion last evaluated
|
||||
LastEvaluation string `json:"lastEvaluation"`
|
||||
// state describes the state of the lastEvaluation.
|
||||
// It is limited to three possible states for machine evaluation.
|
||||
State TimeIntervalStatusOperatorStateState `json:"state"`
|
||||
// descriptiveState is an optional more descriptive state field which has no requirements on format
|
||||
DescriptiveState *string `json:"descriptiveState,omitempty"`
|
||||
// details contains any extra information that is operator-specific
|
||||
Details map[string]interface{} `json:"details,omitempty"`
|
||||
}
|
||||
|
||||
// NewTimeIntervalstatusOperatorState creates a new TimeIntervalstatusOperatorState object.
|
||||
func NewTimeIntervalstatusOperatorState() *TimeIntervalstatusOperatorState {
|
||||
return &TimeIntervalstatusOperatorState{}
|
||||
}
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
type TimeIntervalStatus struct {
|
||||
// operatorStates 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.
|
||||
OperatorStates map[string]TimeIntervalstatusOperatorState `json:"operatorStates,omitempty"`
|
||||
// additionalFields is reserved for future use
|
||||
AdditionalFields map[string]interface{} `json:"additionalFields,omitempty"`
|
||||
}
|
||||
|
||||
// NewTimeIntervalStatus creates a new TimeIntervalStatus object.
|
||||
func NewTimeIntervalStatus() *TimeIntervalStatus {
|
||||
return &TimeIntervalStatus{}
|
||||
}
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
type TimeIntervalStatusOperatorStateState string
|
||||
|
||||
const (
|
||||
TimeIntervalStatusOperatorStateStateSuccess TimeIntervalStatusOperatorStateState = "success"
|
||||
TimeIntervalStatusOperatorStateStateInProgress TimeIntervalStatusOperatorStateState = "in_progress"
|
||||
TimeIntervalStatusOperatorStateStateFailed TimeIntervalStatusOperatorStateState = "failed"
|
||||
)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -20,16 +20,16 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
rawSchemaReceiverv0alpha1 = []byte(`{"Integration":{"additionalProperties":false,"properties":{"disableResolveMessage":{"type":"boolean"},"secureFields":{"additionalProperties":{"type":"boolean"},"type":"object"},"settings":{"additionalProperties":{"additionalProperties":{},"type":"object"},"type":"object"},"type":{"type":"string"},"uid":{"type":"string"},"version":{"type":"string"}},"required":["type","version","settings"],"type":"object"},"OperatorState":{"additionalProperties":false,"properties":{"descriptiveState":{"description":"descriptiveState is an optional more descriptive state field which has no requirements on format","type":"string"},"details":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"details contains any extra information that is operator-specific","type":"object"},"lastEvaluation":{"description":"lastEvaluation is the ResourceVersion last evaluated","type":"string"},"state":{"description":"state describes the state of the lastEvaluation.\nIt is limited to three possible states for machine evaluation.","enum":["success","in_progress","failed"],"type":"string"}},"required":["lastEvaluation","state"],"type":"object"},"Receiver":{"properties":{"spec":{"$ref":"#/components/schemas/spec"},"status":{"$ref":"#/components/schemas/status"}},"required":["spec"]},"spec":{"additionalProperties":false,"properties":{"integrations":{"items":{"$ref":"#/components/schemas/Integration"},"type":"array"},"title":{"type":"string"}},"required":["title","integrations"],"type":"object"},"status":{"additionalProperties":false,"properties":{"additionalFields":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"additionalFields is reserved for future use","type":"object"},"operatorStates":{"additionalProperties":{"$ref":"#/components/schemas/OperatorState"},"description":"operatorStates is a map of operator ID to operator state evaluations.\nAny operator which consumes this kind SHOULD add its state evaluation information to this field.","type":"object"}},"type":"object"}}`)
|
||||
rawSchemaReceiverv0alpha1 = []byte(`{"Integration":{"additionalProperties":false,"properties":{"disableResolveMessage":{"type":"boolean"},"secureFields":{"additionalProperties":{"type":"boolean"},"type":"object"},"settings":{"additionalProperties":{"additionalProperties":{},"type":"object"},"type":"object"},"type":{"type":"string"},"uid":{"type":"string"},"version":{"type":"string"}},"required":["type","version","settings"],"type":"object"},"Receiver":{"properties":{"spec":{"$ref":"#/components/schemas/spec"}},"required":["spec"]},"spec":{"additionalProperties":false,"properties":{"integrations":{"items":{"$ref":"#/components/schemas/Integration"},"type":"array"},"title":{"type":"string"}},"required":["title","integrations"],"type":"object"}}`)
|
||||
versionSchemaReceiverv0alpha1 app.VersionSchema
|
||||
_ = json.Unmarshal(rawSchemaReceiverv0alpha1, &versionSchemaReceiverv0alpha1)
|
||||
rawSchemaRoutingTreev0alpha1 = []byte(`{"Matcher":{"additionalProperties":false,"properties":{"label":{"type":"string"},"type":{"enum":["=","!=","=~","!~"],"type":"string"},"value":{"type":"string"}},"required":["type","label","value"],"type":"object"},"OperatorState":{"additionalProperties":false,"properties":{"descriptiveState":{"description":"descriptiveState is an optional more descriptive state field which has no requirements on format","type":"string"},"details":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"details contains any extra information that is operator-specific","type":"object"},"lastEvaluation":{"description":"lastEvaluation is the ResourceVersion last evaluated","type":"string"},"state":{"description":"state describes the state of the lastEvaluation.\nIt is limited to three possible states for machine evaluation.","enum":["success","in_progress","failed"],"type":"string"}},"required":["lastEvaluation","state"],"type":"object"},"Route":{"additionalProperties":false,"properties":{"active_time_intervals":{"items":{"type":"string"},"type":"array"},"continue":{"type":"boolean"},"group_by":{"items":{"type":"string"},"type":"array"},"group_interval":{"type":"string"},"group_wait":{"type":"string"},"matchers":{"items":{"$ref":"#/components/schemas/Matcher"},"type":"array"},"mute_time_intervals":{"items":{"type":"string"},"type":"array"},"receiver":{"type":"string"},"repeat_interval":{"type":"string"},"routes":{"items":{"$ref":"#/components/schemas/Route"},"type":"array"}},"required":["continue"],"type":"object"},"RouteDefaults":{"additionalProperties":false,"properties":{"group_by":{"items":{"type":"string"},"type":"array"},"group_interval":{"type":"string"},"group_wait":{"type":"string"},"receiver":{"type":"string"},"repeat_interval":{"type":"string"}},"required":["receiver"],"type":"object"},"RoutingTree":{"properties":{"spec":{"$ref":"#/components/schemas/spec"},"status":{"$ref":"#/components/schemas/status"}},"required":["spec"]},"spec":{"additionalProperties":false,"properties":{"defaults":{"$ref":"#/components/schemas/RouteDefaults"},"routes":{"items":{"$ref":"#/components/schemas/Route"},"type":"array"}},"required":["defaults","routes"],"type":"object"},"status":{"additionalProperties":false,"properties":{"additionalFields":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"additionalFields is reserved for future use","type":"object"},"operatorStates":{"additionalProperties":{"$ref":"#/components/schemas/OperatorState"},"description":"operatorStates is a map of operator ID to operator state evaluations.\nAny operator which consumes this kind SHOULD add its state evaluation information to this field.","type":"object"}},"type":"object"}}`)
|
||||
rawSchemaRoutingTreev0alpha1 = []byte(`{"Matcher":{"additionalProperties":false,"properties":{"label":{"type":"string"},"type":{"enum":["=","!=","=~","!~"],"type":"string"},"value":{"type":"string"}},"required":["type","label","value"],"type":"object"},"Route":{"additionalProperties":false,"properties":{"active_time_intervals":{"items":{"type":"string"},"type":"array"},"continue":{"type":"boolean"},"group_by":{"items":{"type":"string"},"type":"array"},"group_interval":{"type":"string"},"group_wait":{"type":"string"},"matchers":{"items":{"$ref":"#/components/schemas/Matcher"},"type":"array"},"mute_time_intervals":{"items":{"type":"string"},"type":"array"},"receiver":{"type":"string"},"repeat_interval":{"type":"string"},"routes":{"items":{"$ref":"#/components/schemas/Route"},"type":"array"}},"required":["continue"],"type":"object"},"RouteDefaults":{"additionalProperties":false,"properties":{"group_by":{"items":{"type":"string"},"type":"array"},"group_interval":{"type":"string"},"group_wait":{"type":"string"},"receiver":{"type":"string"},"repeat_interval":{"type":"string"}},"required":["receiver"],"type":"object"},"RoutingTree":{"properties":{"spec":{"$ref":"#/components/schemas/spec"}},"required":["spec"]},"spec":{"additionalProperties":false,"properties":{"defaults":{"$ref":"#/components/schemas/RouteDefaults"},"routes":{"items":{"$ref":"#/components/schemas/Route"},"type":"array"}},"required":["defaults","routes"],"type":"object"}}`)
|
||||
versionSchemaRoutingTreev0alpha1 app.VersionSchema
|
||||
_ = json.Unmarshal(rawSchemaRoutingTreev0alpha1, &versionSchemaRoutingTreev0alpha1)
|
||||
rawSchemaTemplateGroupv0alpha1 = []byte(`{"OperatorState":{"additionalProperties":false,"properties":{"descriptiveState":{"description":"descriptiveState is an optional more descriptive state field which has no requirements on format","type":"string"},"details":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"details contains any extra information that is operator-specific","type":"object"},"lastEvaluation":{"description":"lastEvaluation is the ResourceVersion last evaluated","type":"string"},"state":{"description":"state describes the state of the lastEvaluation.\nIt is limited to three possible states for machine evaluation.","enum":["success","in_progress","failed"],"type":"string"}},"required":["lastEvaluation","state"],"type":"object"},"TemplateGroup":{"properties":{"spec":{"$ref":"#/components/schemas/spec"},"status":{"$ref":"#/components/schemas/status"}},"required":["spec"]},"spec":{"additionalProperties":false,"properties":{"content":{"type":"string"},"title":{"type":"string"}},"required":["title","content"],"type":"object"},"status":{"additionalProperties":false,"properties":{"additionalFields":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"additionalFields is reserved for future use","type":"object"},"operatorStates":{"additionalProperties":{"$ref":"#/components/schemas/OperatorState"},"description":"operatorStates is a map of operator ID to operator state evaluations.\nAny operator which consumes this kind SHOULD add its state evaluation information to this field.","type":"object"}},"type":"object"}}`)
|
||||
rawSchemaTemplateGroupv0alpha1 = []byte(`{"TemplateGroup":{"properties":{"spec":{"$ref":"#/components/schemas/spec"}},"required":["spec"]},"spec":{"additionalProperties":false,"properties":{"content":{"type":"string"},"title":{"type":"string"}},"required":["title","content"],"type":"object"}}`)
|
||||
versionSchemaTemplateGroupv0alpha1 app.VersionSchema
|
||||
_ = json.Unmarshal(rawSchemaTemplateGroupv0alpha1, &versionSchemaTemplateGroupv0alpha1)
|
||||
rawSchemaTimeIntervalv0alpha1 = []byte(`{"Interval":{"additionalProperties":false,"properties":{"days_of_month":{"items":{"type":"string"},"type":"array"},"location":{"type":"string"},"months":{"items":{"type":"string"},"type":"array"},"times":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"weekdays":{"items":{"type":"string"},"type":"array"},"years":{"items":{"type":"string"},"type":"array"}},"type":"object"},"OperatorState":{"additionalProperties":false,"properties":{"descriptiveState":{"description":"descriptiveState is an optional more descriptive state field which has no requirements on format","type":"string"},"details":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"details contains any extra information that is operator-specific","type":"object"},"lastEvaluation":{"description":"lastEvaluation is the ResourceVersion last evaluated","type":"string"},"state":{"description":"state describes the state of the lastEvaluation.\nIt is limited to three possible states for machine evaluation.","enum":["success","in_progress","failed"],"type":"string"}},"required":["lastEvaluation","state"],"type":"object"},"TimeInterval":{"properties":{"spec":{"$ref":"#/components/schemas/spec"},"status":{"$ref":"#/components/schemas/status"}},"required":["spec"]},"TimeRange":{"additionalProperties":false,"properties":{"end_time":{"type":"string"},"start_time":{"type":"string"}},"required":["start_time","end_time"],"type":"object"},"spec":{"additionalProperties":false,"properties":{"name":{"type":"string"},"time_intervals":{"items":{"$ref":"#/components/schemas/Interval"},"type":"array"}},"required":["name","time_intervals"],"type":"object"},"status":{"additionalProperties":false,"properties":{"additionalFields":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"additionalFields is reserved for future use","type":"object"},"operatorStates":{"additionalProperties":{"$ref":"#/components/schemas/OperatorState"},"description":"operatorStates is a map of operator ID to operator state evaluations.\nAny operator which consumes this kind SHOULD add its state evaluation information to this field.","type":"object"}},"type":"object"}}`)
|
||||
rawSchemaTimeIntervalv0alpha1 = []byte(`{"Interval":{"additionalProperties":false,"properties":{"days_of_month":{"items":{"type":"string"},"type":"array"},"location":{"type":"string"},"months":{"items":{"type":"string"},"type":"array"},"times":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"weekdays":{"items":{"type":"string"},"type":"array"},"years":{"items":{"type":"string"},"type":"array"}},"type":"object"},"TimeInterval":{"properties":{"spec":{"$ref":"#/components/schemas/spec"}},"required":["spec"]},"TimeRange":{"additionalProperties":false,"properties":{"end_time":{"type":"string"},"start_time":{"type":"string"}},"required":["start_time","end_time"],"type":"object"},"spec":{"additionalProperties":false,"properties":{"name":{"type":"string"},"time_intervals":{"items":{"$ref":"#/components/schemas/Interval"},"type":"array"}},"required":["name","time_intervals"],"type":"object"}}`)
|
||||
versionSchemaTimeIntervalv0alpha1 app.VersionSchema
|
||||
_ = json.Unmarshal(rawSchemaTimeIntervalv0alpha1, &versionSchemaTimeIntervalv0alpha1)
|
||||
)
|
||||
|
||||
@@ -8,7 +8,16 @@ spec:
|
||||
preferredVersion: v0alpha1
|
||||
versions:
|
||||
- kinds:
|
||||
- conversion: false
|
||||
- admission:
|
||||
mutation:
|
||||
operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
validation:
|
||||
operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
conversion: false
|
||||
kind: AlertRule
|
||||
plural: AlertRules
|
||||
schemas:
|
||||
@@ -214,7 +223,16 @@ spec:
|
||||
- spec.panelRef.dashboardUID
|
||||
- spec.panelRef.panelID
|
||||
- spec.notificationSettings.receiver
|
||||
- conversion: false
|
||||
- admission:
|
||||
mutation:
|
||||
operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
validation:
|
||||
operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
conversion: false
|
||||
kind: RecordingRule
|
||||
plural: RecordingRules
|
||||
schemas:
|
||||
|
||||
@@ -3,9 +3,10 @@ module github.com/grafana/grafana/apps/alerting/rules
|
||||
go 1.25.3
|
||||
|
||||
require (
|
||||
github.com/grafana/grafana-app-sdk v0.47.0
|
||||
github.com/grafana/grafana-app-sdk/logging v0.46.0
|
||||
k8s.io/apimachinery v0.34.1
|
||||
github.com/grafana/grafana-app-sdk v0.48.2
|
||||
github.com/grafana/grafana-app-sdk/logging v0.48.1
|
||||
github.com/prometheus/common v0.67.1
|
||||
k8s.io/apimachinery v0.34.2
|
||||
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912
|
||||
)
|
||||
|
||||
@@ -49,7 +50,6 @@ require (
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
||||
github.com/prometheus/client_golang v1.23.2 // indirect
|
||||
github.com/prometheus/client_model v0.6.2 // indirect
|
||||
github.com/prometheus/common v0.67.1 // indirect
|
||||
github.com/prometheus/procfs v0.16.1 // indirect
|
||||
github.com/puzpuzpuz/xsync/v2 v2.5.1 // indirect
|
||||
github.com/rogpeppe/go-internal v1.14.1 // indirect
|
||||
@@ -67,13 +67,13 @@ require (
|
||||
go.opentelemetry.io/proto/otlp v1.7.1 // indirect
|
||||
go.yaml.in/yaml/v2 v2.4.3 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
||||
golang.org/x/net v0.45.0 // indirect
|
||||
golang.org/x/net v0.47.0 // indirect
|
||||
golang.org/x/oauth2 v0.32.0 // indirect
|
||||
golang.org/x/sync v0.17.0 // indirect
|
||||
golang.org/x/sys v0.37.0 // indirect
|
||||
golang.org/x/term v0.35.0 // indirect
|
||||
golang.org/x/text v0.30.0 // indirect
|
||||
golang.org/x/time v0.13.0 // indirect
|
||||
golang.org/x/sync v0.18.0 // indirect
|
||||
golang.org/x/sys v0.38.0 // indirect
|
||||
golang.org/x/term v0.37.0 // indirect
|
||||
golang.org/x/text v0.31.0 // indirect
|
||||
golang.org/x/time v0.14.0 // indirect
|
||||
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250908214217-97024824d090 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20251002232023-7c0ddcbb5797 // indirect
|
||||
@@ -81,9 +81,9 @@ require (
|
||||
google.golang.org/protobuf v1.36.10 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
k8s.io/api v0.34.1 // indirect
|
||||
k8s.io/apiextensions-apiserver v0.34.1 // indirect
|
||||
k8s.io/client-go v0.34.1 // indirect
|
||||
k8s.io/api v0.34.2 // indirect
|
||||
k8s.io/apiextensions-apiserver v0.34.2 // indirect
|
||||
k8s.io/client-go v0.34.2 // indirect
|
||||
k8s.io/klog/v2 v2.130.1 // indirect
|
||||
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect
|
||||
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
|
||||
|
||||
@@ -48,10 +48,10 @@ github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J
|
||||
github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/grafana/grafana-app-sdk v0.47.0 h1:zTKV+p6zM9y+In+dAcaHczbJJsQj9WKglSBcQXMOA+8=
|
||||
github.com/grafana/grafana-app-sdk v0.47.0/go.mod h1:kywXmkppq0oReUMzkjTW8Fq2EBzyN7v914jttTWnWxA=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.46.0 h1:JhQ+ZK5orcmM+dZ3YZdT9uCizJEFU2I6JBNUSFWvCC8=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.46.0/go.mod h1:Gh/nBWnspK3oDNWtiM5qUF/fardHzOIEez+SPI3JeHA=
|
||||
github.com/grafana/grafana-app-sdk v0.48.2 h1:CQQDhwo1fWaXQVKvxxOcK6azbuY3E2TgJHNAZlYYn7U=
|
||||
github.com/grafana/grafana-app-sdk v0.48.2/go.mod h1:LDOvQ7OOyHLcXdSa0InATCa5OMoYAd6E1+rGLrMgHuk=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.48.1 h1:veM0X5LAPyN3KsDLglWjIofndbGuf7MqnrDuDN+F/Ng=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.48.1/go.mod h1:Gh/nBWnspK3oDNWtiM5qUF/fardHzOIEez+SPI3JeHA=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 h1:8Tjv8EJ+pM1xP8mK6egEbD1OgnVTyacbefKhmbLhIhU=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2/go.mod h1:pkJQ2tZHJ0aFOVEEot6oZmaVEZcRme73eIFmhiVuRWs=
|
||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
@@ -163,34 +163,34 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.45.0 h1:RLBg5JKixCy82FtLJpeNlVM0nrSqpCRYzVU1n8kj0tM=
|
||||
golang.org/x/net v0.45.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY=
|
||||
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
|
||||
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
|
||||
golang.org/x/oauth2 v0.32.0 h1:jsCblLleRMDrxMN29H3z/k1KliIvpLgCkE6R8FXXNgY=
|
||||
golang.org/x/oauth2 v0.32.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
|
||||
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
||||
golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
|
||||
golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
|
||||
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||
golang.org/x/term v0.35.0 h1:bZBVKBudEyhRcajGcNc3jIfWPqV4y/Kt2XcoigOWtDQ=
|
||||
golang.org/x/term v0.35.0/go.mod h1:TPGtkTLesOwf2DE8CgVYiZinHAOuy5AYUYT1lENIZnA=
|
||||
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
|
||||
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||
golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU=
|
||||
golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k=
|
||||
golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM=
|
||||
golang.org/x/time v0.13.0 h1:eUlYslOIt32DgYD6utsuUeHs4d7AsEYLuIAdg7FlYgI=
|
||||
golang.org/x/time v0.13.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4=
|
||||
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
|
||||
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
|
||||
golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI=
|
||||
golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE=
|
||||
golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w=
|
||||
golang.org/x/tools v0.39.0 h1:ik4ho21kwuQln40uelmciQPp9SipgNDdrafrYA4TmQQ=
|
||||
golang.org/x/tools v0.39.0/go.mod h1:JnefbkDPyD8UU2kI5fuf8ZX4/yUeh9W877ZeBONxUqQ=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
@@ -216,14 +216,14 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
|
||||
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
k8s.io/api v0.34.1 h1:jC+153630BMdlFukegoEL8E/yT7aLyQkIVuwhmwDgJM=
|
||||
k8s.io/api v0.34.1/go.mod h1:SB80FxFtXn5/gwzCoN6QCtPD7Vbu5w2n1S0J5gFfTYk=
|
||||
k8s.io/apiextensions-apiserver v0.34.1 h1:NNPBva8FNAPt1iSVwIE0FsdrVriRXMsaWFMqJbII2CI=
|
||||
k8s.io/apiextensions-apiserver v0.34.1/go.mod h1:hP9Rld3zF5Ay2Of3BeEpLAToP+l4s5UlxiHfqRaRcMc=
|
||||
k8s.io/apimachinery v0.34.1 h1:dTlxFls/eikpJxmAC7MVE8oOeP1zryV7iRyIjB0gky4=
|
||||
k8s.io/apimachinery v0.34.1/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw=
|
||||
k8s.io/client-go v0.34.1 h1:ZUPJKgXsnKwVwmKKdPfw4tB58+7/Ik3CrjOEhsiZ7mY=
|
||||
k8s.io/client-go v0.34.1/go.mod h1:kA8v0FP+tk6sZA0yKLRG67LWjqufAoSHA2xVGKw9Of8=
|
||||
k8s.io/api v0.34.2 h1:fsSUNZhV+bnL6Aqrp6O7lMTy6o5x2C4XLjnh//8SLYY=
|
||||
k8s.io/api v0.34.2/go.mod h1:MMBPaWlED2a8w4RSeanD76f7opUoypY8TFYkSM+3XHw=
|
||||
k8s.io/apiextensions-apiserver v0.34.2 h1:WStKftnGeoKP4AZRz/BaAAEJvYp4mlZGN0UCv+uvsqo=
|
||||
k8s.io/apiextensions-apiserver v0.34.2/go.mod h1:398CJrsgXF1wytdaanynDpJ67zG4Xq7yj91GrmYN2SE=
|
||||
k8s.io/apimachinery v0.34.2 h1:zQ12Uk3eMHPxrsbUJgNF8bTauTVR2WgqJsTmwTE/NW4=
|
||||
k8s.io/apimachinery v0.34.2/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw=
|
||||
k8s.io/client-go v0.34.2 h1:Co6XiknN+uUZqiddlfAjT68184/37PS4QAzYvQvDR8M=
|
||||
k8s.io/client-go v0.34.2/go.mod h1:2VYDl1XXJsdcAxw7BenFslRQX28Dxz91U9MWKjX97fE=
|
||||
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
|
||||
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
|
||||
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZcmKS3g6CthxToOb37KgwE=
|
||||
|
||||
@@ -13,6 +13,18 @@ alertRulev0alpha1: alertRuleKind & {
|
||||
schema: {
|
||||
spec: v0alpha1.AlertRuleSpec
|
||||
}
|
||||
validation: {
|
||||
operations: [
|
||||
"CREATE",
|
||||
"UPDATE",
|
||||
]
|
||||
}
|
||||
mutation: {
|
||||
operations: [
|
||||
"CREATE",
|
||||
"UPDATE",
|
||||
]
|
||||
}
|
||||
selectableFields: [
|
||||
"spec.title",
|
||||
"spec.paused",
|
||||
|
||||
@@ -13,6 +13,18 @@ recordingRulev0alpha1: recordingRuleKind & {
|
||||
schema: {
|
||||
spec: v0alpha1.RecordingRuleSpec
|
||||
}
|
||||
validation: {
|
||||
operations: [
|
||||
"CREATE",
|
||||
"UPDATE",
|
||||
]
|
||||
}
|
||||
mutation: {
|
||||
operations: [
|
||||
"CREATE",
|
||||
"UPDATE",
|
||||
]
|
||||
}
|
||||
selectableFields: [
|
||||
"spec.title",
|
||||
"spec.paused",
|
||||
|
||||
@@ -3,6 +3,7 @@ package v0alpha1
|
||||
import (
|
||||
"fmt"
|
||||
"slices"
|
||||
"time"
|
||||
)
|
||||
|
||||
func (o *AlertRule) GetProvenanceStatus() string {
|
||||
@@ -48,4 +49,78 @@ func (s *AlertRuleSpec) ExecErrStateOrDefault() string {
|
||||
return s.ExecErrState
|
||||
}
|
||||
|
||||
// TODO: add duration clamping for the field types AlertRulePromDuration, AlertRulePromDurationWMillis, and the For and KeepFiringFor string pointers
|
||||
func (d *AlertRulePromDuration) ToDuration() (time.Duration, error) {
|
||||
return ToDuration(string(*d))
|
||||
}
|
||||
|
||||
func (d *AlertRulePromDurationWMillis) ToDuration() (time.Duration, error) {
|
||||
return ToDuration(string(*d))
|
||||
}
|
||||
|
||||
func (d *AlertRulePromDuration) Clamp() error {
|
||||
clampedDuration, err := ClampDuration(string(*d))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
*d = AlertRulePromDuration(clampedDuration)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *AlertRulePromDurationWMillis) Clamp() error {
|
||||
clampedDuration, err := ClampDuration(string(*d))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
*d = AlertRulePromDurationWMillis(clampedDuration)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (spec *AlertRuleSpec) ClampDurations() error {
|
||||
// clamp all duration fields
|
||||
if err := spec.Trigger.Interval.Clamp(); err != nil {
|
||||
return err
|
||||
}
|
||||
if spec.For != nil {
|
||||
clamped, err := ClampDuration(*spec.For)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
spec.For = &clamped
|
||||
}
|
||||
if spec.KeepFiringFor != nil {
|
||||
clamped, err := ClampDuration(*spec.KeepFiringFor)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
spec.KeepFiringFor = &clamped
|
||||
}
|
||||
if spec.NotificationSettings != nil {
|
||||
if spec.NotificationSettings.GroupWait != nil {
|
||||
if err := spec.NotificationSettings.GroupWait.Clamp(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if spec.NotificationSettings.GroupInterval != nil {
|
||||
if err := spec.NotificationSettings.GroupInterval.Clamp(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if spec.NotificationSettings.RepeatInterval != nil {
|
||||
if err := spec.NotificationSettings.RepeatInterval.Clamp(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
for k, expr := range spec.Expressions {
|
||||
if expr.RelativeTimeRange != nil {
|
||||
if err := expr.RelativeTimeRange.From.Clamp(); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := expr.RelativeTimeRange.To.Clamp(); err != nil {
|
||||
return err
|
||||
}
|
||||
spec.Expressions[k] = expr
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -1,17 +1,50 @@
|
||||
package v0alpha1
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
prom_model "github.com/prometheus/common/model"
|
||||
)
|
||||
|
||||
const (
|
||||
InternalPrefix = "grafana.com/"
|
||||
GroupLabelKey = InternalPrefix + "group"
|
||||
GroupIndexLabelKey = GroupLabelKey + "-index"
|
||||
ProvenanceStatusAnnotationKey = InternalPrefix + "provenance"
|
||||
// Copy of the max title length used in legacy validation path
|
||||
AlertRuleMaxTitleLength = 190
|
||||
// Annotation key used to store the folder UID on resources
|
||||
FolderAnnotationKey = "grafana.app/folder"
|
||||
FolderLabelKey = FolderAnnotationKey
|
||||
)
|
||||
|
||||
// NOTE: This is a copy of the constants from the alertrule package to avoid circular imports.
|
||||
// Keep in sync with pkg/services/ngalert/models/provisioning.go
|
||||
const (
|
||||
ProvenanceStatusNone = ""
|
||||
ProvenanceStatusAPI = "api"
|
||||
ProvenanceStatusNone = ""
|
||||
ProvenanceStatusAPI = "api"
|
||||
ProvenanceStatusFile = "file"
|
||||
ProvenanceStatusConvertedPrometheus = "converted_prometheus"
|
||||
)
|
||||
|
||||
var (
|
||||
AcceptedProvenanceStatuses = []string{ProvenanceStatusNone, ProvenanceStatusAPI}
|
||||
AcceptedProvenanceStatuses = []string{ProvenanceStatusNone, ProvenanceStatusAPI, ProvenanceStatusFile, ProvenanceStatusConvertedPrometheus}
|
||||
)
|
||||
|
||||
func ToDuration(s string) (time.Duration, error) {
|
||||
promDuration, err := prom_model.ParseDuration(s)
|
||||
if err != nil {
|
||||
return 0, fmt.Errorf("invalid duration format: %w", err)
|
||||
}
|
||||
return time.Duration(promDuration), nil
|
||||
}
|
||||
|
||||
// Convert the string duration to the longest valid Prometheus duration format (e.g., "60s" -> "1m")
|
||||
func ClampDuration(s string) (string, error) {
|
||||
promDuration, err := prom_model.ParseDuration(s)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("invalid duration format: %w", err)
|
||||
}
|
||||
return promDuration.String(), nil
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package v0alpha1
|
||||
import (
|
||||
"fmt"
|
||||
"slices"
|
||||
"time"
|
||||
)
|
||||
|
||||
func (o *RecordingRule) GetProvenanceStatus() string {
|
||||
@@ -27,4 +28,47 @@ func (o *RecordingRule) SetProvenanceStatus(status string) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
// TODO: add duration clamping for the field types RecordingRulePromDurationWMillis and RecordingRulePromDuration
|
||||
func (d *RecordingRulePromDuration) ToDuration() (time.Duration, error) {
|
||||
return ToDuration(string(*d))
|
||||
}
|
||||
|
||||
func (d *RecordingRulePromDurationWMillis) ToDuration() (time.Duration, error) {
|
||||
return ToDuration(string(*d))
|
||||
}
|
||||
|
||||
func (d *RecordingRulePromDuration) Clamp() error {
|
||||
clampedDuration, err := ClampDuration(string(*d))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
*d = RecordingRulePromDuration(clampedDuration)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *RecordingRulePromDurationWMillis) Clamp() error {
|
||||
clampedDuration, err := ClampDuration(string(*d))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
*d = RecordingRulePromDurationWMillis(clampedDuration)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (spec *RecordingRuleSpec) ClampDurations() error {
|
||||
// clamp all duration fields
|
||||
if err := spec.Trigger.Interval.Clamp(); err != nil {
|
||||
return err
|
||||
}
|
||||
for k, expr := range spec.Expressions {
|
||||
if expr.RelativeTimeRange != nil {
|
||||
if err := expr.RelativeTimeRange.From.Clamp(); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := expr.RelativeTimeRange.To.Clamp(); err != nil {
|
||||
return err
|
||||
}
|
||||
spec.Expressions[k] = expr
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
32
apps/alerting/rules/pkg/apis/alerting_manifest.go
generated
32
apps/alerting/rules/pkg/apis/alerting_manifest.go
generated
@@ -42,7 +42,21 @@ var appManifestData = app.ManifestData{
|
||||
Plural: "AlertRules",
|
||||
Scope: "Namespaced",
|
||||
Conversion: false,
|
||||
Schema: &versionSchemaAlertRulev0alpha1,
|
||||
Admission: &app.AdmissionCapabilities{
|
||||
Validation: &app.ValidationCapability{
|
||||
Operations: []app.AdmissionOperation{
|
||||
app.AdmissionOperationCreate,
|
||||
app.AdmissionOperationUpdate,
|
||||
},
|
||||
},
|
||||
Mutation: &app.MutationCapability{
|
||||
Operations: []app.AdmissionOperation{
|
||||
app.AdmissionOperationCreate,
|
||||
app.AdmissionOperationUpdate,
|
||||
},
|
||||
},
|
||||
},
|
||||
Schema: &versionSchemaAlertRulev0alpha1,
|
||||
SelectableFields: []string{
|
||||
"spec.title",
|
||||
"spec.paused",
|
||||
@@ -57,7 +71,21 @@ var appManifestData = app.ManifestData{
|
||||
Plural: "RecordingRules",
|
||||
Scope: "Namespaced",
|
||||
Conversion: false,
|
||||
Schema: &versionSchemaRecordingRulev0alpha1,
|
||||
Admission: &app.AdmissionCapabilities{
|
||||
Validation: &app.ValidationCapability{
|
||||
Operations: []app.AdmissionOperation{
|
||||
app.AdmissionOperationCreate,
|
||||
app.AdmissionOperationUpdate,
|
||||
},
|
||||
},
|
||||
Mutation: &app.MutationCapability{
|
||||
Operations: []app.AdmissionOperation{
|
||||
app.AdmissionOperationCreate,
|
||||
app.AdmissionOperationUpdate,
|
||||
},
|
||||
},
|
||||
},
|
||||
Schema: &versionSchemaRecordingRulev0alpha1,
|
||||
SelectableFields: []string{
|
||||
"spec.title",
|
||||
"spec.paused",
|
||||
|
||||
45
apps/alerting/rules/pkg/app/alertrule/mutator.go
Normal file
45
apps/alerting/rules/pkg/app/alertrule/mutator.go
Normal file
@@ -0,0 +1,45 @@
|
||||
package alertrule
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/grafana/grafana-app-sdk/app"
|
||||
"github.com/grafana/grafana-app-sdk/simple"
|
||||
v1 "github.com/grafana/grafana/apps/alerting/rules/pkg/apis/alerting/v0alpha1"
|
||||
"github.com/grafana/grafana/apps/alerting/rules/pkg/app/config"
|
||||
)
|
||||
|
||||
func NewMutator(cfg config.RuntimeConfig) *simple.Mutator {
|
||||
return &simple.Mutator{
|
||||
MutateFunc: func(ctx context.Context, req *app.AdmissionRequest) (*app.MutatingResponse, error) {
|
||||
// Mutate folder label to match folder UID from annotation
|
||||
r, ok := req.Object.(*v1.AlertRule)
|
||||
if !ok || r == nil {
|
||||
// Nothing to do or wrong type; no mutation
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// Read folder UID from annotation
|
||||
folderUID := ""
|
||||
if r.Annotations != nil {
|
||||
folderUID = r.Annotations[v1.FolderAnnotationKey]
|
||||
}
|
||||
|
||||
// Ensure labels map exists and set the folder label if folderUID is present
|
||||
if folderUID != "" {
|
||||
if r.Labels == nil {
|
||||
r.Labels = make(map[string]string)
|
||||
}
|
||||
// Maintain folder metadata label for downstream systems (alertmanager grouping etc.)
|
||||
r.Labels[v1.FolderLabelKey] = folderUID
|
||||
}
|
||||
|
||||
// clamp all duration fields
|
||||
if err := r.Spec.ClampDurations(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &app.MutatingResponse{UpdatedObject: r}, nil
|
||||
},
|
||||
}
|
||||
}
|
||||
122
apps/alerting/rules/pkg/app/alertrule/validator.go
Normal file
122
apps/alerting/rules/pkg/app/alertrule/validator.go
Normal file
@@ -0,0 +1,122 @@
|
||||
package alertrule
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"slices"
|
||||
"time"
|
||||
|
||||
"github.com/grafana/grafana-app-sdk/app"
|
||||
"github.com/grafana/grafana-app-sdk/resource"
|
||||
"github.com/grafana/grafana-app-sdk/simple"
|
||||
model "github.com/grafana/grafana/apps/alerting/rules/pkg/apis/alerting/v0alpha1"
|
||||
"github.com/grafana/grafana/apps/alerting/rules/pkg/app/config"
|
||||
"github.com/grafana/grafana/apps/alerting/rules/pkg/app/util"
|
||||
prom_model "github.com/prometheus/common/model"
|
||||
)
|
||||
|
||||
// validateGroupLabels now delegates to util.ValidateGroupLabels for shared logic.
|
||||
func validateGroupLabels(r *model.AlertRule, oldObject resource.Object, action resource.AdmissionAction) error {
|
||||
var oldLabels map[string]string
|
||||
if oldObject != nil {
|
||||
if oldRule, ok := oldObject.(*model.AlertRule); ok {
|
||||
oldLabels = oldRule.Labels
|
||||
} else {
|
||||
return fmt.Errorf("old object is not of type *v0alpha1.AlertRule")
|
||||
}
|
||||
}
|
||||
return util.ValidateGroupLabels(r.Labels, oldLabels, action)
|
||||
}
|
||||
|
||||
func NewValidator(cfg config.RuntimeConfig) *simple.Validator {
|
||||
return &simple.Validator{
|
||||
ValidateFunc: func(ctx context.Context, req *app.AdmissionRequest) error {
|
||||
// Cast to specific type
|
||||
r, ok := req.Object.(*model.AlertRule)
|
||||
if !ok {
|
||||
return fmt.Errorf("object is not of type *v0alpha1.AlertRule")
|
||||
}
|
||||
// 1) Validate provenance status annotation
|
||||
sourceProv := r.GetProvenanceStatus()
|
||||
if !slices.Contains(model.AcceptedProvenanceStatuses, sourceProv) {
|
||||
return fmt.Errorf("invalid provenance status: %s", sourceProv)
|
||||
}
|
||||
|
||||
// 2) Validate group labels rules
|
||||
if err := validateGroupLabels(r, req.OldObject, req.Action); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// 3) Validate folder is set and exists
|
||||
// Read folder UID directly from annotations
|
||||
folderUID := ""
|
||||
if r.Annotations != nil {
|
||||
folderUID = r.Annotations[model.FolderAnnotationKey]
|
||||
}
|
||||
if folderUID == "" {
|
||||
return fmt.Errorf("folder is required")
|
||||
}
|
||||
if cfg.FolderValidator != nil {
|
||||
ok, verr := cfg.FolderValidator(ctx, folderUID)
|
||||
if verr != nil {
|
||||
return fmt.Errorf("failed to validate folder: %w", verr)
|
||||
}
|
||||
if !ok {
|
||||
return fmt.Errorf("folder does not exist: %s", folderUID)
|
||||
}
|
||||
}
|
||||
|
||||
// 4) Validate notification settings receiver if provided
|
||||
if r.Spec.NotificationSettings != nil && r.Spec.NotificationSettings.Receiver != "" && cfg.NotificationSettingsValidator != nil {
|
||||
ok, nerr := cfg.NotificationSettingsValidator(ctx, r.Spec.NotificationSettings.Receiver)
|
||||
if nerr != nil {
|
||||
return fmt.Errorf("failed to validate notification settings: %w", nerr)
|
||||
}
|
||||
if !ok {
|
||||
return fmt.Errorf("invalid notification receiver: %s", r.Spec.NotificationSettings.Receiver)
|
||||
}
|
||||
}
|
||||
|
||||
// 5) Enforce max title length
|
||||
if len(r.Spec.Title) > model.AlertRuleMaxTitleLength {
|
||||
return fmt.Errorf("alert rule title is too long. Max length is %d", model.AlertRuleMaxTitleLength)
|
||||
}
|
||||
|
||||
// 6) Validate evaluation interval against base interval
|
||||
if err := util.ValidateInterval(cfg.BaseEvaluationInterval, &r.Spec.Trigger.Interval); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// 7) Disallow reserved/spec system label keys
|
||||
if r.Spec.Labels != nil {
|
||||
for key := range r.Spec.Labels {
|
||||
if _, bad := cfg.ReservedLabelKeys[key]; bad {
|
||||
return fmt.Errorf("label key is reserved and cannot be specified: %s", key)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 8) For and KeepFiringFor must be >= 0 if set
|
||||
if r.Spec.For != nil {
|
||||
d, err := prom_model.ParseDuration(*r.Spec.For)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid 'for' duration: %w", err)
|
||||
}
|
||||
if time.Duration(d) < 0 {
|
||||
return fmt.Errorf("'for' cannot be less than 0")
|
||||
}
|
||||
}
|
||||
if r.Spec.KeepFiringFor != nil {
|
||||
d, err := prom_model.ParseDuration(*r.Spec.KeepFiringFor)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid 'keepFiringFor' duration: %w", err)
|
||||
}
|
||||
if time.Duration(d) < 0 {
|
||||
return fmt.Errorf("'keepFiringFor' cannot be less than 0")
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -6,16 +6,29 @@ import (
|
||||
"github.com/grafana/grafana-app-sdk/app"
|
||||
"github.com/grafana/grafana-app-sdk/logging"
|
||||
"github.com/grafana/grafana-app-sdk/operator"
|
||||
"github.com/grafana/grafana-app-sdk/resource"
|
||||
"github.com/grafana/grafana-app-sdk/simple"
|
||||
|
||||
"github.com/grafana/grafana/apps/alerting/rules/pkg/apis"
|
||||
"github.com/grafana/grafana/apps/alerting/rules/pkg/app/alertrule"
|
||||
"github.com/grafana/grafana/apps/alerting/rules/pkg/app/config"
|
||||
"github.com/grafana/grafana/apps/alerting/rules/pkg/app/recordingrule"
|
||||
)
|
||||
|
||||
func New(cfg app.Config) (app.App, error) {
|
||||
managedKinds := make([]simple.AppManagedKind, 0)
|
||||
runtimeCfg, ok := cfg.SpecificConfig.(config.RuntimeConfig)
|
||||
if !ok {
|
||||
return nil, config.ErrInvalidRuntimeConfig
|
||||
}
|
||||
for _, kinds := range apis.GetKinds() {
|
||||
for _, kind := range kinds {
|
||||
managedKinds = append(managedKinds, simple.AppManagedKind{Kind: kind})
|
||||
managedKind := simple.AppManagedKind{
|
||||
Kind: kind,
|
||||
Validator: buildKindValidator(kind, runtimeCfg),
|
||||
Mutator: buildKindMutator(kind, runtimeCfg),
|
||||
}
|
||||
managedKinds = append(managedKinds, managedKind)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,3 +57,23 @@ func New(cfg app.Config) (app.App, error) {
|
||||
|
||||
return a, nil
|
||||
}
|
||||
|
||||
func buildKindValidator(kind resource.Kind, cfg config.RuntimeConfig) *simple.Validator {
|
||||
switch kind.Kind() {
|
||||
case "AlertRule":
|
||||
return alertrule.NewValidator(cfg)
|
||||
case "RecordingRule":
|
||||
return recordingrule.NewValidator(cfg)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func buildKindMutator(kind resource.Kind, cfg config.RuntimeConfig) *simple.Mutator {
|
||||
switch kind.Kind() {
|
||||
case "AlertRule":
|
||||
return alertrule.NewMutator(cfg)
|
||||
case "RecordingRule":
|
||||
return recordingrule.NewMutator(cfg)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
175
apps/alerting/rules/pkg/app/app_test.go
Normal file
175
apps/alerting/rules/pkg/app/app_test.go
Normal file
@@ -0,0 +1,175 @@
|
||||
package app_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
appsdk "github.com/grafana/grafana-app-sdk/app"
|
||||
"github.com/grafana/grafana-app-sdk/resource"
|
||||
|
||||
v1 "github.com/grafana/grafana/apps/alerting/rules/pkg/apis/alerting/v0alpha1"
|
||||
"github.com/grafana/grafana/apps/alerting/rules/pkg/app/alertrule"
|
||||
"github.com/grafana/grafana/apps/alerting/rules/pkg/app/config"
|
||||
"github.com/grafana/grafana/apps/alerting/rules/pkg/app/recordingrule"
|
||||
)
|
||||
|
||||
func makeDefaultRuntimeConfig() config.RuntimeConfig {
|
||||
return config.RuntimeConfig{
|
||||
FolderValidator: func(ctx context.Context, folderUID string) (bool, error) { return folderUID == "f1", nil },
|
||||
BaseEvaluationInterval: 60 * time.Second, // seconds
|
||||
ReservedLabelKeys: map[string]struct{}{"__reserved__": {}, "grafana_folder": {}},
|
||||
NotificationSettingsValidator: func(ctx context.Context, receiver string) (bool, error) { return receiver == "notif-ok", nil },
|
||||
}
|
||||
}
|
||||
|
||||
func TestAlertRuleValidation_Success(t *testing.T) {
|
||||
r := &v1.AlertRule{}
|
||||
r.SetGroupVersionKind(v1.AlertRuleKind().GroupVersionKind())
|
||||
r.Name = "uid-1"
|
||||
r.Namespace = "ns1"
|
||||
r.Annotations = map[string]string{v1.FolderAnnotationKey: "f1"}
|
||||
r.Labels = map[string]string{}
|
||||
r.Spec = v1.AlertRuleSpec{
|
||||
Title: "ok",
|
||||
Trigger: v1.AlertRuleIntervalTrigger{Interval: v1.AlertRulePromDuration("60s")},
|
||||
Expressions: v1.AlertRuleExpressionMap{"A": v1.AlertRuleExpression{Model: map[string]any{"expr": "1"}, Source: boolPtr(true)}},
|
||||
NoDataState: v1.DefaultNoDataState,
|
||||
ExecErrState: v1.DefaultExecErrState,
|
||||
NotificationSettings: &v1.AlertRuleV0alpha1SpecNotificationSettings{Receiver: "notif-ok"},
|
||||
}
|
||||
|
||||
req := &appsdk.AdmissionRequest{Action: resource.AdmissionActionCreate, Object: r}
|
||||
validator := alertrule.NewValidator(makeDefaultRuntimeConfig())
|
||||
if err := validator.Validate(context.Background(), req); err != nil {
|
||||
t.Fatalf("expected success, got error: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestAlertRuleValidation_Errors(t *testing.T) {
|
||||
mk := func(mut func(r *v1.AlertRule)) error {
|
||||
r := baseAlertRule()
|
||||
mut(r)
|
||||
return alertrule.NewValidator(makeDefaultRuntimeConfig()).Validate(context.Background(), &appsdk.AdmissionRequest{Action: resource.AdmissionActionCreate, Object: r})
|
||||
}
|
||||
|
||||
if err := mk(func(r *v1.AlertRule) { r.Annotations = nil }); err == nil {
|
||||
t.Errorf("want folder required error")
|
||||
}
|
||||
if err := mk(func(r *v1.AlertRule) { r.Annotations[v1.FolderAnnotationKey] = "bad" }); err == nil {
|
||||
t.Errorf("want folder not exist error")
|
||||
}
|
||||
if err := mk(func(r *v1.AlertRule) { r.Spec.Trigger.Interval = v1.AlertRulePromDuration("30s") }); err == nil {
|
||||
t.Errorf("want base interval multiple error")
|
||||
}
|
||||
if err := mk(func(r *v1.AlertRule) {
|
||||
r.Spec.NotificationSettings = &v1.AlertRuleV0alpha1SpecNotificationSettings{Receiver: "bad"}
|
||||
}); err == nil {
|
||||
t.Errorf("want invalid receiver error")
|
||||
}
|
||||
if err := mk(func(r *v1.AlertRule) { r.Labels[v1.GroupLabelKey] = "grp" }); err == nil {
|
||||
t.Errorf("want group set on create error")
|
||||
}
|
||||
if err := mk(func(r *v1.AlertRule) { r.Spec.For = strPtr("-10s") }); err == nil {
|
||||
t.Errorf("want for>=0 error")
|
||||
}
|
||||
if err := mk(func(r *v1.AlertRule) {
|
||||
if r.Spec.Labels == nil {
|
||||
r.Spec.Labels = map[string]v1.AlertRuleTemplateString{}
|
||||
}
|
||||
r.Spec.Labels["__reserved__"] = v1.AlertRuleTemplateString("x")
|
||||
}); err == nil {
|
||||
t.Errorf("want reserved label key error")
|
||||
}
|
||||
}
|
||||
|
||||
func baseAlertRule() *v1.AlertRule {
|
||||
r := &v1.AlertRule{}
|
||||
r.SetGroupVersionKind(v1.AlertRuleKind().GroupVersionKind())
|
||||
r.Name = "uid-1"
|
||||
r.Namespace = "ns1"
|
||||
r.Annotations = map[string]string{v1.FolderAnnotationKey: "f1"}
|
||||
r.Labels = map[string]string{}
|
||||
r.Spec = v1.AlertRuleSpec{
|
||||
Title: "ok",
|
||||
Trigger: v1.AlertRuleIntervalTrigger{Interval: v1.AlertRulePromDuration("60s")},
|
||||
Expressions: v1.AlertRuleExpressionMap{"A": v1.AlertRuleExpression{Model: map[string]any{"expr": "1"}, Source: boolPtr(true)}},
|
||||
NoDataState: v1.DefaultNoDataState,
|
||||
ExecErrState: v1.DefaultExecErrState,
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
func TestRecordingRuleValidation_Success(t *testing.T) {
|
||||
r := &v1.RecordingRule{}
|
||||
r.SetGroupVersionKind(v1.RecordingRuleKind().GroupVersionKind())
|
||||
r.Name = "uid-2"
|
||||
r.Namespace = "ns1"
|
||||
r.Annotations = map[string]string{v1.FolderAnnotationKey: "f1"}
|
||||
r.Labels = map[string]string{}
|
||||
r.Spec = v1.RecordingRuleSpec{
|
||||
Title: "ok",
|
||||
Trigger: v1.RecordingRuleIntervalTrigger{Interval: v1.RecordingRulePromDuration("60s")},
|
||||
Expressions: v1.RecordingRuleExpressionMap{"A": v1.RecordingRuleExpression{Model: map[string]any{"expr": "1"}, Source: boolPtr(true)}},
|
||||
Metric: "test_metric",
|
||||
TargetDatasourceUID: "ds1",
|
||||
}
|
||||
|
||||
req := &appsdk.AdmissionRequest{Action: resource.AdmissionActionCreate, Object: r}
|
||||
validator := recordingrule.NewValidator(makeDefaultRuntimeConfig())
|
||||
if err := validator.Validate(context.Background(), req); err != nil {
|
||||
t.Fatalf("expected success, got error: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRecordingRuleValidation_Errors(t *testing.T) {
|
||||
mk := func(mut func(r *v1.RecordingRule)) error {
|
||||
r := baseRecordingRule()
|
||||
mut(r)
|
||||
return recordingrule.NewValidator(makeDefaultRuntimeConfig()).Validate(context.Background(), &appsdk.AdmissionRequest{Action: resource.AdmissionActionCreate, Object: r})
|
||||
}
|
||||
|
||||
if err := mk(func(r *v1.RecordingRule) { r.Annotations = nil }); err == nil {
|
||||
t.Errorf("want folder required error")
|
||||
}
|
||||
if err := mk(func(r *v1.RecordingRule) { r.Annotations[v1.FolderAnnotationKey] = "bad" }); err == nil {
|
||||
t.Errorf("want folder not exist error")
|
||||
}
|
||||
if err := mk(func(r *v1.RecordingRule) { r.Spec.Trigger.Interval = v1.RecordingRulePromDuration("30s") }); err == nil {
|
||||
t.Errorf("want base interval multiple error")
|
||||
}
|
||||
if err := mk(func(r *v1.RecordingRule) { r.Labels[v1.GroupLabelKey] = "grp" }); err == nil {
|
||||
t.Errorf("want group set on create error")
|
||||
}
|
||||
if err := mk(func(r *v1.RecordingRule) { r.Spec.Metric = "" }); err == nil {
|
||||
t.Errorf("want metric required error")
|
||||
}
|
||||
if err := mk(func(r *v1.RecordingRule) {
|
||||
if r.Spec.Labels == nil {
|
||||
r.Spec.Labels = map[string]v1.RecordingRuleTemplateString{}
|
||||
}
|
||||
r.Spec.Labels["__reserved__"] = v1.RecordingRuleTemplateString("x")
|
||||
}); err == nil {
|
||||
t.Errorf("want reserved label key error")
|
||||
}
|
||||
}
|
||||
|
||||
func baseRecordingRule() *v1.RecordingRule {
|
||||
r := &v1.RecordingRule{}
|
||||
r.SetGroupVersionKind(v1.RecordingRuleKind().GroupVersionKind())
|
||||
r.Name = "uid-1"
|
||||
r.Namespace = "ns1"
|
||||
r.Annotations = map[string]string{v1.FolderAnnotationKey: "f1"}
|
||||
r.Labels = map[string]string{}
|
||||
r.Spec = v1.RecordingRuleSpec{
|
||||
Title: "ok",
|
||||
Trigger: v1.RecordingRuleIntervalTrigger{Interval: v1.RecordingRulePromDuration("60s")},
|
||||
Expressions: v1.RecordingRuleExpressionMap{"A": v1.RecordingRuleExpression{Model: map[string]any{"expr": "1"}, Source: boolPtr(true)}},
|
||||
Metric: "test_metric",
|
||||
TargetDatasourceUID: "ds1",
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
func boolPtr(b bool) *bool { return &b }
|
||||
func strPtr(s string) *string { return &s }
|
||||
22
apps/alerting/rules/pkg/app/config/runtime.go
Normal file
22
apps/alerting/rules/pkg/app/config/runtime.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"time"
|
||||
)
|
||||
|
||||
var (
|
||||
ErrInvalidRuntimeConfig = errors.New("invalid runtime config provided to alerting/rules app")
|
||||
)
|
||||
|
||||
// RuntimeConfig holds configuration values needed at runtime by the alerting/rules app from the running Grafana instance.
|
||||
type RuntimeConfig struct {
|
||||
// function to check folder existence given its uid
|
||||
FolderValidator func(ctx context.Context, folderUID string) (bool, error)
|
||||
// base evaluation interval
|
||||
BaseEvaluationInterval time.Duration
|
||||
// set of strings which are illegal for label keys on rules
|
||||
ReservedLabelKeys map[string]struct{}
|
||||
NotificationSettingsValidator func(ctx context.Context, receiver string) (bool, error)
|
||||
}
|
||||
37
apps/alerting/rules/pkg/app/recordingrule/mutator.go
Normal file
37
apps/alerting/rules/pkg/app/recordingrule/mutator.go
Normal file
@@ -0,0 +1,37 @@
|
||||
package recordingrule
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/grafana/grafana-app-sdk/app"
|
||||
"github.com/grafana/grafana-app-sdk/simple"
|
||||
v1 "github.com/grafana/grafana/apps/alerting/rules/pkg/apis/alerting/v0alpha1"
|
||||
"github.com/grafana/grafana/apps/alerting/rules/pkg/app/config"
|
||||
)
|
||||
|
||||
func NewMutator(cfg config.RuntimeConfig) *simple.Mutator {
|
||||
return &simple.Mutator{
|
||||
MutateFunc: func(ctx context.Context, req *app.AdmissionRequest) (*app.MutatingResponse, error) {
|
||||
r, ok := req.Object.(*v1.RecordingRule)
|
||||
if !ok || r == nil {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
folderUID := ""
|
||||
if r.Annotations != nil {
|
||||
folderUID = r.Annotations[v1.FolderAnnotationKey]
|
||||
}
|
||||
|
||||
if folderUID != "" {
|
||||
if r.Labels == nil {
|
||||
r.Labels = make(map[string]string)
|
||||
}
|
||||
r.Labels[v1.FolderLabelKey] = folderUID
|
||||
}
|
||||
if err := r.Spec.ClampDurations(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &app.MutatingResponse{UpdatedObject: r}, nil
|
||||
},
|
||||
}
|
||||
}
|
||||
95
apps/alerting/rules/pkg/app/recordingrule/validator.go
Normal file
95
apps/alerting/rules/pkg/app/recordingrule/validator.go
Normal file
@@ -0,0 +1,95 @@
|
||||
package recordingrule
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"slices"
|
||||
|
||||
"github.com/grafana/grafana-app-sdk/app"
|
||||
"github.com/grafana/grafana-app-sdk/resource"
|
||||
"github.com/grafana/grafana-app-sdk/simple"
|
||||
model "github.com/grafana/grafana/apps/alerting/rules/pkg/apis/alerting/v0alpha1"
|
||||
"github.com/grafana/grafana/apps/alerting/rules/pkg/app/config"
|
||||
"github.com/grafana/grafana/apps/alerting/rules/pkg/app/util"
|
||||
prom_model "github.com/prometheus/common/model"
|
||||
)
|
||||
|
||||
// validateGroupLabels now delegates to util.ValidateGroupLabels for shared logic.
|
||||
func validateGroupLabels(r *model.RecordingRule, oldObject resource.Object, action resource.AdmissionAction) error {
|
||||
var oldLabels map[string]string
|
||||
if oldObject != nil {
|
||||
if oldRule, ok := oldObject.(*model.RecordingRule); ok {
|
||||
oldLabels = oldRule.Labels
|
||||
} else {
|
||||
return fmt.Errorf("old object is not of type *v0alpha1.RecordingRule")
|
||||
}
|
||||
}
|
||||
return util.ValidateGroupLabels(r.Labels, oldLabels, action)
|
||||
}
|
||||
|
||||
func NewValidator(cfg config.RuntimeConfig) *simple.Validator {
|
||||
return &simple.Validator{
|
||||
ValidateFunc: func(ctx context.Context, req *app.AdmissionRequest) error {
|
||||
// Cast to specific type
|
||||
r, ok := req.Object.(*model.RecordingRule)
|
||||
if !ok {
|
||||
return fmt.Errorf("object is not of type *v0alpha1.RecordingRule")
|
||||
}
|
||||
|
||||
sourceProv := r.GetProvenanceStatus()
|
||||
if !slices.Contains(model.AcceptedProvenanceStatuses, sourceProv) {
|
||||
return fmt.Errorf("invalid provenance status: %s", sourceProv)
|
||||
}
|
||||
|
||||
if err := validateGroupLabels(r, req.OldObject, req.Action); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
folderUID := ""
|
||||
if r.Annotations != nil {
|
||||
folderUID = r.Annotations[model.FolderAnnotationKey]
|
||||
}
|
||||
if folderUID == "" {
|
||||
return fmt.Errorf("folder is required")
|
||||
}
|
||||
if cfg.FolderValidator != nil {
|
||||
ok, verr := cfg.FolderValidator(ctx, folderUID)
|
||||
if verr != nil {
|
||||
return fmt.Errorf("failed to validate folder: %w", verr)
|
||||
}
|
||||
if !ok {
|
||||
return fmt.Errorf("folder does not exist: %s", folderUID)
|
||||
}
|
||||
}
|
||||
|
||||
if len(r.Spec.Title) > model.AlertRuleMaxTitleLength {
|
||||
return fmt.Errorf("recording rule title is too long. Max length is %d", model.AlertRuleMaxTitleLength)
|
||||
}
|
||||
|
||||
if err := util.ValidateInterval(cfg.BaseEvaluationInterval, &r.Spec.Trigger.Interval); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if r.Spec.Labels != nil {
|
||||
for key := range r.Spec.Labels {
|
||||
if _, bad := cfg.ReservedLabelKeys[key]; bad {
|
||||
return fmt.Errorf("label key is reserved and cannot be specified: %s", key)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if r.Spec.Metric == "" {
|
||||
return fmt.Errorf("metric must be specified")
|
||||
}
|
||||
metric := prom_model.LabelValue(r.Spec.Metric)
|
||||
if !metric.IsValid() {
|
||||
return fmt.Errorf("metric contains invalid characters")
|
||||
}
|
||||
if !prom_model.IsValidMetricName(metric) { // nolint:staticcheck
|
||||
return fmt.Errorf("invalid metric name")
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
}
|
||||
59
apps/alerting/rules/pkg/app/util/group_validation.go
Normal file
59
apps/alerting/rules/pkg/app/util/group_validation.go
Normal file
@@ -0,0 +1,59 @@
|
||||
package util
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
|
||||
"github.com/grafana/grafana-app-sdk/resource"
|
||||
model "github.com/grafana/grafana/apps/alerting/rules/pkg/apis/alerting/v0alpha1"
|
||||
)
|
||||
|
||||
// ValidateGroupLabels enforces the cross-field rules for group-related labels.
|
||||
//
|
||||
// Rules enforced:
|
||||
// - On create, group-related labels must not be set.
|
||||
// - If one of group or group-index is set, the other must also be set.
|
||||
// - group-index must be an integer.
|
||||
// - On update, group/group-index can only be present if they were present on the old object.
|
||||
//
|
||||
// Pass current labels and, when available, the previous object's labels. The previous labels
|
||||
// may be nil when there is no old object (e.g., create operations).
|
||||
func ValidateGroupLabels(labels map[string]string, oldLabels map[string]string, action resource.AdmissionAction) error {
|
||||
groupStr, groupExists := labels[model.GroupLabelKey]
|
||||
groupIndexStr, groupIndexStrExists := labels[model.GroupIndexLabelKey]
|
||||
|
||||
if groupExists || groupIndexStrExists {
|
||||
if action == resource.AdmissionActionCreate {
|
||||
return fmt.Errorf("cannot set group when creating a new rule")
|
||||
}
|
||||
if groupExists && !groupIndexStrExists {
|
||||
return fmt.Errorf("%s must be set when %s is set", model.GroupIndexLabelKey, model.GroupLabelKey)
|
||||
}
|
||||
if groupIndexStrExists && !groupExists {
|
||||
return fmt.Errorf("%s must be set when %s is set", model.GroupLabelKey, model.GroupIndexLabelKey)
|
||||
}
|
||||
// Disallow empty values when labels are present
|
||||
if groupExists && groupStr == "" {
|
||||
return fmt.Errorf("%s cannot be empty", model.GroupLabelKey)
|
||||
}
|
||||
if groupIndexStrExists && groupIndexStr == "" {
|
||||
return fmt.Errorf("%s cannot be empty", model.GroupIndexLabelKey)
|
||||
}
|
||||
if _, err := strconv.Atoi(groupIndexStr); err != nil {
|
||||
return fmt.Errorf("invalid %s: %w", model.GroupIndexLabelKey, err)
|
||||
}
|
||||
|
||||
// On updates, ensure that group and group-index are only set if the old object had them set
|
||||
if oldLabels != nil {
|
||||
_, oldGroupExists := oldLabels[model.GroupLabelKey]
|
||||
_, oldGroupIndexExists := oldLabels[model.GroupIndexLabelKey]
|
||||
if groupExists && !oldGroupExists {
|
||||
return fmt.Errorf("cannot set group when updating un-grouped rule")
|
||||
}
|
||||
if groupIndexStrExists && !oldGroupIndexExists {
|
||||
return fmt.Errorf("cannot set group-index when updating un-grouped rule")
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
109
apps/alerting/rules/pkg/app/util/group_validation_test.go
Normal file
109
apps/alerting/rules/pkg/app/util/group_validation_test.go
Normal file
@@ -0,0 +1,109 @@
|
||||
package util
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/grafana/grafana-app-sdk/resource"
|
||||
model "github.com/grafana/grafana/apps/alerting/rules/pkg/apis/alerting/v0alpha1"
|
||||
)
|
||||
|
||||
func TestValidateGroupLabels(t *testing.T) {
|
||||
group := model.GroupLabelKey
|
||||
groupIdx := model.GroupIndexLabelKey
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
labels map[string]string
|
||||
oldLabels map[string]string
|
||||
action resource.AdmissionAction
|
||||
wantErr bool
|
||||
}{
|
||||
{
|
||||
name: "update empty group value",
|
||||
labels: map[string]string{group: "", groupIdx: "1"},
|
||||
action: resource.AdmissionActionUpdate,
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "update empty group-index value",
|
||||
labels: map[string]string{group: "g1", groupIdx: ""},
|
||||
action: resource.AdmissionActionUpdate,
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "create empty group value disallowed",
|
||||
labels: map[string]string{group: ""},
|
||||
action: resource.AdmissionActionCreate,
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "create no labels allowed",
|
||||
labels: nil,
|
||||
action: resource.AdmissionActionCreate,
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "create with group disallowed",
|
||||
labels: map[string]string{group: "g1"},
|
||||
action: resource.AdmissionActionCreate,
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "create with group-index disallowed",
|
||||
labels: map[string]string{groupIdx: "1"},
|
||||
action: resource.AdmissionActionCreate,
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "update missing paired index",
|
||||
labels: map[string]string{group: "g1"},
|
||||
action: resource.AdmissionActionUpdate,
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "update missing paired group",
|
||||
labels: map[string]string{groupIdx: "1"},
|
||||
action: resource.AdmissionActionUpdate,
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "update invalid index format",
|
||||
labels: map[string]string{group: "g1", groupIdx: "x"},
|
||||
oldLabels: map[string]string{group: "g1", groupIdx: "0"},
|
||||
action: resource.AdmissionActionUpdate,
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "update cannot add group when previously ungrouped",
|
||||
labels: map[string]string{group: "g1", groupIdx: "0"},
|
||||
oldLabels: map[string]string{},
|
||||
action: resource.AdmissionActionUpdate,
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "update allowed when previously grouped",
|
||||
labels: map[string]string{group: "g1", groupIdx: "2"},
|
||||
oldLabels: map[string]string{group: "g1", groupIdx: "1"},
|
||||
action: resource.AdmissionActionUpdate,
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "update no labels remains allowed",
|
||||
labels: nil,
|
||||
action: resource.AdmissionActionUpdate,
|
||||
wantErr: false,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
err := ValidateGroupLabels(tc.labels, tc.oldLabels, tc.action)
|
||||
if tc.wantErr && err == nil {
|
||||
t.Fatalf("expected error, got nil")
|
||||
}
|
||||
if !tc.wantErr && err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
27
apps/alerting/rules/pkg/app/util/validator.go
Normal file
27
apps/alerting/rules/pkg/app/util/validator.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package util
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
||||
type DurationLike interface {
|
||||
ToDuration() (time.Duration, error)
|
||||
}
|
||||
|
||||
func ValidateInterval(baseInterval time.Duration, d DurationLike) error {
|
||||
interval, err := d.ToDuration()
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid trigger interval: %w", err)
|
||||
}
|
||||
// Ensure interval is positive and an integer multiple of BaseEvaluationInterval (if provided)
|
||||
if interval <= 0 {
|
||||
return fmt.Errorf("trigger interval must be greater than 0")
|
||||
}
|
||||
if baseInterval > 0 {
|
||||
if (interval % baseInterval) != 0 {
|
||||
return fmt.Errorf("trigger interval must be a multiple of base evaluation interval (%s)", baseInterval.String())
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
9
apps/annotation/Makefile
Normal file
9
apps/annotation/Makefile
Normal file
@@ -0,0 +1,9 @@
|
||||
include ../sdk.mk
|
||||
|
||||
.PHONY: generate # Run Grafana App SDK code generation
|
||||
generate: install-app-sdk update-app-sdk
|
||||
@$(APP_SDK_BIN) generate \
|
||||
--source=./kinds/ \
|
||||
--gogenpath=./pkg/apis \
|
||||
--grouping=group \
|
||||
--defencoding=none
|
||||
93
apps/annotation/go.mod
Normal file
93
apps/annotation/go.mod
Normal file
@@ -0,0 +1,93 @@
|
||||
module github.com/grafana/grafana/apps/annotation
|
||||
|
||||
go 1.24.0
|
||||
|
||||
require (
|
||||
github.com/grafana/grafana-app-sdk v0.48.2
|
||||
github.com/grafana/grafana-app-sdk/logging v0.48.1
|
||||
k8s.io/apimachinery v0.34.2
|
||||
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874 // indirect
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.13.0 // indirect
|
||||
github.com/evanphx/json-patch v5.9.11+incompatible // indirect
|
||||
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
|
||||
github.com/getkin/kin-openapi v0.133.0 // indirect
|
||||
github.com/go-logr/logr v1.4.3 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.22.1 // indirect
|
||||
github.com/go-openapi/jsonreference v0.21.2 // indirect
|
||||
github.com/go-openapi/swag v0.23.0 // indirect
|
||||
github.com/go-openapi/swag/jsonname v0.25.1 // indirect
|
||||
github.com/go-test/deep v1.1.1 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/google/gnostic-models v0.7.0 // indirect
|
||||
github.com/google/go-cmp v0.7.0 // indirect
|
||||
github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/mailru/easyjson v0.9.0 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
|
||||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||
github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect
|
||||
github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect
|
||||
github.com/onsi/ginkgo/v2 v2.22.2 // indirect
|
||||
github.com/onsi/gomega v1.36.2 // indirect
|
||||
github.com/perimeterx/marshmallow v1.1.5 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
||||
github.com/prometheus/client_golang v1.23.2 // indirect
|
||||
github.com/prometheus/client_model v0.6.2 // indirect
|
||||
github.com/prometheus/common v0.67.1 // indirect
|
||||
github.com/prometheus/procfs v0.16.1 // indirect
|
||||
github.com/puzpuzpuz/xsync/v2 v2.5.1 // indirect
|
||||
github.com/rogpeppe/go-internal v1.14.1 // indirect
|
||||
github.com/spf13/pflag v1.0.10 // indirect
|
||||
github.com/woodsbury/decimal128 v1.3.0 // indirect
|
||||
github.com/x448/float16 v0.8.4 // indirect
|
||||
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
|
||||
go.opentelemetry.io/otel v1.38.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.38.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.38.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.38.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.7.1 // indirect
|
||||
go.yaml.in/yaml/v2 v2.4.3 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
||||
golang.org/x/net v0.47.0 // indirect
|
||||
golang.org/x/oauth2 v0.32.0 // indirect
|
||||
golang.org/x/sync v0.18.0 // indirect
|
||||
golang.org/x/sys v0.38.0 // indirect
|
||||
golang.org/x/term v0.37.0 // indirect
|
||||
golang.org/x/text v0.31.0 // indirect
|
||||
golang.org/x/time v0.14.0 // indirect
|
||||
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250908214217-97024824d090 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20251002232023-7c0ddcbb5797 // indirect
|
||||
google.golang.org/grpc v1.76.0 // indirect
|
||||
google.golang.org/protobuf v1.36.10 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
k8s.io/api v0.34.2 // indirect
|
||||
k8s.io/apiextensions-apiserver v0.34.2 // indirect
|
||||
k8s.io/client-go v0.34.2 // indirect
|
||||
k8s.io/klog/v2 v2.130.1 // indirect
|
||||
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect
|
||||
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
|
||||
sigs.k8s.io/randfill v1.0.0 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
|
||||
sigs.k8s.io/yaml v1.6.0 // indirect
|
||||
)
|
||||
240
apps/annotation/go.sum
Normal file
240
apps/annotation/go.sum
Normal file
@@ -0,0 +1,240 @@
|
||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874 h1:N7oVaKyGp8bttX0bfZGmcGkjz7DLQXhAn3DNd3T0ous=
|
||||
github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874/go.mod h1:r5xuitiExdLAJ09PR7vBVENGvp4ZuTBeWTGtxuX3K+c=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/emicklei/go-restful/v3 v3.13.0 h1:C4Bl2xDndpU6nJ4bc1jXd+uTmYPVUwkD6bFY/oTyCes=
|
||||
github.com/emicklei/go-restful/v3 v3.13.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
|
||||
github.com/evanphx/json-patch v5.9.11+incompatible h1:ixHHqfcGvxhWkniF1tWxBHA0yb4Z+d1UQi45df52xW8=
|
||||
github.com/evanphx/json-patch v5.9.11+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||
github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM=
|
||||
github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=
|
||||
github.com/getkin/kin-openapi v0.133.0 h1:pJdmNohVIJ97r4AUFtEXRXwESr8b0bD721u/Tz6k8PQ=
|
||||
github.com/getkin/kin-openapi v0.133.0/go.mod h1:boAciF6cXk5FhPqe/NQeBTeenbjqU4LhWBf09ILVvWE=
|
||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
|
||||
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-openapi/jsonpointer v0.22.1 h1:sHYI1He3b9NqJ4wXLoJDKmUmHkWy/L7rtEo92JUxBNk=
|
||||
github.com/go-openapi/jsonpointer v0.22.1/go.mod h1:pQT9OsLkfz1yWoMgYFy4x3U5GY5nUlsOn1qSBH5MkCM=
|
||||
github.com/go-openapi/jsonreference v0.21.2 h1:Wxjda4M/BBQllegefXrY/9aq1fxBA8sI5M/lFU6tSWU=
|
||||
github.com/go-openapi/jsonreference v0.21.2/go.mod h1:pp3PEjIsJ9CZDGCNOyXIQxsNuroxm8FAJ/+quA0yKzQ=
|
||||
github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE=
|
||||
github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ=
|
||||
github.com/go-openapi/swag/jsonname v0.25.1 h1:Sgx+qbwa4ej6AomWC6pEfXrA6uP2RkaNjA9BR8a1RJU=
|
||||
github.com/go-openapi/swag/jsonname v0.25.1/go.mod h1:71Tekow6UOLBD3wS7XhdT98g5J5GR13NOTQ9/6Q11Zo=
|
||||
github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
|
||||
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
|
||||
github.com/go-test/deep v1.1.1 h1:0r/53hagsehfO4bzD2Pgr/+RgHqhmf+k1Bpse2cTu1U=
|
||||
github.com/go-test/deep v1.1.1/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
|
||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||
github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo=
|
||||
github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ=
|
||||
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8=
|
||||
github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/grafana/grafana-app-sdk v0.48.2 h1:CQQDhwo1fWaXQVKvxxOcK6azbuY3E2TgJHNAZlYYn7U=
|
||||
github.com/grafana/grafana-app-sdk v0.48.2/go.mod h1:LDOvQ7OOyHLcXdSa0InATCa5OMoYAd6E1+rGLrMgHuk=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.48.1 h1:veM0X5LAPyN3KsDLglWjIofndbGuf7MqnrDuDN+F/Ng=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.48.1/go.mod h1:Gh/nBWnspK3oDNWtiM5qUF/fardHzOIEez+SPI3JeHA=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 h1:8Tjv8EJ+pM1xP8mK6egEbD1OgnVTyacbefKhmbLhIhU=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2/go.mod h1:pkJQ2tZHJ0aFOVEEot6oZmaVEZcRme73eIFmhiVuRWs=
|
||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
|
||||
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
|
||||
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
|
||||
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
|
||||
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
|
||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
|
||||
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
|
||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
|
||||
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
|
||||
github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4=
|
||||
github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8=
|
||||
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
|
||||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 h1:G7ERwszslrBzRxj//JalHPu/3yz+De2J+4aLtSRlHiY=
|
||||
github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037/go.mod h1:2bpvgLBZEtENV5scfDFEtB/5+1M4hkQhDQrccEJ/qGw=
|
||||
github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 h1:bQx3WeLcUWy+RletIKwUIt4x3t8n2SxavmoclizMb8c=
|
||||
github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o=
|
||||
github.com/onsi/ginkgo/v2 v2.22.2 h1:/3X8Panh8/WwhU/3Ssa6rCKqPLuAkVY2I0RoyDLySlU=
|
||||
github.com/onsi/ginkgo/v2 v2.22.2/go.mod h1:oeMosUL+8LtarXBHu/c0bx2D/K9zyQ6uX3cTyztHwsk=
|
||||
github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8=
|
||||
github.com/onsi/gomega v1.36.2/go.mod h1:DdwyADRjrc825LhMEkD76cHR5+pUnjhUN8GlHlRPHzY=
|
||||
github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s=
|
||||
github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o=
|
||||
github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg=
|
||||
github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=
|
||||
github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE=
|
||||
github.com/prometheus/common v0.67.1 h1:OTSON1P4DNxzTg4hmKCc37o4ZAZDv0cfXLkOt0oEowI=
|
||||
github.com/prometheus/common v0.67.1/go.mod h1:RpmT9v35q2Y+lsieQsdOh5sXZ6ajUGC8NjZAmr8vb0Q=
|
||||
github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg=
|
||||
github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is=
|
||||
github.com/puzpuzpuz/xsync/v2 v2.5.1 h1:mVGYAvzDSu52+zaGyNjC+24Xw2bQi3kTr4QJ6N9pIIU=
|
||||
github.com/puzpuzpuz/xsync/v2 v2.5.1/go.mod h1:gD2H2krq/w52MfPLE+Uy64TzJDVY7lP2znR9qmR35kU=
|
||||
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
|
||||
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
|
||||
github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
|
||||
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
|
||||
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
|
||||
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
|
||||
github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU=
|
||||
github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
|
||||
github.com/woodsbury/decimal128 v1.3.0 h1:8pffMNWIlC0O5vbyHWFZAt5yWvWcrHA+3ovIIjVWss0=
|
||||
github.com/woodsbury/decimal128 v1.3.0/go.mod h1:C5UTmyTjW3JftjUFzOVhC20BEQa2a4ZKOB5I6Zjb+ds=
|
||||
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
|
||||
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
|
||||
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
|
||||
go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8=
|
||||
go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 h1:GqRJVj7UmLjCVyVJ3ZFLdPRmhDUp2zFmQe3RHIOsw24=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0/go.mod h1:ri3aaHSmCTVYu2AWv44YMauwAQc0aqI9gHKIcSbI1pU=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0 h1:lwI4Dc5leUqENgGuQImwLo4WnuXFPetmPpkLi2IrX54=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0/go.mod h1:Kz/oCE7z5wuyhPxsXDuaPteSWqjSBD5YaSdbxZYGbGk=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0 h1:aTL7F04bJHUlztTsNGJ2l+6he8c+y/b//eR0jjjemT4=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0/go.mod h1:kldtb7jDTeol0l3ewcmd8SDvx3EmIE7lyvqbasU3QC4=
|
||||
go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA=
|
||||
go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI=
|
||||
go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E=
|
||||
go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA=
|
||||
go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE=
|
||||
go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs=
|
||||
go.opentelemetry.io/proto/otlp v1.7.1 h1:gTOMpGDb0WTBOP8JaO72iL3auEZhVmAQg4ipjOVAtj4=
|
||||
go.opentelemetry.io/proto/otlp v1.7.1/go.mod h1:b2rVh6rfI/s2pHWNlB7ILJcRALpcNDzKhACevjI+ZnE=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
||||
go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0=
|
||||
go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8=
|
||||
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
|
||||
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
|
||||
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
|
||||
golang.org/x/oauth2 v0.32.0 h1:jsCblLleRMDrxMN29H3z/k1KliIvpLgCkE6R8FXXNgY=
|
||||
golang.org/x/oauth2 v0.32.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
|
||||
golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
|
||||
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||
golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU=
|
||||
golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
|
||||
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
|
||||
golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI=
|
||||
golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.39.0 h1:ik4ho21kwuQln40uelmciQPp9SipgNDdrafrYA4TmQQ=
|
||||
golang.org/x/tools v0.39.0/go.mod h1:JnefbkDPyD8UU2kI5fuf8ZX4/yUeh9W877ZeBONxUqQ=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
gomodules.xyz/jsonpatch/v2 v2.5.0 h1:JELs8RLM12qJGXU4u/TO3V25KW8GreMKl9pdkk14RM0=
|
||||
gomodules.xyz/jsonpatch/v2 v2.5.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY=
|
||||
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
|
||||
gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250908214217-97024824d090 h1:d8Nakh1G+ur7+P3GcMjpRDEkoLUcLW2iU92XVqR+XMQ=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250908214217-97024824d090/go.mod h1:U8EXRNSd8sUYyDfs/It7KVWodQr+Hf9xtxyxWudSwEw=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20251002232023-7c0ddcbb5797 h1:CirRxTOwnRWVLKzDNrs0CXAaVozJoR4G9xvdRecrdpk=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20251002232023-7c0ddcbb5797/go.mod h1:HSkG/KdJWusxU1F6CNrwNDjBMgisKxGnc5dAZfT0mjQ=
|
||||
google.golang.org/grpc v1.76.0 h1:UnVkv1+uMLYXoIz6o7chp59WfQUYA2ex/BXQ9rHZu7A=
|
||||
google.golang.org/grpc v1.76.0/go.mod h1:Ju12QI8M6iQJtbcsV+awF5a4hfJMLi4X0JLo94ULZ6c=
|
||||
google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE=
|
||||
google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4=
|
||||
gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M=
|
||||
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
|
||||
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
k8s.io/api v0.34.2 h1:fsSUNZhV+bnL6Aqrp6O7lMTy6o5x2C4XLjnh//8SLYY=
|
||||
k8s.io/api v0.34.2/go.mod h1:MMBPaWlED2a8w4RSeanD76f7opUoypY8TFYkSM+3XHw=
|
||||
k8s.io/apiextensions-apiserver v0.34.2 h1:WStKftnGeoKP4AZRz/BaAAEJvYp4mlZGN0UCv+uvsqo=
|
||||
k8s.io/apiextensions-apiserver v0.34.2/go.mod h1:398CJrsgXF1wytdaanynDpJ67zG4Xq7yj91GrmYN2SE=
|
||||
k8s.io/apimachinery v0.34.2 h1:zQ12Uk3eMHPxrsbUJgNF8bTauTVR2WgqJsTmwTE/NW4=
|
||||
k8s.io/apimachinery v0.34.2/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw=
|
||||
k8s.io/client-go v0.34.2 h1:Co6XiknN+uUZqiddlfAjT68184/37PS4QAzYvQvDR8M=
|
||||
k8s.io/client-go v0.34.2/go.mod h1:2VYDl1XXJsdcAxw7BenFslRQX28Dxz91U9MWKjX97fE=
|
||||
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
|
||||
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
|
||||
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZcmKS3g6CthxToOb37KgwE=
|
||||
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ=
|
||||
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y=
|
||||
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
|
||||
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE=
|
||||
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
|
||||
sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU=
|
||||
sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
|
||||
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco=
|
||||
sigs.k8s.io/structured-merge-diff/v6 v6.3.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE=
|
||||
sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs=
|
||||
sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4=
|
||||
17
apps/annotation/kinds/annotation.cue
Normal file
17
apps/annotation/kinds/annotation.cue
Normal file
@@ -0,0 +1,17 @@
|
||||
package kinds
|
||||
|
||||
annotationv0alpha1: {
|
||||
kind: "Annotation"
|
||||
pluralName: "Annotations"
|
||||
schema: {
|
||||
spec: {
|
||||
text: string
|
||||
time: int64
|
||||
timeEnd?: int64
|
||||
dashboardUID?: string
|
||||
panelID?: int64
|
||||
tags?: [...string]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
2
apps/annotation/kinds/cue.mod/module.cue
Normal file
2
apps/annotation/kinds/cue.mod/module.cue
Normal file
@@ -0,0 +1,2 @@
|
||||
module: "github.com/grafana/grafana/apps/annotation/kinds"
|
||||
language: version: "v0.8.2"
|
||||
21
apps/annotation/kinds/manifest.cue
Normal file
21
apps/annotation/kinds/manifest.cue
Normal file
@@ -0,0 +1,21 @@
|
||||
package kinds
|
||||
|
||||
manifest: {
|
||||
appName: "annotation"
|
||||
groupOverride: "annotation.grafana.app"
|
||||
versions: {
|
||||
"v0alpha1": v0alpha1
|
||||
}
|
||||
}
|
||||
|
||||
v0alpha1: {
|
||||
kinds: [annotationv0alpha1]
|
||||
codegen: {
|
||||
ts: {
|
||||
enabled: true
|
||||
}
|
||||
go: {
|
||||
enabled: true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,33 +7,33 @@ import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
type PluginMetaClient struct {
|
||||
client *resource.TypedClient[*PluginMeta, *PluginMetaList]
|
||||
type AnnotationClient struct {
|
||||
client *resource.TypedClient[*Annotation, *AnnotationList]
|
||||
}
|
||||
|
||||
func NewPluginMetaClient(client resource.Client) *PluginMetaClient {
|
||||
return &PluginMetaClient{
|
||||
client: resource.NewTypedClient[*PluginMeta, *PluginMetaList](client, PluginMetaKind()),
|
||||
func NewAnnotationClient(client resource.Client) *AnnotationClient {
|
||||
return &AnnotationClient{
|
||||
client: resource.NewTypedClient[*Annotation, *AnnotationList](client, AnnotationKind()),
|
||||
}
|
||||
}
|
||||
|
||||
func NewPluginMetaClientFromGenerator(generator resource.ClientGenerator) (*PluginMetaClient, error) {
|
||||
c, err := generator.ClientFor(PluginMetaKind())
|
||||
func NewAnnotationClientFromGenerator(generator resource.ClientGenerator) (*AnnotationClient, error) {
|
||||
c, err := generator.ClientFor(AnnotationKind())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return NewPluginMetaClient(c), nil
|
||||
return NewAnnotationClient(c), nil
|
||||
}
|
||||
|
||||
func (c *PluginMetaClient) Get(ctx context.Context, identifier resource.Identifier) (*PluginMeta, error) {
|
||||
func (c *AnnotationClient) Get(ctx context.Context, identifier resource.Identifier) (*Annotation, error) {
|
||||
return c.client.Get(ctx, identifier)
|
||||
}
|
||||
|
||||
func (c *PluginMetaClient) List(ctx context.Context, namespace string, opts resource.ListOptions) (*PluginMetaList, error) {
|
||||
func (c *AnnotationClient) List(ctx context.Context, namespace string, opts resource.ListOptions) (*AnnotationList, error) {
|
||||
return c.client.List(ctx, namespace, opts)
|
||||
}
|
||||
|
||||
func (c *PluginMetaClient) ListAll(ctx context.Context, namespace string, opts resource.ListOptions) (*PluginMetaList, error) {
|
||||
func (c *AnnotationClient) ListAll(ctx context.Context, namespace string, opts resource.ListOptions) (*AnnotationList, error) {
|
||||
resp, err := c.client.List(ctx, namespace, resource.ListOptions{
|
||||
ResourceVersion: opts.ResourceVersion,
|
||||
Limit: opts.Limit,
|
||||
@@ -61,25 +61,25 @@ func (c *PluginMetaClient) ListAll(ctx context.Context, namespace string, opts r
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *PluginMetaClient) Create(ctx context.Context, obj *PluginMeta, opts resource.CreateOptions) (*PluginMeta, error) {
|
||||
func (c *AnnotationClient) Create(ctx context.Context, obj *Annotation, opts resource.CreateOptions) (*Annotation, error) {
|
||||
// Make sure apiVersion and kind are set
|
||||
obj.APIVersion = GroupVersion.Identifier()
|
||||
obj.Kind = PluginMetaKind().Kind()
|
||||
obj.Kind = AnnotationKind().Kind()
|
||||
return c.client.Create(ctx, obj, opts)
|
||||
}
|
||||
|
||||
func (c *PluginMetaClient) Update(ctx context.Context, obj *PluginMeta, opts resource.UpdateOptions) (*PluginMeta, error) {
|
||||
func (c *AnnotationClient) Update(ctx context.Context, obj *Annotation, opts resource.UpdateOptions) (*Annotation, error) {
|
||||
return c.client.Update(ctx, obj, opts)
|
||||
}
|
||||
|
||||
func (c *PluginMetaClient) Patch(ctx context.Context, identifier resource.Identifier, req resource.PatchRequest, opts resource.PatchOptions) (*PluginMeta, error) {
|
||||
func (c *AnnotationClient) Patch(ctx context.Context, identifier resource.Identifier, req resource.PatchRequest, opts resource.PatchOptions) (*Annotation, error) {
|
||||
return c.client.Patch(ctx, identifier, req, opts)
|
||||
}
|
||||
|
||||
func (c *PluginMetaClient) UpdateStatus(ctx context.Context, identifier resource.Identifier, newStatus PluginMetaStatus, opts resource.UpdateOptions) (*PluginMeta, error) {
|
||||
return c.client.Update(ctx, &PluginMeta{
|
||||
func (c *AnnotationClient) UpdateStatus(ctx context.Context, identifier resource.Identifier, newStatus AnnotationStatus, opts resource.UpdateOptions) (*Annotation, error) {
|
||||
return c.client.Update(ctx, &Annotation{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: PluginMetaKind().Kind(),
|
||||
Kind: AnnotationKind().Kind(),
|
||||
APIVersion: GroupVersion.Identifier(),
|
||||
},
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
@@ -94,6 +94,6 @@ func (c *PluginMetaClient) UpdateStatus(ctx context.Context, identifier resource
|
||||
})
|
||||
}
|
||||
|
||||
func (c *PluginMetaClient) Delete(ctx context.Context, identifier resource.Identifier, opts resource.DeleteOptions) error {
|
||||
func (c *AnnotationClient) Delete(ctx context.Context, identifier resource.Identifier, opts resource.DeleteOptions) error {
|
||||
return c.client.Delete(ctx, identifier, opts)
|
||||
}
|
||||
@@ -11,18 +11,18 @@ import (
|
||||
"github.com/grafana/grafana-app-sdk/resource"
|
||||
)
|
||||
|
||||
// PluginMetaJSONCodec is an implementation of resource.Codec for kubernetes JSON encoding
|
||||
type PluginMetaJSONCodec struct{}
|
||||
// AnnotationJSONCodec is an implementation of resource.Codec for kubernetes JSON encoding
|
||||
type AnnotationJSONCodec struct{}
|
||||
|
||||
// Read reads JSON-encoded bytes from `reader` and unmarshals them into `into`
|
||||
func (*PluginMetaJSONCodec) Read(reader io.Reader, into resource.Object) error {
|
||||
func (*AnnotationJSONCodec) Read(reader io.Reader, into resource.Object) error {
|
||||
return json.NewDecoder(reader).Decode(into)
|
||||
}
|
||||
|
||||
// Write writes JSON-encoded bytes into `writer` marshaled from `from`
|
||||
func (*PluginMetaJSONCodec) Write(writer io.Writer, from resource.Object) error {
|
||||
func (*AnnotationJSONCodec) Write(writer io.Writer, from resource.Object) error {
|
||||
return json.NewEncoder(writer).Encode(from)
|
||||
}
|
||||
|
||||
// Interface compliance checks
|
||||
var _ resource.Codec = &PluginMetaJSONCodec{}
|
||||
var _ resource.Codec = &AnnotationJSONCodec{}
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
// 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.
|
||||
type PluginMetaMetadata struct {
|
||||
type AnnotationMetadata struct {
|
||||
UpdateTimestamp time.Time `json:"updateTimestamp"`
|
||||
CreatedBy string `json:"createdBy"`
|
||||
Uid string `json:"uid"`
|
||||
@@ -22,9 +22,9 @@ type PluginMetaMetadata struct {
|
||||
Labels map[string]string `json:"labels"`
|
||||
}
|
||||
|
||||
// NewPluginMetaMetadata creates a new PluginMetaMetadata object.
|
||||
func NewPluginMetaMetadata() *PluginMetaMetadata {
|
||||
return &PluginMetaMetadata{
|
||||
// NewAnnotationMetadata creates a new AnnotationMetadata object.
|
||||
func NewAnnotationMetadata() *AnnotationMetadata {
|
||||
return &AnnotationMetadata{
|
||||
Finalizers: []string{},
|
||||
Labels: map[string]string{},
|
||||
}
|
||||
@@ -15,22 +15,22 @@ import (
|
||||
)
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
type PluginInstall struct {
|
||||
type Annotation struct {
|
||||
metav1.TypeMeta `json:",inline" yaml:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata" yaml:"metadata"`
|
||||
|
||||
// Spec is the spec of the PluginInstall
|
||||
Spec PluginInstallSpec `json:"spec" yaml:"spec"`
|
||||
// Spec is the spec of the Annotation
|
||||
Spec AnnotationSpec `json:"spec" yaml:"spec"`
|
||||
|
||||
Status PluginInstallStatus `json:"status" yaml:"status"`
|
||||
Status AnnotationStatus `json:"status" yaml:"status"`
|
||||
}
|
||||
|
||||
func (o *PluginInstall) GetSpec() any {
|
||||
func (o *Annotation) GetSpec() any {
|
||||
return o.Spec
|
||||
}
|
||||
|
||||
func (o *PluginInstall) SetSpec(spec any) error {
|
||||
cast, ok := spec.(PluginInstallSpec)
|
||||
func (o *Annotation) SetSpec(spec any) error {
|
||||
cast, ok := spec.(AnnotationSpec)
|
||||
if !ok {
|
||||
return fmt.Errorf("cannot set spec type %#v, not of type Spec", spec)
|
||||
}
|
||||
@@ -38,13 +38,13 @@ func (o *PluginInstall) SetSpec(spec any) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (o *PluginInstall) GetSubresources() map[string]any {
|
||||
func (o *Annotation) GetSubresources() map[string]any {
|
||||
return map[string]any{
|
||||
"status": o.Status,
|
||||
}
|
||||
}
|
||||
|
||||
func (o *PluginInstall) GetSubresource(name string) (any, bool) {
|
||||
func (o *Annotation) GetSubresource(name string) (any, bool) {
|
||||
switch name {
|
||||
case "status":
|
||||
return o.Status, true
|
||||
@@ -53,12 +53,12 @@ func (o *PluginInstall) GetSubresource(name string) (any, bool) {
|
||||
}
|
||||
}
|
||||
|
||||
func (o *PluginInstall) SetSubresource(name string, value any) error {
|
||||
func (o *Annotation) SetSubresource(name string, value any) error {
|
||||
switch name {
|
||||
case "status":
|
||||
cast, ok := value.(PluginInstallStatus)
|
||||
cast, ok := value.(AnnotationStatus)
|
||||
if !ok {
|
||||
return fmt.Errorf("cannot set status type %#v, not of type PluginInstallStatus", value)
|
||||
return fmt.Errorf("cannot set status type %#v, not of type AnnotationStatus", value)
|
||||
}
|
||||
o.Status = cast
|
||||
return nil
|
||||
@@ -67,7 +67,7 @@ func (o *PluginInstall) SetSubresource(name string, value any) error {
|
||||
}
|
||||
}
|
||||
|
||||
func (o *PluginInstall) GetStaticMetadata() resource.StaticMetadata {
|
||||
func (o *Annotation) GetStaticMetadata() resource.StaticMetadata {
|
||||
gvk := o.GroupVersionKind()
|
||||
return resource.StaticMetadata{
|
||||
Name: o.ObjectMeta.Name,
|
||||
@@ -78,7 +78,7 @@ func (o *PluginInstall) GetStaticMetadata() resource.StaticMetadata {
|
||||
}
|
||||
}
|
||||
|
||||
func (o *PluginInstall) SetStaticMetadata(metadata resource.StaticMetadata) {
|
||||
func (o *Annotation) SetStaticMetadata(metadata resource.StaticMetadata) {
|
||||
o.Name = metadata.Name
|
||||
o.Namespace = metadata.Namespace
|
||||
o.SetGroupVersionKind(schema.GroupVersionKind{
|
||||
@@ -88,7 +88,7 @@ func (o *PluginInstall) SetStaticMetadata(metadata resource.StaticMetadata) {
|
||||
})
|
||||
}
|
||||
|
||||
func (o *PluginInstall) GetCommonMetadata() resource.CommonMetadata {
|
||||
func (o *Annotation) GetCommonMetadata() resource.CommonMetadata {
|
||||
dt := o.DeletionTimestamp
|
||||
var deletionTimestamp *time.Time
|
||||
if dt != nil {
|
||||
@@ -120,7 +120,7 @@ func (o *PluginInstall) GetCommonMetadata() resource.CommonMetadata {
|
||||
}
|
||||
}
|
||||
|
||||
func (o *PluginInstall) SetCommonMetadata(metadata resource.CommonMetadata) {
|
||||
func (o *Annotation) SetCommonMetadata(metadata resource.CommonMetadata) {
|
||||
o.UID = types.UID(metadata.UID)
|
||||
o.ResourceVersion = metadata.ResourceVersion
|
||||
o.Generation = metadata.Generation
|
||||
@@ -165,7 +165,7 @@ func (o *PluginInstall) SetCommonMetadata(metadata resource.CommonMetadata) {
|
||||
}
|
||||
}
|
||||
|
||||
func (o *PluginInstall) GetCreatedBy() string {
|
||||
func (o *Annotation) GetCreatedBy() string {
|
||||
if o.ObjectMeta.Annotations == nil {
|
||||
o.ObjectMeta.Annotations = make(map[string]string)
|
||||
}
|
||||
@@ -173,7 +173,7 @@ func (o *PluginInstall) GetCreatedBy() string {
|
||||
return o.ObjectMeta.Annotations["grafana.com/createdBy"]
|
||||
}
|
||||
|
||||
func (o *PluginInstall) SetCreatedBy(createdBy string) {
|
||||
func (o *Annotation) SetCreatedBy(createdBy string) {
|
||||
if o.ObjectMeta.Annotations == nil {
|
||||
o.ObjectMeta.Annotations = make(map[string]string)
|
||||
}
|
||||
@@ -181,7 +181,7 @@ func (o *PluginInstall) SetCreatedBy(createdBy string) {
|
||||
o.ObjectMeta.Annotations["grafana.com/createdBy"] = createdBy
|
||||
}
|
||||
|
||||
func (o *PluginInstall) GetUpdateTimestamp() time.Time {
|
||||
func (o *Annotation) GetUpdateTimestamp() time.Time {
|
||||
if o.ObjectMeta.Annotations == nil {
|
||||
o.ObjectMeta.Annotations = make(map[string]string)
|
||||
}
|
||||
@@ -190,7 +190,7 @@ func (o *PluginInstall) GetUpdateTimestamp() time.Time {
|
||||
return parsed
|
||||
}
|
||||
|
||||
func (o *PluginInstall) SetUpdateTimestamp(updateTimestamp time.Time) {
|
||||
func (o *Annotation) SetUpdateTimestamp(updateTimestamp time.Time) {
|
||||
if o.ObjectMeta.Annotations == nil {
|
||||
o.ObjectMeta.Annotations = make(map[string]string)
|
||||
}
|
||||
@@ -198,7 +198,7 @@ func (o *PluginInstall) SetUpdateTimestamp(updateTimestamp time.Time) {
|
||||
o.ObjectMeta.Annotations["grafana.com/updateTimestamp"] = updateTimestamp.Format(time.RFC3339)
|
||||
}
|
||||
|
||||
func (o *PluginInstall) GetUpdatedBy() string {
|
||||
func (o *Annotation) GetUpdatedBy() string {
|
||||
if o.ObjectMeta.Annotations == nil {
|
||||
o.ObjectMeta.Annotations = make(map[string]string)
|
||||
}
|
||||
@@ -206,7 +206,7 @@ func (o *PluginInstall) GetUpdatedBy() string {
|
||||
return o.ObjectMeta.Annotations["grafana.com/updatedBy"]
|
||||
}
|
||||
|
||||
func (o *PluginInstall) SetUpdatedBy(updatedBy string) {
|
||||
func (o *Annotation) SetUpdatedBy(updatedBy string) {
|
||||
if o.ObjectMeta.Annotations == nil {
|
||||
o.ObjectMeta.Annotations = make(map[string]string)
|
||||
}
|
||||
@@ -214,21 +214,21 @@ func (o *PluginInstall) SetUpdatedBy(updatedBy string) {
|
||||
o.ObjectMeta.Annotations["grafana.com/updatedBy"] = updatedBy
|
||||
}
|
||||
|
||||
func (o *PluginInstall) Copy() resource.Object {
|
||||
func (o *Annotation) Copy() resource.Object {
|
||||
return resource.CopyObject(o)
|
||||
}
|
||||
|
||||
func (o *PluginInstall) DeepCopyObject() runtime.Object {
|
||||
func (o *Annotation) DeepCopyObject() runtime.Object {
|
||||
return o.Copy()
|
||||
}
|
||||
|
||||
func (o *PluginInstall) DeepCopy() *PluginInstall {
|
||||
cpy := &PluginInstall{}
|
||||
func (o *Annotation) DeepCopy() *Annotation {
|
||||
cpy := &Annotation{}
|
||||
o.DeepCopyInto(cpy)
|
||||
return cpy
|
||||
}
|
||||
|
||||
func (o *PluginInstall) DeepCopyInto(dst *PluginInstall) {
|
||||
func (o *Annotation) DeepCopyInto(dst *Annotation) {
|
||||
dst.TypeMeta.APIVersion = o.TypeMeta.APIVersion
|
||||
dst.TypeMeta.Kind = o.TypeMeta.Kind
|
||||
o.ObjectMeta.DeepCopyInto(&dst.ObjectMeta)
|
||||
@@ -237,34 +237,34 @@ func (o *PluginInstall) DeepCopyInto(dst *PluginInstall) {
|
||||
}
|
||||
|
||||
// Interface compliance compile-time check
|
||||
var _ resource.Object = &PluginInstall{}
|
||||
var _ resource.Object = &Annotation{}
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
type PluginInstallList struct {
|
||||
type AnnotationList struct {
|
||||
metav1.TypeMeta `json:",inline" yaml:",inline"`
|
||||
metav1.ListMeta `json:"metadata" yaml:"metadata"`
|
||||
Items []PluginInstall `json:"items" yaml:"items"`
|
||||
Items []Annotation `json:"items" yaml:"items"`
|
||||
}
|
||||
|
||||
func (o *PluginInstallList) DeepCopyObject() runtime.Object {
|
||||
func (o *AnnotationList) DeepCopyObject() runtime.Object {
|
||||
return o.Copy()
|
||||
}
|
||||
|
||||
func (o *PluginInstallList) Copy() resource.ListObject {
|
||||
cpy := &PluginInstallList{
|
||||
func (o *AnnotationList) Copy() resource.ListObject {
|
||||
cpy := &AnnotationList{
|
||||
TypeMeta: o.TypeMeta,
|
||||
Items: make([]PluginInstall, len(o.Items)),
|
||||
Items: make([]Annotation, len(o.Items)),
|
||||
}
|
||||
o.ListMeta.DeepCopyInto(&cpy.ListMeta)
|
||||
for i := 0; i < len(o.Items); i++ {
|
||||
if item, ok := o.Items[i].Copy().(*PluginInstall); ok {
|
||||
if item, ok := o.Items[i].Copy().(*Annotation); ok {
|
||||
cpy.Items[i] = *item
|
||||
}
|
||||
}
|
||||
return cpy
|
||||
}
|
||||
|
||||
func (o *PluginInstallList) GetItems() []resource.Object {
|
||||
func (o *AnnotationList) GetItems() []resource.Object {
|
||||
items := make([]resource.Object, len(o.Items))
|
||||
for i := 0; i < len(o.Items); i++ {
|
||||
items[i] = &o.Items[i]
|
||||
@@ -272,48 +272,48 @@ func (o *PluginInstallList) GetItems() []resource.Object {
|
||||
return items
|
||||
}
|
||||
|
||||
func (o *PluginInstallList) SetItems(items []resource.Object) {
|
||||
o.Items = make([]PluginInstall, len(items))
|
||||
func (o *AnnotationList) SetItems(items []resource.Object) {
|
||||
o.Items = make([]Annotation, len(items))
|
||||
for i := 0; i < len(items); i++ {
|
||||
o.Items[i] = *items[i].(*PluginInstall)
|
||||
o.Items[i] = *items[i].(*Annotation)
|
||||
}
|
||||
}
|
||||
|
||||
func (o *PluginInstallList) DeepCopy() *PluginInstallList {
|
||||
cpy := &PluginInstallList{}
|
||||
func (o *AnnotationList) DeepCopy() *AnnotationList {
|
||||
cpy := &AnnotationList{}
|
||||
o.DeepCopyInto(cpy)
|
||||
return cpy
|
||||
}
|
||||
|
||||
func (o *PluginInstallList) DeepCopyInto(dst *PluginInstallList) {
|
||||
func (o *AnnotationList) DeepCopyInto(dst *AnnotationList) {
|
||||
resource.CopyObjectInto(dst, o)
|
||||
}
|
||||
|
||||
// Interface compliance compile-time check
|
||||
var _ resource.ListObject = &PluginInstallList{}
|
||||
var _ resource.ListObject = &AnnotationList{}
|
||||
|
||||
// Copy methods for all subresource types
|
||||
|
||||
// DeepCopy creates a full deep copy of Spec
|
||||
func (s *PluginInstallSpec) DeepCopy() *PluginInstallSpec {
|
||||
cpy := &PluginInstallSpec{}
|
||||
func (s *AnnotationSpec) DeepCopy() *AnnotationSpec {
|
||||
cpy := &AnnotationSpec{}
|
||||
s.DeepCopyInto(cpy)
|
||||
return cpy
|
||||
}
|
||||
|
||||
// DeepCopyInto deep copies Spec into another Spec object
|
||||
func (s *PluginInstallSpec) DeepCopyInto(dst *PluginInstallSpec) {
|
||||
func (s *AnnotationSpec) DeepCopyInto(dst *AnnotationSpec) {
|
||||
resource.CopyObjectInto(dst, s)
|
||||
}
|
||||
|
||||
// DeepCopy creates a full deep copy of PluginInstallStatus
|
||||
func (s *PluginInstallStatus) DeepCopy() *PluginInstallStatus {
|
||||
cpy := &PluginInstallStatus{}
|
||||
// DeepCopy creates a full deep copy of AnnotationStatus
|
||||
func (s *AnnotationStatus) DeepCopy() *AnnotationStatus {
|
||||
cpy := &AnnotationStatus{}
|
||||
s.DeepCopyInto(cpy)
|
||||
return cpy
|
||||
}
|
||||
|
||||
// DeepCopyInto deep copies PluginInstallStatus into another PluginInstallStatus object
|
||||
func (s *PluginInstallStatus) DeepCopyInto(dst *PluginInstallStatus) {
|
||||
// DeepCopyInto deep copies AnnotationStatus into another AnnotationStatus object
|
||||
func (s *AnnotationStatus) DeepCopyInto(dst *AnnotationStatus) {
|
||||
resource.CopyObjectInto(dst, s)
|
||||
}
|
||||
34
apps/annotation/pkg/apis/annotation/v0alpha1/annotation_schema_gen.go
generated
Normal file
34
apps/annotation/pkg/apis/annotation/v0alpha1/annotation_schema_gen.go
generated
Normal file
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// Code generated by grafana-app-sdk. DO NOT EDIT.
|
||||
//
|
||||
|
||||
package v0alpha1
|
||||
|
||||
import (
|
||||
"github.com/grafana/grafana-app-sdk/resource"
|
||||
)
|
||||
|
||||
// schema is unexported to prevent accidental overwrites
|
||||
var (
|
||||
schemaAnnotation = resource.NewSimpleSchema("annotation.grafana.app", "v0alpha1", &Annotation{}, &AnnotationList{}, resource.WithKind("Annotation"),
|
||||
resource.WithPlural("annotations"), resource.WithScope(resource.NamespacedScope))
|
||||
kindAnnotation = resource.Kind{
|
||||
Schema: schemaAnnotation,
|
||||
Codecs: map[resource.KindEncoding]resource.Codec{
|
||||
resource.KindEncodingJSON: &AnnotationJSONCodec{},
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
// Kind returns a resource.Kind for this Schema with a JSON codec
|
||||
func AnnotationKind() resource.Kind {
|
||||
return kindAnnotation
|
||||
}
|
||||
|
||||
// Schema returns a resource.SimpleSchema representation of Annotation
|
||||
func AnnotationSchema() *resource.SimpleSchema {
|
||||
return schemaAnnotation
|
||||
}
|
||||
|
||||
// Interface compliance checks
|
||||
var _ resource.Schema = kindAnnotation
|
||||
18
apps/annotation/pkg/apis/annotation/v0alpha1/annotation_spec_gen.go
generated
Normal file
18
apps/annotation/pkg/apis/annotation/v0alpha1/annotation_spec_gen.go
generated
Normal file
@@ -0,0 +1,18 @@
|
||||
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
|
||||
|
||||
package v0alpha1
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
type AnnotationSpec struct {
|
||||
Text string `json:"text"`
|
||||
Time int64 `json:"time"`
|
||||
TimeEnd *int64 `json:"timeEnd,omitempty"`
|
||||
DashboardUID *string `json:"dashboardUID,omitempty"`
|
||||
PanelID *int64 `json:"panelID,omitempty"`
|
||||
Tags []string `json:"tags,omitempty"`
|
||||
}
|
||||
|
||||
// NewAnnotationSpec creates a new AnnotationSpec object.
|
||||
func NewAnnotationSpec() *AnnotationSpec {
|
||||
return &AnnotationSpec{}
|
||||
}
|
||||
@@ -3,42 +3,42 @@
|
||||
package v0alpha1
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
type PluginMetastatusOperatorState struct {
|
||||
type AnnotationstatusOperatorState struct {
|
||||
// lastEvaluation is the ResourceVersion last evaluated
|
||||
LastEvaluation string `json:"lastEvaluation"`
|
||||
// state describes the state of the lastEvaluation.
|
||||
// It is limited to three possible states for machine evaluation.
|
||||
State PluginMetaStatusOperatorStateState `json:"state"`
|
||||
State AnnotationStatusOperatorStateState `json:"state"`
|
||||
// descriptiveState is an optional more descriptive state field which has no requirements on format
|
||||
DescriptiveState *string `json:"descriptiveState,omitempty"`
|
||||
// details contains any extra information that is operator-specific
|
||||
Details map[string]interface{} `json:"details,omitempty"`
|
||||
}
|
||||
|
||||
// NewPluginMetastatusOperatorState creates a new PluginMetastatusOperatorState object.
|
||||
func NewPluginMetastatusOperatorState() *PluginMetastatusOperatorState {
|
||||
return &PluginMetastatusOperatorState{}
|
||||
// NewAnnotationstatusOperatorState creates a new AnnotationstatusOperatorState object.
|
||||
func NewAnnotationstatusOperatorState() *AnnotationstatusOperatorState {
|
||||
return &AnnotationstatusOperatorState{}
|
||||
}
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
type PluginMetaStatus struct {
|
||||
type AnnotationStatus struct {
|
||||
// operatorStates 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.
|
||||
OperatorStates map[string]PluginMetastatusOperatorState `json:"operatorStates,omitempty"`
|
||||
OperatorStates map[string]AnnotationstatusOperatorState `json:"operatorStates,omitempty"`
|
||||
// additionalFields is reserved for future use
|
||||
AdditionalFields map[string]interface{} `json:"additionalFields,omitempty"`
|
||||
}
|
||||
|
||||
// NewPluginMetaStatus creates a new PluginMetaStatus object.
|
||||
func NewPluginMetaStatus() *PluginMetaStatus {
|
||||
return &PluginMetaStatus{}
|
||||
// NewAnnotationStatus creates a new AnnotationStatus object.
|
||||
func NewAnnotationStatus() *AnnotationStatus {
|
||||
return &AnnotationStatus{}
|
||||
}
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
type PluginMetaStatusOperatorStateState string
|
||||
type AnnotationStatusOperatorStateState string
|
||||
|
||||
const (
|
||||
PluginMetaStatusOperatorStateStateSuccess PluginMetaStatusOperatorStateState = "success"
|
||||
PluginMetaStatusOperatorStateStateInProgress PluginMetaStatusOperatorStateState = "in_progress"
|
||||
PluginMetaStatusOperatorStateStateFailed PluginMetaStatusOperatorStateState = "failed"
|
||||
AnnotationStatusOperatorStateStateSuccess AnnotationStatusOperatorStateState = "success"
|
||||
AnnotationStatusOperatorStateStateInProgress AnnotationStatusOperatorStateState = "in_progress"
|
||||
AnnotationStatusOperatorStateStateFailed AnnotationStatusOperatorStateState = "failed"
|
||||
)
|
||||
18
apps/annotation/pkg/apis/annotation/v0alpha1/constants.go
Normal file
18
apps/annotation/pkg/apis/annotation/v0alpha1/constants.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package v0alpha1
|
||||
|
||||
import "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
|
||||
const (
|
||||
// APIGroup is the API group used by all kinds in this package
|
||||
APIGroup = "annotation.grafana.app"
|
||||
// APIVersion is the API version used by all kinds in this package
|
||||
APIVersion = "v0alpha1"
|
||||
)
|
||||
|
||||
var (
|
||||
// GroupVersion is a schema.GroupVersion consisting of the Group and Version constants for this package
|
||||
GroupVersion = schema.GroupVersion{
|
||||
Group: APIGroup,
|
||||
Version: APIVersion,
|
||||
}
|
||||
)
|
||||
124
apps/annotation/pkg/apis/annotation_manifest.go
generated
Normal file
124
apps/annotation/pkg/apis/annotation_manifest.go
generated
Normal file
@@ -0,0 +1,124 @@
|
||||
//
|
||||
// This file is generated by grafana-app-sdk
|
||||
// DO NOT EDIT
|
||||
//
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/grafana/grafana-app-sdk/app"
|
||||
"github.com/grafana/grafana-app-sdk/resource"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/kube-openapi/pkg/spec3"
|
||||
"k8s.io/kube-openapi/pkg/validation/spec"
|
||||
|
||||
v0alpha1 "github.com/grafana/grafana/apps/annotation/pkg/apis/annotation/v0alpha1"
|
||||
)
|
||||
|
||||
var (
|
||||
rawSchemaAnnotationv0alpha1 = []byte(`{"Annotation":{"properties":{"spec":{"$ref":"#/components/schemas/spec"},"status":{"$ref":"#/components/schemas/status"}},"required":["spec"]},"OperatorState":{"additionalProperties":false,"properties":{"descriptiveState":{"description":"descriptiveState is an optional more descriptive state field which has no requirements on format","type":"string"},"details":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"details contains any extra information that is operator-specific","type":"object"},"lastEvaluation":{"description":"lastEvaluation is the ResourceVersion last evaluated","type":"string"},"state":{"description":"state describes the state of the lastEvaluation.\nIt is limited to three possible states for machine evaluation.","enum":["success","in_progress","failed"],"type":"string"}},"required":["lastEvaluation","state"],"type":"object"},"spec":{"additionalProperties":false,"properties":{"dashboardUID":{"type":"string"},"panelID":{"type":"integer"},"tags":{"items":{"type":"string"},"type":"array"},"text":{"type":"string"},"time":{"type":"integer"},"timeEnd":{"type":"integer"}},"required":["text","time"],"type":"object"},"status":{"additionalProperties":false,"properties":{"additionalFields":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"additionalFields is reserved for future use","type":"object"},"operatorStates":{"additionalProperties":{"$ref":"#/components/schemas/OperatorState"},"description":"operatorStates is a map of operator ID to operator state evaluations.\nAny operator which consumes this kind SHOULD add its state evaluation information to this field.","type":"object"}},"type":"object"}}`)
|
||||
versionSchemaAnnotationv0alpha1 app.VersionSchema
|
||||
_ = json.Unmarshal(rawSchemaAnnotationv0alpha1, &versionSchemaAnnotationv0alpha1)
|
||||
)
|
||||
|
||||
var appManifestData = app.ManifestData{
|
||||
AppName: "annotation",
|
||||
Group: "annotation.grafana.app",
|
||||
PreferredVersion: "v0alpha1",
|
||||
Versions: []app.ManifestVersion{
|
||||
{
|
||||
Name: "v0alpha1",
|
||||
Served: true,
|
||||
Kinds: []app.ManifestVersionKind{
|
||||
{
|
||||
Kind: "Annotation",
|
||||
Plural: "Annotations",
|
||||
Scope: "Namespaced",
|
||||
Conversion: false,
|
||||
Schema: &versionSchemaAnnotationv0alpha1,
|
||||
},
|
||||
},
|
||||
Routes: app.ManifestVersionRoutes{
|
||||
Namespaced: map[string]spec3.PathProps{},
|
||||
Cluster: map[string]spec3.PathProps{},
|
||||
Schemas: map[string]spec.Schema{},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
func LocalManifest() app.Manifest {
|
||||
return app.NewEmbeddedManifest(appManifestData)
|
||||
}
|
||||
|
||||
func RemoteManifest() app.Manifest {
|
||||
return app.NewAPIServerManifest("annotation")
|
||||
}
|
||||
|
||||
var kindVersionToGoType = map[string]resource.Kind{
|
||||
"Annotation/v0alpha1": v0alpha1.AnnotationKind(),
|
||||
}
|
||||
|
||||
// ManifestGoTypeAssociator returns the associated resource.Kind instance for a given Kind and Version, if one exists.
|
||||
// If there is no association for the provided Kind and Version, exists will return false.
|
||||
func ManifestGoTypeAssociator(kind, version string) (goType resource.Kind, exists bool) {
|
||||
goType, exists = kindVersionToGoType[fmt.Sprintf("%s/%s", kind, version)]
|
||||
return goType, exists
|
||||
}
|
||||
|
||||
var customRouteToGoResponseType = map[string]any{}
|
||||
|
||||
// ManifestCustomRouteResponsesAssociator returns the associated response go type for a given kind, version, custom route path, and method, if one exists.
|
||||
// kind may be empty for custom routes which are not kind subroutes. Leading slashes are removed from subroute paths.
|
||||
// If there is no association for the provided kind, version, custom route path, and method, exists will return false.
|
||||
// Resource routes (those without a kind) should prefix their route with "<namespace>/" if the route is namespaced (otherwise the route is assumed to be cluster-scope)
|
||||
func ManifestCustomRouteResponsesAssociator(kind, version, path, verb string) (goType any, exists bool) {
|
||||
if len(path) > 0 && path[0] == '/' {
|
||||
path = path[1:]
|
||||
}
|
||||
goType, exists = customRouteToGoResponseType[fmt.Sprintf("%s|%s|%s|%s", version, kind, path, strings.ToUpper(verb))]
|
||||
return goType, exists
|
||||
}
|
||||
|
||||
var customRouteToGoParamsType = map[string]runtime.Object{}
|
||||
|
||||
func ManifestCustomRouteQueryAssociator(kind, version, path, verb string) (goType runtime.Object, exists bool) {
|
||||
if len(path) > 0 && path[0] == '/' {
|
||||
path = path[1:]
|
||||
}
|
||||
goType, exists = customRouteToGoParamsType[fmt.Sprintf("%s|%s|%s|%s", version, kind, path, strings.ToUpper(verb))]
|
||||
return goType, exists
|
||||
}
|
||||
|
||||
var customRouteToGoRequestBodyType = map[string]any{}
|
||||
|
||||
func ManifestCustomRouteRequestBodyAssociator(kind, version, path, verb string) (goType any, exists bool) {
|
||||
if len(path) > 0 && path[0] == '/' {
|
||||
path = path[1:]
|
||||
}
|
||||
goType, exists = customRouteToGoRequestBodyType[fmt.Sprintf("%s|%s|%s|%s", version, kind, path, strings.ToUpper(verb))]
|
||||
return goType, exists
|
||||
}
|
||||
|
||||
type GoTypeAssociator struct{}
|
||||
|
||||
func NewGoTypeAssociator() *GoTypeAssociator {
|
||||
return &GoTypeAssociator{}
|
||||
}
|
||||
|
||||
func (g *GoTypeAssociator) KindToGoType(kind, version string) (goType resource.Kind, exists bool) {
|
||||
return ManifestGoTypeAssociator(kind, version)
|
||||
}
|
||||
func (g *GoTypeAssociator) CustomRouteReturnGoType(kind, version, path, verb string) (goType any, exists bool) {
|
||||
return ManifestCustomRouteResponsesAssociator(kind, version, path, verb)
|
||||
}
|
||||
func (g *GoTypeAssociator) CustomRouteQueryGoType(kind, version, path, verb string) (goType runtime.Object, exists bool) {
|
||||
return ManifestCustomRouteQueryAssociator(kind, version, path, verb)
|
||||
}
|
||||
func (g *GoTypeAssociator) CustomRouteRequestBodyGoType(kind, version, path, verb string) (goType any, exists bool) {
|
||||
return ManifestCustomRouteRequestBodyAssociator(kind, version, path, verb)
|
||||
}
|
||||
54
apps/annotation/pkg/app/app.go
Normal file
54
apps/annotation/pkg/app/app.go
Normal file
@@ -0,0 +1,54 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/grafana/grafana-app-sdk/app"
|
||||
"github.com/grafana/grafana-app-sdk/logging"
|
||||
"github.com/grafana/grafana-app-sdk/operator"
|
||||
"github.com/grafana/grafana-app-sdk/resource"
|
||||
"github.com/grafana/grafana-app-sdk/simple"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
|
||||
annotationv0alpha1 "github.com/grafana/grafana/apps/annotation/pkg/apis/annotation/v0alpha1"
|
||||
)
|
||||
|
||||
func New(cfg app.Config) (app.App, error) {
|
||||
simpleConfig := simple.AppConfig{
|
||||
Name: "annotation",
|
||||
KubeConfig: cfg.KubeConfig,
|
||||
InformerConfig: simple.AppInformerConfig{
|
||||
InformerOptions: operator.InformerOptions{
|
||||
ErrorHandler: func(ctx context.Context, err error) {
|
||||
logging.FromContext(ctx).Error("Informer processing error", "error", err)
|
||||
},
|
||||
},
|
||||
},
|
||||
ManagedKinds: []simple.AppManagedKind{{
|
||||
Kind: annotationv0alpha1.AnnotationKind(),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
a, err := simple.NewApp(simpleConfig)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = a.ValidateManifest(cfg.ManifestData)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return a, nil
|
||||
}
|
||||
|
||||
func GetKinds() map[schema.GroupVersion][]resource.Kind {
|
||||
gv := schema.GroupVersion{
|
||||
Group: annotationv0alpha1.AnnotationKind().Group(),
|
||||
Version: annotationv0alpha1.AnnotationKind().Version(),
|
||||
}
|
||||
return map[schema.GroupVersion][]resource.Kind{
|
||||
gv: {annotationv0alpha1.AnnotationKind()},
|
||||
}
|
||||
}
|
||||
49
apps/annotation/plugin/src/generated/annotation/v0alpha1/annotation_object_gen.ts
generated
Normal file
49
apps/annotation/plugin/src/generated/annotation/v0alpha1/annotation_object_gen.ts
generated
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* This file was generated by grafana-app-sdk. DO NOT EDIT.
|
||||
*/
|
||||
import { Spec } from './types.spec.gen';
|
||||
import { Status } from './types.status.gen';
|
||||
|
||||
export interface Metadata {
|
||||
name: string;
|
||||
namespace: string;
|
||||
generateName?: string;
|
||||
selfLink?: string;
|
||||
uid?: string;
|
||||
resourceVersion?: string;
|
||||
generation?: number;
|
||||
creationTimestamp?: string;
|
||||
deletionTimestamp?: string;
|
||||
deletionGracePeriodSeconds?: number;
|
||||
labels?: Record<string, string>;
|
||||
annotations?: Record<string, string>;
|
||||
ownerReferences?: OwnerReference[];
|
||||
finalizers?: string[];
|
||||
managedFields?: ManagedFieldsEntry[];
|
||||
}
|
||||
|
||||
export interface OwnerReference {
|
||||
apiVersion: string;
|
||||
kind: string;
|
||||
name: string;
|
||||
uid: string;
|
||||
controller?: boolean;
|
||||
blockOwnerDeletion?: boolean;
|
||||
}
|
||||
|
||||
export interface ManagedFieldsEntry {
|
||||
manager?: string;
|
||||
operation?: string;
|
||||
apiVersion?: string;
|
||||
time?: string;
|
||||
fieldsType?: string;
|
||||
subresource?: string;
|
||||
}
|
||||
|
||||
export interface Annotation {
|
||||
kind: string;
|
||||
apiVersion: string;
|
||||
metadata: Metadata;
|
||||
spec: Spec;
|
||||
status: Status;
|
||||
}
|
||||
16
apps/annotation/plugin/src/generated/annotation/v0alpha1/types.spec.gen.ts
generated
Normal file
16
apps/annotation/plugin/src/generated/annotation/v0alpha1/types.spec.gen.ts
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
|
||||
|
||||
export interface Spec {
|
||||
text: string;
|
||||
time: number;
|
||||
timeEnd?: number;
|
||||
dashboardUID?: string;
|
||||
panelID?: number;
|
||||
tags?: string[];
|
||||
}
|
||||
|
||||
export const defaultSpec = (): Spec => ({
|
||||
text: "",
|
||||
time: 0,
|
||||
});
|
||||
|
||||
30
apps/annotation/plugin/src/generated/annotation/v0alpha1/types.status.gen.ts
generated
Normal file
30
apps/annotation/plugin/src/generated/annotation/v0alpha1/types.status.gen.ts
generated
Normal file
@@ -0,0 +1,30 @@
|
||||
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
|
||||
|
||||
export interface OperatorState {
|
||||
// lastEvaluation is the ResourceVersion last evaluated
|
||||
lastEvaluation: string;
|
||||
// state describes the state of the lastEvaluation.
|
||||
// It is limited to three possible states for machine evaluation.
|
||||
state: "success" | "in_progress" | "failed";
|
||||
// descriptiveState is an optional more descriptive state field which has no requirements on format
|
||||
descriptiveState?: string;
|
||||
// details contains any extra information that is operator-specific
|
||||
details?: Record<string, any>;
|
||||
}
|
||||
|
||||
export const defaultOperatorState = (): OperatorState => ({
|
||||
lastEvaluation: "",
|
||||
state: "success",
|
||||
});
|
||||
|
||||
export interface Status {
|
||||
// operatorStates 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.
|
||||
operatorStates?: Record<string, OperatorState>;
|
||||
// additionalFields is reserved for future use
|
||||
additionalFields?: Record<string, any>;
|
||||
}
|
||||
|
||||
export const defaultStatus = (): Status => ({
|
||||
});
|
||||
|
||||
@@ -3,9 +3,9 @@ module github.com/grafana/grafana/apps/correlations
|
||||
go 1.25.3
|
||||
|
||||
require (
|
||||
github.com/grafana/grafana-app-sdk v0.47.0
|
||||
github.com/grafana/grafana-app-sdk/logging v0.46.0
|
||||
k8s.io/apimachinery v0.34.1
|
||||
github.com/grafana/grafana-app-sdk v0.48.2
|
||||
github.com/grafana/grafana-app-sdk/logging v0.48.1
|
||||
k8s.io/apimachinery v0.34.2
|
||||
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912
|
||||
)
|
||||
|
||||
@@ -67,13 +67,13 @@ require (
|
||||
go.opentelemetry.io/proto/otlp v1.7.1 // indirect
|
||||
go.yaml.in/yaml/v2 v2.4.3 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
||||
golang.org/x/net v0.45.0 // indirect
|
||||
golang.org/x/net v0.47.0 // indirect
|
||||
golang.org/x/oauth2 v0.32.0 // indirect
|
||||
golang.org/x/sync v0.17.0 // indirect
|
||||
golang.org/x/sys v0.37.0 // indirect
|
||||
golang.org/x/term v0.35.0 // indirect
|
||||
golang.org/x/text v0.30.0 // indirect
|
||||
golang.org/x/time v0.13.0 // indirect
|
||||
golang.org/x/sync v0.18.0 // indirect
|
||||
golang.org/x/sys v0.38.0 // indirect
|
||||
golang.org/x/term v0.37.0 // indirect
|
||||
golang.org/x/text v0.31.0 // indirect
|
||||
golang.org/x/time v0.14.0 // indirect
|
||||
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250908214217-97024824d090 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20251002232023-7c0ddcbb5797 // indirect
|
||||
@@ -81,9 +81,9 @@ require (
|
||||
google.golang.org/protobuf v1.36.10 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
k8s.io/api v0.34.1 // indirect
|
||||
k8s.io/apiextensions-apiserver v0.34.1 // indirect
|
||||
k8s.io/client-go v0.34.1 // indirect
|
||||
k8s.io/api v0.34.2 // indirect
|
||||
k8s.io/apiextensions-apiserver v0.34.2 // indirect
|
||||
k8s.io/client-go v0.34.2 // indirect
|
||||
k8s.io/klog/v2 v2.130.1 // indirect
|
||||
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect
|
||||
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user