File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
docs/book/src/cronjob-tutorial/testdata/project Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ import (
20
20
"flag"
21
21
"os"
22
22
23
- kbatchv1 "k8s.io/api/batch/v1"
24
23
"k8s.io/apimachinery/pkg/runtime"
25
24
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
26
25
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
@@ -38,8 +37,8 @@ The first difference to notice is that kubebuilder has added the new API
38
37
group's package (`batchv1`) to our scheme. This means that we can use those
39
38
objects in our controller.
40
39
41
- We'll also need to add the kubernetes batch v1 (`kbatchv1`) scheme, since we're creating
42
- and listing Jobs .
40
+ If we would be using any other CRD we would have to add their scheme the same way.
41
+ Builtin types such as Job have their scheme added by `clientgoscheme` .
43
42
*/
44
43
var (
45
44
scheme = runtime .NewScheme ()
49
48
func init () {
50
49
_ = clientgoscheme .AddToScheme (scheme )
51
50
52
- _ = kbatchv1 .AddToScheme (scheme ) // we've added this ourselves
53
51
_ = batchv1 .AddToScheme (scheme )
54
52
// +kubebuilder:scaffold:scheme
55
53
}
You can’t perform that action at this time.
0 commit comments