You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/sdk-cli-reference.md
+17-1Lines changed: 17 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -136,7 +136,7 @@ generates a default directory layout based on the input `project-name`.
136
136
137
137
### Args
138
138
139
-
*`project-name` - the project name of the new
139
+
*`project-name` - the project name of the new
140
140
141
141
### Flags
142
142
@@ -186,6 +186,22 @@ operator-sdk up local --kubeconfig "mycluster.kubecfg" \
186
186
--operator-flags "--flag1 value1 --flag2=value2"
187
187
```
188
188
189
+
The below example will use the default kubeconfig, the default namespace environment var, and pass in flags for the operator.
190
+
To use the operator flags, your operator must know how to handle the option. Below imagine an operator that understands the `resync-interval` flag.
191
+
192
+
```bash
193
+
operator-sdk up local --operator-flags "--resync-interval 10"
194
+
```
195
+
196
+
If you are planning on using a different namespace than the default, then you should use the `--namespace` flag to change where the operator is watching for custom resources to be created.
197
+
For this to work your operator must handle the `WATCH_NAMESPACE` environment variable. To do that you can use the [utility function][utility_link]`k8sutil.GetWatchNamespace` in your operator.
0 commit comments