File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
chart/kube-arangodb/templates/ml-operator Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 52
52
- " secrets"
53
53
- " serviceaccounts"
54
54
verbs : ["*"]
55
+ - apiGroups : ["batch"]
56
+ resources :
57
+ - " cronjobs"
58
+ verbs : ["*"]
55
59
{{- end }}
56
60
{{- end }}
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import (
24
24
batchApi "k8s.io/api/batch/v1"
25
25
26
26
"github.com/arangodb/kube-arangodb/pkg/apis/shared"
27
+ "github.com/arangodb/kube-arangodb/pkg/util/errors"
27
28
)
28
29
29
30
type ArangoMLCronJobSpec struct {
@@ -33,5 +34,14 @@ type ArangoMLCronJobSpec struct {
33
34
}
34
35
35
36
func (a * ArangoMLCronJobSpec ) Validate () error {
36
- return shared .WithErrors (shared .PrefixResourceErrors ("spec" ))
37
+ if a == nil {
38
+ return errors .Newf ("Spec is not defined" )
39
+ }
40
+
41
+ var err []error
42
+ if a .CronJobSpec == nil {
43
+ err = append (err , shared .PrefixResourceErrors ("spec" , errors .Newf ("CronJobSpec is not defined" )))
44
+ }
45
+
46
+ return shared .WithErrors (err ... )
37
47
}
You can’t perform that action at this time.
0 commit comments