@@ -66,7 +66,6 @@ Read the [Go modules blogpost][go-modules-blogpost] if unfamiliar with the modul
66
66
67
67
</aside >
68
68
69
-
70
69
## Create an API
71
70
72
71
Run the following command to create a new API (group/version) as ` webapp/v1 ` and the new Kind(CRD) ` Guestbook ` on it:
@@ -83,12 +82,12 @@ and the `internal/controllers/guestbook_controller.go` where the reconciliation
83
82
84
83
</aside >
85
84
86
-
87
85
** OPTIONAL:** Edit the API definition and the reconciliation business
88
86
logic. For more info see [ Designing an API] ( /cronjob-tutorial/api-design.md ) and [ What's in
89
87
a Controller] ( cronjob-tutorial/controller-overview.md ) .
90
88
91
89
If you are editing the API definitions, generate the manifests such as Custom Resources (CRs) or Custom Resource Definitions (CRDs) using
90
+
92
91
``` bash
93
92
make manifests
94
93
```
@@ -113,7 +112,7 @@ type GuestbookSpec struct {
113
112
ConfigMapName string ` json:"configMapName"`
114
113
115
114
// +kubebuilder:validation:Enum=Phone;Address;Name
116
- Type string ` json:"alias ,omitempty"`
115
+ Type string ` json:"type ,omitempty"`
117
116
}
118
117
119
118
// GuestbookStatus defines the observed state of Guestbook
@@ -145,10 +144,9 @@ type Guestbook struct {
145
144
</p >
146
145
</details >
147
146
148
-
149
147
## Test It Out
150
148
151
- You'll need a Kubernetes cluster to run against. You can use
149
+ You'll need a Kubernetes cluster to run against. You can use
152
150
[ KIND] ( https://sigs.k8s.io/kind ) to get a local cluster for testing, or
153
151
run against a remote cluster.
154
152
@@ -161,12 +159,14 @@ kubeconfig file (i.e. whatever cluster `kubectl cluster-info` shows).
161
159
</aside >
162
160
163
161
Install the CRDs into the cluster:
162
+
164
163
``` bash
165
164
make install
166
165
```
167
166
168
167
For quick feedback and code-level debugging, run your controller (this will run in the foreground, so switch to a new
169
168
terminal if you want to leave it running):
169
+
170
170
``` bash
171
171
make run
172
172
```
@@ -181,6 +181,7 @@ kubectl apply -k config/samples/
181
181
```
182
182
183
183
## Run It On the Cluster
184
+
184
185
When your controller is ready to be packaged and tested in other clusters.
185
186
186
187
Build and push your image to the location specified by ` IMG ` :
@@ -238,8 +239,8 @@ make undeploy
238
239
239
240
- Now, take a look at the [ Architecture Concept Diagram] [ architecture-concept-diagram ] for a clearer overview.
240
241
- Next, proceed with the [ Getting Started Guide] [ getting-started ] , which should take no more than 30 minutes and will
241
- provide a solid foundation. Afterward, dive into the [ CronJob Tutorial] [ cronjob-tutorial ] to deepen your
242
- understanding by developing a demo project.
242
+ provide a solid foundation. Afterward, dive into the [ CronJob Tutorial] [ cronjob-tutorial ] to deepen your
243
+ understanding by developing a demo project.
243
244
244
245
[ pre-rbc-gke ] : https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control#iam-rolebinding-bootstrap
245
246
[ cronjob-tutorial ] : https://book.kubebuilder.io/cronjob-tutorial/cronjob-tutorial.html
0 commit comments