Skip to content

Commit 947a464

Browse files
author
Eric Stroczynski
authored
bump controller-runtime/-tools to v0.2.0, helm to 2.14, kubernetes to 1.14 (operator-framework#1876)
* go.mod,go.sum: bump controller-runtime/-tools to v0.2.0, helm to v2.14.0, and kubernetes deps to 1.14.1 and revendor * doc/,CHANGELOG.md: bump docs to controller-runtime/-tools v0.2.0, helm v2.14.0, kubernetes-1.14.1 * *: bump code to controller-runtime/-tools v0.2.0, helm v2.14.0, kubernetes-1.14.1 * *: update CRD and CR manifest file names to <full group>_<resource>_crd.yaml and <full group>_<version>_<kind>_cr.yaml * hack/tests/scaffolding/scaffold-memcached.go: always use local SDK dir in CI
1 parent df161f7 commit 947a464

File tree

123 files changed

+1082
-860
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+1082
-860
lines changed

CHANGELOG.md

+33
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,39 @@
1313
- The Helm operator now uses the CR name for the release name for newly created CRs. Existing CRs will continue to use their existing UID-based release name. When a release name collision occurs (when CRs of different types share the same name), the second CR will fail to install with an error about a duplicate name. ([#1818](https://github.com/operator-framework/operator-sdk/pull/1818))
1414
- Commands [`olm uninstall`](https://github.com/operator-framework/operator-sdk/blob/master/doc/sdk-cli-reference.md#uninstall) and [`olm status`](https://github.com/operator-framework/operator-sdk/blob/master/doc/sdk-cli-reference.md#status) no longer use a `--version` flag to specify OLM version. This information is now retrieved from the running cluster. ([#1634](https://github.com/operator-framework/operator-sdk/pull/1634))
1515
- The Helm operator no longer prints manifest diffs in the operator log at verbosity levels lower than INFO ([#1857](https://github.com/operator-framework/operator-sdk/pull/1857))
16+
- CRD manifest `spec.version` is still supported, but users will see a warning message if `spec.versions` is not present and an error if `spec.versions` is populated but the version in `spec.version` is not in `spec.versions`. ([#1876](https://github.com/operator-framework/operator-sdk/pull/1876))
17+
18+
### Breaking changes
19+
20+
- Upgrade Kubernetes version from `kubernetes-1.13.4` to `kubernetes-1.14.1` ([#1876](https://github.com/operator-framework/operator-sdk/pull/1876))
21+
- Upgrade `github.com/operator-framework/operator-lifecycle-manager` version from `b8a4faf68e36feb6d99a6aec623b405e587b17b1` to `0.10.1` ([#1876](https://github.com/operator-framework/operator-sdk/pull/1876))
22+
- Upgrade [`controller-runtime`](https://github.com/kubernetes-sigs/controller-runtime) version from `v0.1.12` to `v0.2.0` ([#1876](https://github.com/operator-framework/operator-sdk/pull/1876))
23+
- The package `sigs.k8s.io/controller-runtime/pkg/runtime/scheme` is deprecated, and contains no code. Replace this import with `sigs.k8s.io/controller-runtime/pkg/scheme` where relevant.
24+
- The package `sigs.k8s.io/controller-runtime/pkg/runtime/log` is deprecated. Replace this import with `sigs.k8s.io/controller-runtime/pkg/log` where relevant.
25+
- The package `sigs.k8s.io/controller-runtime/pkg/runtime/signals` is deprecated. Replace this import with `sigs.k8s.io/controller-runtime/pkg/manager/signals` where relevant.
26+
- All methods on [`sigs.k8s.io/controller-runtime/pkg/client.Client`](https://github.com/kubernetes-sigs/controller-runtime/blob/v0.2.0/pkg/client/interfaces.go#L104) (except for `Get()`) have been updated. Instead of each using a `struct`-typed or variadic functional option parameter, or having no option parameter, each now uses a variadic interface option parameter typed for each method. See `List()` below for an example.
27+
- [`sigs.k8s.io/controller-runtime/pkg/client.Client`](https://github.com/kubernetes-sigs/controller-runtime/blob/v0.2.0/pkg/client/interfaces.go#L104)'s `List()` method signature has been updated: `List(ctx context.Context, opts *client.ListOptions, list runtime.Object) error` is now [`List(ctx context.Context, list runtime.Object, opts ...client.ListOption) error`](https://github.com/kubernetes-sigs/controller-runtime/blob/v0.2.0/pkg/client/interfaces.go#L61). To migrate:
28+
```go
29+
import (
30+
"context"
31+
32+
"sigs.k8s.io/controller-runtime/pkg/client"
33+
)
34+
35+
...
36+
37+
// Old
38+
listOpts := &client.ListOptions{}
39+
listOpts.InNamespace("namespace")
40+
err = r.client.List(context.TODO(), listOps, podList)
41+
// New
42+
listOpts := []client.ListOption{
43+
client.InNamespace("namespace"),
44+
}
45+
err = r.client.List(context.TODO(), podList, listOpts...)
46+
```
47+
- [`pkg/test.FrameworkClient`](https://github.com/operator-framework/operator-sdk/blob/master/pkg/test/client.go#L33) methods `List()` and `Delete()` have new signatures corresponding to the homonymous methods of `sigs.k8s.io/controller-runtime/pkg/client.Client`. ([#1876](https://github.com/operator-framework/operator-sdk/pull/1876))
48+
- CRD file names were previously of the form `<group>_<version>_<kind>_crd.yaml`. Now that CRD manifest `spec.version` is deprecated in favor of `spec.versions`, i.e. multiple versions can be specified in one CRD, CRD file names have the form `<full group>_<resource>_crd.yaml`. `<full group>` is the full group name of your CRD while `<group>` is the last subdomain of `<full group>`, ex. `foo.bar.com` vs `foo`. `<resource>` is the plural lower-case CRD Kind found at `spec.names.plural`. ([#1876](https://github.com/operator-framework/operator-sdk/pull/1876))
1649

1750
### Deprecated
1851

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ $ kubectl create -f deploy/service_account.yaml
9090
$ kubectl create -f deploy/role.yaml
9191
$ kubectl create -f deploy/role_binding.yaml
9292
# Setup the CRD
93-
$ kubectl create -f deploy/crds/app_v1alpha1_appservice_crd.yaml
93+
$ kubectl create -f deploy/crds/app.example.com_appservices_crd.yaml
9494
# Deploy the app-operator
9595
$ kubectl create -f deploy/operator.yaml
9696

9797
# Create an AppService CR
9898
# The default controller will watch for AppService objects and create a pod for each CR
99-
$ kubectl create -f deploy/crds/app_v1alpha1_appservice_cr.yaml
99+
$ kubectl create -f deploy/crds/app.example.com_v1alpha1_appservice_cr.yaml
100100

101101
# Verify that a pod is created
102102
$ kubectl get pod -l app=example-appservice
@@ -122,12 +122,12 @@ Spec:
122122
Size: 3
123123

124124
# Cleanup
125-
$ kubectl delete -f deploy/crds/app_v1alpha1_appservice_cr.yaml
125+
$ kubectl delete -f deploy/crds/app.example.com_v1alpha1_appservice_cr.yaml
126126
$ kubectl delete -f deploy/operator.yaml
127127
$ kubectl delete -f deploy/role.yaml
128128
$ kubectl delete -f deploy/role_binding.yaml
129129
$ kubectl delete -f deploy/service_account.yaml
130-
$ kubectl delete -f deploy/crds/app_v1alpha1_appservice_crd.yaml
130+
$ kubectl delete -f deploy/crds/app.example.com_appservices_crd.yaml
131131
```
132132

133133
**Note:** Following the steps in the [Getting Started Repository][getting_started] to learn how to developer your Operators projects.

ci/tests/e2e-ansible.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ deploy_operator() {
3535
fi
3636
kubectl create -f "$OPERATORDIR/deploy/role.yaml"
3737
kubectl create -f "$OPERATORDIR/deploy/role_binding.yaml"
38-
kubectl create -f "$OPERATORDIR/deploy/crds/ansible_v1alpha1_memcached_crd.yaml"
39-
kubectl create -f "$OPERATORDIR/deploy/crds/ansible_v1alpha1_foo_crd.yaml"
38+
kubectl create -f "$OPERATORDIR/deploy/crds/ansible.example.com_memcacheds_crd.yaml"
39+
kubectl create -f "$OPERATORDIR/deploy/crds/ansible.example.com_foos_crd.yaml"
4040
kubectl create -f "$OPERATORDIR/deploy/operator.yaml"
4141
}
4242

4343
remove_operator() {
4444
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/service_account.yaml"
4545
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/role.yaml"
4646
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/role_binding.yaml"
47-
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/crds/ansible_v1alpha1_memcached_crd.yaml"
48-
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/crds/ansible_v1alpha1_foo_crd.yaml"
47+
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/crds/ansible.example.com_memcacheds_crd.yaml"
48+
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/crds/ansible.example.com_foos_crd.yaml"
4949
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/operator.yaml"
5050
}
5151

@@ -91,7 +91,7 @@ test_operator() {
9191
fi
9292

9393
# create CR
94-
kubectl create -f deploy/crds/ansible_v1alpha1_memcached_cr.yaml
94+
kubectl create -f deploy/crds/ansible.example.com_v1alpha1_memcached_cr.yaml
9595
if ! timeout 20s bash -c -- 'until kubectl get deployment -l app=memcached | grep memcached; do sleep 1; done';
9696
then
9797
echo FAIL: operator failed to create memcached Deployment
@@ -125,7 +125,7 @@ test_operator() {
125125
kubectl create configmap deleteme
126126
trap_add 'kubectl delete --ignore-not-found configmap deleteme' EXIT
127127

128-
kubectl delete -f ${OPERATORDIR}/deploy/crds/ansible_v1alpha1_memcached_cr.yaml --wait=true
128+
kubectl delete -f ${OPERATORDIR}/deploy/crds/ansible.example.com_v1alpha1_memcached_cr.yaml --wait=true
129129
# if the finalizer did not delete the configmap...
130130
if kubectl get configmap deleteme 2> /dev/null;
131131
then

ci/tests/e2e-helm.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ deploy_operator() {
3232
kubectl create -f "$OPERATORDIR/deploy/service_account.yaml"
3333
kubectl create -f "$OPERATORDIR/deploy/role.yaml"
3434
kubectl create -f "$OPERATORDIR/deploy/role_binding.yaml"
35-
kubectl create -f "$OPERATORDIR/deploy/crds/helm_v1alpha1_nginx_crd.yaml"
35+
kubectl create -f "$OPERATORDIR/deploy/crds/helm.example.com_nginxes_crd.yaml"
3636
kubectl create -f "$OPERATORDIR/deploy/operator.yaml"
3737
}
3838

3939
remove_operator() {
4040
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/service_account.yaml"
4141
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/role.yaml"
4242
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/role_binding.yaml"
43-
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/crds/helm_v1alpha1_nginx_crd.yaml"
43+
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/crds/helm.example.com_nginxes_crd.yaml"
4444
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/operator.yaml"
4545
}
4646

@@ -69,8 +69,8 @@ test_operator() {
6969
fi
7070

7171
# create CR
72-
kubectl create -f deploy/crds/helm_v1alpha1_nginx_cr.yaml
73-
trap_add 'kubectl delete --ignore-not-found -f ${OPERATORDIR}/deploy/crds/helm_v1alpha1_nginx_cr.yaml' EXIT
72+
kubectl create -f deploy/crds/helm.example.com_v1alpha1_nginx_cr.yaml
73+
trap_add 'kubectl delete --ignore-not-found -f ${OPERATORDIR}/deploy/crds/helm.example.com_v1alpha1_nginx_cr.yaml' EXIT
7474
if ! timeout 1m bash -c -- 'until kubectl get nginxes.helm.example.com example-nginx -o jsonpath="{..status.deployedRelease.name}" | grep "example-nginx"; do sleep 1; done';
7575
then
7676
kubectl logs deployment/nginx-operator
@@ -113,7 +113,7 @@ test_operator() {
113113
exit 1
114114
fi
115115

116-
kubectl delete -f deploy/crds/helm_v1alpha1_nginx_cr.yaml --wait=true
116+
kubectl delete -f deploy/crds/helm.example.com_v1alpha1_nginx_cr.yaml --wait=true
117117
kubectl logs deployment/nginx-operator | grep "Uninstalled release" | grep "${release_name}"
118118
}
119119

cmd/operator-sdk/add/api.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ By default, this command runs Kubernetes deepcopy and OpenAPI V3 generators on
5050
tagged types in all paths under pkg/apis. Go code is generated under
5151
pkg/apis/<group>/<version>/zz_generated.{deepcopy,openapi}.go. CRD's are
5252
generated, or updated if they exist for a particular group + version + kind,
53-
under deploy/crds/<group>_<version>_<kind>_crd.yaml; OpenAPI V3 validation YAML
53+
under deploy/crds/<full group>_<resource>_crd.yaml; OpenAPI V3 validation YAML
5454
is generated as a 'validation' object. Generation can be disabled with the
5555
--skip-generation flag.
5656
@@ -68,8 +68,8 @@ Example:
6868
├── zz_generated.deepcopy.go
6969
├── zz_generated.openapi.go
7070
$ tree deploy/crds
71-
├── deploy/crds/app_v1alpha1_appservice_cr.yaml
72-
├── deploy/crds/app_v1alpha1_appservice_crd.yaml
71+
├── deploy/crds/app.example.com_v1alpha1_appservice_cr.yaml
72+
├── deploy/crds/app.example.com_appservices_crd.yaml
7373
`,
7474
RunE: apiRun,
7575
}

cmd/operator-sdk/add/crd.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ func newAddCRDCmd() *cobra.Command {
3535
Short: "Adds a Custom Resource Definition (CRD) and the Custom Resource (CR) files",
3636
Long: `The operator-sdk add crd command will create a Custom Resource Definition (CRD) and the Custom Resource (CR) files for the specified api-version and kind.
3737
38-
Generated CRD filename: <project-name>/deploy/crds/<group>_<version>_<kind>_crd.yaml
39-
Generated CR filename: <project-name>/deploy/crds/<group>_<version>_<kind>_cr.yaml
38+
Generated CRD filename: <project-name>/deploy/crds/<full group>_<resource>_crd.yaml
39+
Generated CR filename: <project-name>/deploy/crds/<full group>_<version>_<kind>_cr.yaml
4040
4141
<project-name>/deploy path must already exist
4242
--api-version and --kind are required flags to generate the new operator application.

cmd/operator-sdk/generate/openapi.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func newGenerateOpenAPICmd() *cobra.Command {
2929
in all pkg/apis/<group>/<version> directories. Go code is generated under
3030
pkg/apis/<group>/<version>/zz_generated.openapi.go. CRD's are generated, or
3131
updated if they exist for a particular group + version + kind, under
32-
deploy/crds/<group>_<version>_<kind>_crd.yaml; OpenAPI V3 validation YAML
32+
deploy/crds/<full group>_<resource>_crd.yaml; OpenAPI V3 validation YAML
3333
is generated as a 'validation' object.
3434
3535
Example:
@@ -40,8 +40,8 @@ Example:
4040
└── v1alpha1
4141
├── zz_generated.openapi.go
4242
$ tree deploy/crds
43-
├── deploy/crds/app_v1alpha1_appservice_cr.yaml
44-
├── deploy/crds/app_v1alpha1_appservice_crd.yaml
43+
├── deploy/crds/app.example.com_v1alpha1_appservice_cr.yaml
44+
├── deploy/crds/app.example.com_appservices_crd.yaml
4545
`,
4646
RunE: openAPIFunc,
4747
}

cmd/operator-sdk/run/ansible.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"github.com/operator-framework/operator-sdk/pkg/log/zap"
2121

2222
"github.com/spf13/cobra"
23-
logf "sigs.k8s.io/controller-runtime/pkg/runtime/log"
23+
logf "sigs.k8s.io/controller-runtime/pkg/log"
2424
)
2525

2626
// newRunAnsibleCmd returns a command that will run an ansible operator.

cmd/operator-sdk/run/helm.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"github.com/operator-framework/operator-sdk/pkg/log/zap"
2121

2222
"github.com/spf13/cobra"
23-
logf "sigs.k8s.io/controller-runtime/pkg/runtime/log"
23+
logf "sigs.k8s.io/controller-runtime/pkg/log"
2424
)
2525

2626
// newRunHelmCmd returns a command that will run a helm operator.

cmd/operator-sdk/up/local.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import (
3838

3939
log "github.com/sirupsen/logrus"
4040
"github.com/spf13/cobra"
41-
logf "sigs.k8s.io/controller-runtime/pkg/runtime/log"
41+
logf "sigs.k8s.io/controller-runtime/pkg/log"
4242
)
4343

4444
// newLocalCmd - up local command to run an operator loccally

doc/ansible/dev/developer_guide.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ Create a Custom Resource Definition (CRD) and proper Role-Based Access Control
211211
(RBAC) definitions for resource Foo. `operator-sdk` auto-generates these files
212212
inside of the `deploy` folder:
213213
```bash
214-
$ kubectl create -f deploy/crds/foo_v1alpha1_foo_crd.yaml
214+
$ kubectl create -f deploy/crds/foo.example.com_foos_crd.yaml
215215
$ kubectl create -f deploy/service_account.yaml
216216
$ kubectl create -f deploy/role.yaml
217217
$ kubectl create -f deploy/role_binding.yaml
@@ -306,7 +306,7 @@ $ sed -i "" 's|REPLACE_IMAGE|quay.io/example/foo-operator:v0.0.1|g' deploy/opera
306306
Deploy the foo-operator:
307307

308308
```sh
309-
$ kubectl create -f deploy/crds/foo_v1alpha1_foo_crd.yaml # if CRD doesn't exist already
309+
$ kubectl create -f deploy/crds/foo.example.com_foos_crd.yaml # if CRD doesn't exist already
310310
$ kubectl create -f deploy/service_account.yaml
311311
$ kubectl create -f deploy/role.yaml
312312
$ kubectl create -f deploy/role_binding.yaml

doc/ansible/user-guide.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ resource definition the operator will be watching.
217217
Deploy the CRD:
218218

219219
```sh
220-
$ kubectl create -f deploy/crds/cache_v1alpha1_memcached_crd.yaml
220+
$ kubectl create -f deploy/crds/cache.example.com_memcacheds_crd.yaml
221221
```
222222

223223
Once this is done, there are two ways to run the operator:
@@ -305,18 +305,18 @@ INFO[0000] operator-sdk Version: 0.0.5+git
305305

306306
### Create a Memcached CR
307307

308-
Modify `deploy/crds/cache_v1alpha1_memcached_cr.yaml` as shown and create a `Memcached` custom resource:
308+
Modify `deploy/crds/cache.example.com_v1alpha1_memcached_cr.yaml` as shown and create a `Memcached` custom resource:
309309

310310
```sh
311-
$ cat deploy/crds/cache_v1alpha1_memcached_cr.yaml
311+
$ cat deploy/crds/cache.example.com_v1alpha1_memcached_cr.yaml
312312
apiVersion: "cache.example.com/v1alpha1"
313313
kind: "Memcached"
314314
metadata:
315315
name: "example-memcached"
316316
spec:
317317
size: 3
318318
319-
$ kubectl apply -f deploy/crds/cache_v1alpha1_memcached_cr.yaml
319+
$ kubectl apply -f deploy/crds/cache.example.com_v1alpha1_memcached_cr.yaml
320320
```
321321

322322
Ensure that the memcached-operator creates the deployment for the CR:
@@ -371,15 +371,15 @@ Change the `spec.size` field in the memcached CR from 3 to 4 and apply the
371371
change:
372372

373373
```sh
374-
$ cat deploy/crds/cache_v1alpha1_memcached_cr.yaml
374+
$ cat deploy/crds/cache.example.com_v1alpha1_memcached_cr.yaml
375375
apiVersion: "cache.example.com/v1alpha1"
376376
kind: "Memcached"
377377
metadata:
378378
name: "example-memcached"
379379
spec:
380380
size: 4
381381
382-
$ kubectl apply -f deploy/crds/cache_v1alpha1_memcached_cr.yaml
382+
$ kubectl apply -f deploy/crds/cache.example.com_v1alpha1_memcached_cr.yaml
383383
```
384384

385385
Confirm that the operator changes the deployment size:
@@ -395,12 +395,12 @@ example-memcached 4 4 4 4 5m
395395
Clean up the resources:
396396

397397
```sh
398-
$ kubectl delete -f deploy/crds/cache_v1alpha1_memcached_cr.yaml
398+
$ kubectl delete -f deploy/crds/cache.example.com_v1alpha1_memcached_cr.yaml
399399
$ kubectl delete -f deploy/operator.yaml
400400
$ kubectl delete -f deploy/role_binding.yaml
401401
$ kubectl delete -f deploy/role.yaml
402402
$ kubectl delete -f deploy/service_account.yaml
403-
$ kubectl delete -f deploy/crds/cache_v1alpha1_memcached_crd.yaml
403+
$ kubectl delete -f deploy/crds/cache.example.com_memcacheds_crd.yaml
404404
```
405405

406406
[operator-scope]:./../operator-scope.md

doc/helm/dev/developer_guide.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ INFO[0000] Created deploy/service_account.yaml
3737
INFO[0000] Created deploy/role.yaml
3838
INFO[0000] Created deploy/role_binding.yaml
3939
INFO[0000] Created deploy/operator.yaml
40-
INFO[0000] Created deploy/crds/foo_v1alpha1_foo_crd.yaml
41-
INFO[0000] Created deploy/crds/foo_v1alpha1_foo_cr.yaml
40+
INFO[0000] Created deploy/crds/foo.example.com_foos_crd.yaml
41+
INFO[0000] Created deploy/crds/foo.example.com_v1alpha1_foo_cr.yaml
4242
INFO[0000] Created helm-charts/foo/
4343
INFO[0000] Run git init ...
44-
Initialized empty Git repository in /home/joe/go/src/github.com/operator-framework/foo-operator/.git/
44+
Initialized empty Git repository in /home/user/go/src/github.com/operator-framework/foo-operator/.git/
4545
INFO[0000] Run git init done
4646
INFO[0000] Project creation complete.
4747

@@ -283,7 +283,7 @@ Create a Custom Resource Definition (CRD) for resource Foo. `operator-sdk` autog
283283
inside of the `deploy` folder:
284284

285285
```sh
286-
kubectl create -f deploy/crds/foo_v1alpha1_foo_crd.yaml
286+
kubectl create -f deploy/crds/foo.example.com_foos_crd.yaml
287287
```
288288

289289
**NOTE:** When running the Helm operator locally, the `up local` command will default to using the kubeconfig file specified by `$KUBECONFIG` with a fallback to `$HOME/.kube/config` if not set. In this case, the autogenerated RBAC definitions do not need to be applied to the cluster.
@@ -302,7 +302,7 @@ INFO[0000] operator-sdk Version: v0.2.0+git
302302

303303
Now that the operator is watching resource `Foo` for events, the creation of a
304304
Custom Resource will trigger our Helm chart to be executed. Take a look at
305-
`deploy/crds/foo_v1alpha1_foo_cr.yaml`. Our chart does not have a `size` value,
305+
`deploy/crds/foo.example.com_v1alpha1_foo_cr.yaml`. Our chart does not have a `size` value,
306306
so let's remove it. Your CR file should look like the following:
307307

308308
```yaml
@@ -322,7 +322,7 @@ Create a Custom Resource instance of Foo with default var `state` set to
322322
`present`:
323323

324324
```sh
325-
$ kubectl apply -f deploy/crds/foo_v1alpha1_foo_cr.yaml
325+
$ kubectl apply -f deploy/crds/foo.example.com_v1alpha1_foo_cr.yaml
326326
foo.foo.example.com/example-foo created
327327
```
328328

@@ -353,7 +353,7 @@ replicaset.apps/example-foo-4f8ay4vfr99ulx905hax3j6x1-9dfd67fc6 1 1
353353
354354
```
355355

356-
Modify `deploy/crds/foo_v1alpha1_foo_cr.yaml` to set `replicaCount` to `2`:
356+
Modify `deploy/crds/foo.example.com_v1alpha1_foo_cr.yaml` to set `replicaCount` to `2`:
357357

358358
```yaml
359359
apiVersion: "foo.example.com/v1alpha1"
@@ -368,7 +368,7 @@ spec:
368368
Apply the changes to Kubernetes and confirm that the deployment has 2 replicas:
369369

370370
```sh
371-
$ kubectl apply -f deploy/crds/foo_v1alpha1_foo_cr.yaml
371+
$ kubectl apply -f deploy/crds/foo.example.com_v1alpha1_foo_cr.yaml
372372
foo.foo.example.com/example-foo configured
373373
374374
$ kubectl get deployment -l app.kubernetes.io/instance=${RELEASE_NAME}
@@ -407,7 +407,7 @@ sed -i "" 's|REPLACE_IMAGE|quay.io/example/foo-operator:v0.0.1|g' deploy/operato
407407
Deploy the foo-operator:
408408

409409
```sh
410-
kubectl create -f deploy/crds/foo_v1alpha1_foo_crd.yaml # if CRD doesn't exist already
410+
kubectl create -f deploy/crds/foo.example.com_foos_crd.yaml # if CRD doesn't exist already
411411
kubectl create -f deploy/service_account.yaml
412412
kubectl create -f deploy/role.yaml
413413
kubectl create -f deploy/role_binding.yaml

0 commit comments

Comments
 (0)