@@ -17,9 +17,6 @@ limitations under the License.
17
17
package configgen
18
18
19
19
import (
20
- // required to make sure the controller-tools is initialized fully
21
- _ "sigs.k8s.io/controller-runtime/pkg/scheme"
22
-
23
20
"embed"
24
21
"fmt"
25
22
"io/ioutil"
@@ -28,6 +25,9 @@ import (
28
25
"path/filepath"
29
26
"strings"
30
27
28
+ // required to make sure the controller-tools is initialized fully
29
+ _ "sigs.k8s.io/controller-runtime/pkg/scheme"
30
+
31
31
"github.com/spf13/cobra"
32
32
"sigs.k8s.io/kustomize/kyaml/fn/framework"
33
33
"sigs.k8s.io/kustomize/kyaml/fn/framework/command"
@@ -37,6 +37,7 @@ import (
37
37
)
38
38
39
39
// TemplateFS contains the templates used by config-gen
40
+ //
40
41
//go:embed templates/resources/* templates/patches/*
41
42
var TemplateFS embed.FS
42
43
@@ -310,12 +311,12 @@ kubebuilder alpha config-gen install-as-plugin
310
311
fmt .Fprintf (cmd .OutOrStdout (), "writing kustomize plugin file at %s\n " , fullScriptPath )
311
312
312
313
dir , _ := filepath .Split (fullScriptPath )
313
- if err = os .MkdirAll (dir , 0700 ); err != nil {
314
+ if err = os .MkdirAll (dir , 0o700 ); err != nil {
314
315
return err
315
316
}
316
317
317
318
// r-x perms to prevent overwrite vulnerability since the script will be executed out-of-tree.
318
- return ioutil .WriteFile (fullScriptPath , []byte (pluginScript ), 0500 )
319
+ return ioutil .WriteFile (fullScriptPath , []byte (pluginScript ), 0o500 )
319
320
},
320
321
}
321
322
c .AddCommand (install )
0 commit comments