You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(plugins): properly handle version preference in Sanitize, add CRD plugin validations (#2162)
* fix(plugins): pick the latest plugin version in sanitize
* feat(plugins): add update method
* feat(plugins): implement PluginMap
* chore(plugins): switch Sanitize to PluginMap
* chore(controllers): switch plugin reconciler to PluginMap
* chore(plugins): deprecate unused methods for PluginList
* chore(plugins): do not return errors for Update method
Versions will be validated at a CRD level
* chore(plugins): add CRD validation for plugins
* chore: regenerate CRDs
* chore(plugins): update comments
* chore(plugins): add another test case for plugin update
* chore(plugins): update comments
* chore(plugins): deprecate `Update` method
* chore(plugins): improve variable naming in Reconcile
* fix(plugins): logging line
* fix(plugins): return sorted list in GetPluginList
Copy file name to clipboardExpand all lines: api/v1beta1/plugin_list.go
+77-66Lines changed: 77 additions & 66 deletions
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,19 @@ package v1beta1
2
2
3
3
import (
4
4
"fmt"
5
+
"maps"
6
+
"slices"
5
7
"sort"
6
8
"strings"
7
9
8
10
"github.com/blang/semver/v4"
9
11
)
10
12
11
13
typeGrafanaPluginstruct {
12
-
Namestring`json:"name"`
14
+
// +kubebuilder:validation:MinLength=1
15
+
Namestring`json:"name"`
16
+
// TODO: kubernetes 1.34+ supports isSemver function, we should migrate to it after 1.33 reaches EOL. For now, using the official pattern https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
0 commit comments