File tree Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 29
29
### Beyond the Basics
30
30
31
31
* Development Workflow
32
+ * [ Defining Boilerplate License Headers] ( beyond_basics/boilerplate.md )
32
33
* [ Running Tests] ( beyond_basics/running_tests.md )
33
34
* [ Generating API Documentation] ( beyond_basics/generating_documentation.md )
34
35
* [ Updating Kubebuilder] ( beyond_basics/upgrading_kubebuilder.md )
Original file line number Diff line number Diff line change
1
+ {% panel style="info", title="Under Development" %}
2
+ This book is being actively developed.
3
+ {% endpanel %}
4
+
5
+ # Defining Boilerplate License Headers
6
+
7
+ {% method %}
8
+
9
+ It is possible to add boilerplate license headers to all generated code by
10
+ modifying ` hack/boilerplate.go.txt ` .
11
+
12
+ If you don't create ` boilerplate.go.txt ` an empty version will be created for you by
13
+ ` kubebuilder init ` . Modifying this file will only impact files created afterward.
14
+
15
+ {% sample lang="bash" %}
16
+
17
+ ``` bash
18
+ mkdir hack
19
+ echo " // MY LICENSE" > hack/boilerplate.go.txt
20
+ kubebuilder init --domain k8s.io
21
+ ```
22
+
23
+ {% endmethod %}
24
+
Original file line number Diff line number Diff line change @@ -37,6 +37,9 @@ export PATH=$PATH:/usr/local/kubebuilder/bin
37
37
38
38
Initialize the project directory with the canonical project structure and go dependencies.
39
39
40
+ ** Note:** To add a boilerplate header to generated files, create ` hack/boilerplate.go.txt `
41
+ and add your boilerplate before running ` kubebuilder init ` .
42
+
40
43
{% sample lang="bash" %}
41
44
``` bash
42
45
kubebuilder init --domain k8s.io
You can’t perform that action at this time.
0 commit comments