Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
fc3b764
deps: bump to controller-runtime v0.2.0, kubernetes-1.14.1, and… (#1512)
Jul 3, 2019
2742167
Merge branch 'master' into refactor/controller-runtime-v0.2.0
Jul 7, 2019
fff2260
Merge branch 'master' into refactor/controller-runtime-v0.2.0
Jul 8, 2019
f8c0685
Merge branch 'master' into refactor/controller-runtime-v0.2.0
Jul 9, 2019
ba23b97
Merge branch 'master' into refactor/controller-runtime-v0.2.0
Jul 10, 2019
589bc75
remove leftover vendored deps
Jul 10, 2019
0b32a6f
Merge branch 'master' into refactor/controller-runtime-v0.2.0
Jul 16, 2019
2ea69c6
Merge branch 'master' into refactor/controller-runtime-v0.2.0
Jul 18, 2019
7dd8fcc
Merge branch 'master' into refactor/controller-runtime-v0.2.0
Aug 2, 2019
f98d304
Merge branch 'master' into refactor/controller-runtime-v0.2.0
Aug 2, 2019
114e0ae
CHANGELOG.md: move breaking changes around and permalink Client/List …
Aug 2, 2019
c825c90
Merge branch 'master' into refactor/controller-runtime-v0.2.0
Aug 5, 2019
7b855fe
Merge branch 'master' into refactor/controller-runtime-v0.2.0
Aug 8, 2019
3dcdc04
(c-r v0.2.0) internal/pkg/scaffold: update dep manager scaffolds (#1801)
Aug 8, 2019
d3abf04
Merge branch 'master' into refactor/controller-runtime-v0.2.0
Aug 9, 2019
922f52f
(c-r v0.2.0) *: update CRD manifest file names to <full group>_… (#1784)
Aug 10, 2019
0fda655
(c-r v0.2.0) *: CR name format change (#1811)
Aug 12, 2019
7f575be
Merge branch 'master' into refactor/controller-runtime-v0.2.0
Aug 19, 2019
4d330f3
bump controller-tools to v0.2.0 (#1642)
Aug 29, 2019
7968c5a
(c-r v0.2.0) *: bump controller-runtime to v0.2.0, update APIs and do…
Sep 3, 2019
ce002d8
Merge branch 'master' into refactor/controller-runtime-v0.2.0
Sep 3, 2019
7360f16
pkg/ansible/operator/operator.go: remove, missed in merge
Sep 3, 2019
b8cf4de
fix CHANGELOG.md duplicate entry, add PR links, and move helm and kub…
Sep 4, 2019
4c864c4
hack/tests/scaffolding/scaffold-memcached.go: always use local SDK di…
Aug 8, 2019
4e664d7
Merge branch 'master' into refactor/controller-runtime-v0.2.0
Sep 9, 2019
853085f
Merge branch 'master' into refactor/controller-runtime-v0.2.0
Sep 10, 2019
350646d
fix import path
Sep 10, 2019
ad2bcb2
Merge branch 'master' into refactor/controller-runtime-v0.2.0
Sep 10, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,39 @@
- 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))
- 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))
- 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))
- 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))

### Breaking changes

- Upgrade Kubernetes version from `kubernetes-1.13.4` to `kubernetes-1.14.1` ([#1876](https://github.com/operator-framework/operator-sdk/pull/1876))
- 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))
- 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))
- 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.
- 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.
- 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.
- 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.
- [`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:
```go
import (
"context"

"sigs.k8s.io/controller-runtime/pkg/client"
)

...

// Old
listOpts := &client.ListOptions{}
listOpts.InNamespace("namespace")
err = r.client.List(context.TODO(), listOps, podList)
// New
listOpts := []client.ListOption{
client.InNamespace("namespace"),
}
err = r.client.List(context.TODO(), podList, listOpts...)
```
- [`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))
- 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))

### Deprecated

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ $ kubectl create -f deploy/service_account.yaml
$ kubectl create -f deploy/role.yaml
$ kubectl create -f deploy/role_binding.yaml
# Setup the CRD
$ kubectl create -f deploy/crds/app_v1alpha1_appservice_crd.yaml
$ kubectl create -f deploy/crds/app.example.com_appservices_crd.yaml
# Deploy the app-operator
$ kubectl create -f deploy/operator.yaml

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

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

# Cleanup
$ kubectl delete -f deploy/crds/app_v1alpha1_appservice_cr.yaml
$ kubectl delete -f deploy/crds/app.example.com_v1alpha1_appservice_cr.yaml
$ kubectl delete -f deploy/operator.yaml
$ kubectl delete -f deploy/role.yaml
$ kubectl delete -f deploy/role_binding.yaml
$ kubectl delete -f deploy/service_account.yaml
$ kubectl delete -f deploy/crds/app_v1alpha1_appservice_crd.yaml
$ kubectl delete -f deploy/crds/app.example.com_appservices_crd.yaml
```

**Note:** Following the steps in the [Getting Started Repository][getting_started] to learn how to developer your Operators projects.
Expand Down
12 changes: 6 additions & 6 deletions ci/tests/e2e-ansible.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ deploy_operator() {
fi
kubectl create -f "$OPERATORDIR/deploy/role.yaml"
kubectl create -f "$OPERATORDIR/deploy/role_binding.yaml"
kubectl create -f "$OPERATORDIR/deploy/crds/ansible_v1alpha1_memcached_crd.yaml"
kubectl create -f "$OPERATORDIR/deploy/crds/ansible_v1alpha1_foo_crd.yaml"
kubectl create -f "$OPERATORDIR/deploy/crds/ansible.example.com_memcacheds_crd.yaml"
kubectl create -f "$OPERATORDIR/deploy/crds/ansible.example.com_foos_crd.yaml"
kubectl create -f "$OPERATORDIR/deploy/operator.yaml"
}

remove_operator() {
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/service_account.yaml"
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/role.yaml"
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/role_binding.yaml"
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/crds/ansible_v1alpha1_memcached_crd.yaml"
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/crds/ansible_v1alpha1_foo_crd.yaml"
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/crds/ansible.example.com_memcacheds_crd.yaml"
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/crds/ansible.example.com_foos_crd.yaml"
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/operator.yaml"
}

Expand Down Expand Up @@ -91,7 +91,7 @@ test_operator() {
fi

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

kubectl delete -f ${OPERATORDIR}/deploy/crds/ansible_v1alpha1_memcached_cr.yaml --wait=true
kubectl delete -f ${OPERATORDIR}/deploy/crds/ansible.example.com_v1alpha1_memcached_cr.yaml --wait=true
# if the finalizer did not delete the configmap...
if kubectl get configmap deleteme 2> /dev/null;
then
Expand Down
10 changes: 5 additions & 5 deletions ci/tests/e2e-helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ deploy_operator() {
kubectl create -f "$OPERATORDIR/deploy/service_account.yaml"
kubectl create -f "$OPERATORDIR/deploy/role.yaml"
kubectl create -f "$OPERATORDIR/deploy/role_binding.yaml"
kubectl create -f "$OPERATORDIR/deploy/crds/helm_v1alpha1_nginx_crd.yaml"
kubectl create -f "$OPERATORDIR/deploy/crds/helm.example.com_nginxes_crd.yaml"
kubectl create -f "$OPERATORDIR/deploy/operator.yaml"
}

remove_operator() {
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/service_account.yaml"
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/role.yaml"
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/role_binding.yaml"
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/crds/helm_v1alpha1_nginx_crd.yaml"
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/crds/helm.example.com_nginxes_crd.yaml"
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/operator.yaml"
}

Expand Down Expand Up @@ -69,8 +69,8 @@ test_operator() {
fi

# create CR
kubectl create -f deploy/crds/helm_v1alpha1_nginx_cr.yaml
trap_add 'kubectl delete --ignore-not-found -f ${OPERATORDIR}/deploy/crds/helm_v1alpha1_nginx_cr.yaml' EXIT
kubectl create -f deploy/crds/helm.example.com_v1alpha1_nginx_cr.yaml
trap_add 'kubectl delete --ignore-not-found -f ${OPERATORDIR}/deploy/crds/helm.example.com_v1alpha1_nginx_cr.yaml' EXIT
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';
then
kubectl logs deployment/nginx-operator
Expand Down Expand Up @@ -113,7 +113,7 @@ test_operator() {
exit 1
fi

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

Expand Down
6 changes: 3 additions & 3 deletions cmd/operator-sdk/add/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ By default, this command runs Kubernetes deepcopy and OpenAPI V3 generators on
tagged types in all paths under pkg/apis. Go code is generated under
pkg/apis/<group>/<version>/zz_generated.{deepcopy,openapi}.go. CRD's are
generated, or updated if they exist for a particular group + version + kind,
under deploy/crds/<group>_<version>_<kind>_crd.yaml; OpenAPI V3 validation YAML
under deploy/crds/<full group>_<resource>_crd.yaml; OpenAPI V3 validation YAML
is generated as a 'validation' object. Generation can be disabled with the
--skip-generation flag.

Expand All @@ -68,8 +68,8 @@ Example:
├── zz_generated.deepcopy.go
├── zz_generated.openapi.go
$ tree deploy/crds
├── deploy/crds/app_v1alpha1_appservice_cr.yaml
├── deploy/crds/app_v1alpha1_appservice_crd.yaml
├── deploy/crds/app.example.com_v1alpha1_appservice_cr.yaml
├── deploy/crds/app.example.com_appservices_crd.yaml
`,
RunE: apiRun,
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/operator-sdk/add/crd.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ func newAddCRDCmd() *cobra.Command {
Short: "Adds a Custom Resource Definition (CRD) and the Custom Resource (CR) files",
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.

Generated CRD filename: <project-name>/deploy/crds/<group>_<version>_<kind>_crd.yaml
Generated CR filename: <project-name>/deploy/crds/<group>_<version>_<kind>_cr.yaml
Generated CRD filename: <project-name>/deploy/crds/<full group>_<resource>_crd.yaml
Generated CR filename: <project-name>/deploy/crds/<full group>_<version>_<kind>_cr.yaml

<project-name>/deploy path must already exist
--api-version and --kind are required flags to generate the new operator application.
Expand Down
6 changes: 3 additions & 3 deletions cmd/operator-sdk/generate/openapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func newGenerateOpenAPICmd() *cobra.Command {
in all pkg/apis/<group>/<version> directories. Go code is generated under
pkg/apis/<group>/<version>/zz_generated.openapi.go. CRD's are generated, or
updated if they exist for a particular group + version + kind, under
deploy/crds/<group>_<version>_<kind>_crd.yaml; OpenAPI V3 validation YAML
deploy/crds/<full group>_<resource>_crd.yaml; OpenAPI V3 validation YAML
is generated as a 'validation' object.

Example:
Expand All @@ -40,8 +40,8 @@ Example:
└── v1alpha1
├── zz_generated.openapi.go
$ tree deploy/crds
├── deploy/crds/app_v1alpha1_appservice_cr.yaml
├── deploy/crds/app_v1alpha1_appservice_crd.yaml
├── deploy/crds/app.example.com_v1alpha1_appservice_cr.yaml
├── deploy/crds/app.example.com_appservices_crd.yaml
`,
RunE: openAPIFunc,
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/operator-sdk/run/ansible.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/operator-framework/operator-sdk/pkg/log/zap"

"github.com/spf13/cobra"
logf "sigs.k8s.io/controller-runtime/pkg/runtime/log"
logf "sigs.k8s.io/controller-runtime/pkg/log"
)

// newRunAnsibleCmd returns a command that will run an ansible operator.
Expand Down
2 changes: 1 addition & 1 deletion cmd/operator-sdk/run/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/operator-framework/operator-sdk/pkg/log/zap"

"github.com/spf13/cobra"
logf "sigs.k8s.io/controller-runtime/pkg/runtime/log"
logf "sigs.k8s.io/controller-runtime/pkg/log"
)

// newRunHelmCmd returns a command that will run a helm operator.
Expand Down
2 changes: 1 addition & 1 deletion cmd/operator-sdk/up/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (

log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
logf "sigs.k8s.io/controller-runtime/pkg/runtime/log"
logf "sigs.k8s.io/controller-runtime/pkg/log"
)

// newLocalCmd - up local command to run an operator loccally
Expand Down
4 changes: 2 additions & 2 deletions doc/ansible/dev/developer_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ Create a Custom Resource Definition (CRD) and proper Role-Based Access Control
(RBAC) definitions for resource Foo. `operator-sdk` auto-generates these files
inside of the `deploy` folder:
```bash
$ kubectl create -f deploy/crds/foo_v1alpha1_foo_crd.yaml
$ kubectl create -f deploy/crds/foo.example.com_foos_crd.yaml
$ kubectl create -f deploy/service_account.yaml
$ kubectl create -f deploy/role.yaml
$ kubectl create -f deploy/role_binding.yaml
Expand Down Expand Up @@ -306,7 +306,7 @@ $ sed -i "" 's|REPLACE_IMAGE|quay.io/example/foo-operator:v0.0.1|g' deploy/opera
Deploy the foo-operator:

```sh
$ kubectl create -f deploy/crds/foo_v1alpha1_foo_crd.yaml # if CRD doesn't exist already
$ kubectl create -f deploy/crds/foo.example.com_foos_crd.yaml # if CRD doesn't exist already
$ kubectl create -f deploy/service_account.yaml
$ kubectl create -f deploy/role.yaml
$ kubectl create -f deploy/role_binding.yaml
Expand Down
16 changes: 8 additions & 8 deletions doc/ansible/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ resource definition the operator will be watching.
Deploy the CRD:

```sh
$ kubectl create -f deploy/crds/cache_v1alpha1_memcached_crd.yaml
$ kubectl create -f deploy/crds/cache.example.com_memcacheds_crd.yaml
```

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

### Create a Memcached CR

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

```sh
$ cat deploy/crds/cache_v1alpha1_memcached_cr.yaml
$ cat deploy/crds/cache.example.com_v1alpha1_memcached_cr.yaml
apiVersion: "cache.example.com/v1alpha1"
kind: "Memcached"
metadata:
name: "example-memcached"
spec:
size: 3

$ kubectl apply -f deploy/crds/cache_v1alpha1_memcached_cr.yaml
$ kubectl apply -f deploy/crds/cache.example.com_v1alpha1_memcached_cr.yaml
```

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

```sh
$ cat deploy/crds/cache_v1alpha1_memcached_cr.yaml
$ cat deploy/crds/cache.example.com_v1alpha1_memcached_cr.yaml
apiVersion: "cache.example.com/v1alpha1"
kind: "Memcached"
metadata:
name: "example-memcached"
spec:
size: 4

$ kubectl apply -f deploy/crds/cache_v1alpha1_memcached_cr.yaml
$ kubectl apply -f deploy/crds/cache.example.com_v1alpha1_memcached_cr.yaml
```

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

```sh
$ kubectl delete -f deploy/crds/cache_v1alpha1_memcached_cr.yaml
$ kubectl delete -f deploy/crds/cache.example.com_v1alpha1_memcached_cr.yaml
$ kubectl delete -f deploy/operator.yaml
$ kubectl delete -f deploy/role_binding.yaml
$ kubectl delete -f deploy/role.yaml
$ kubectl delete -f deploy/service_account.yaml
$ kubectl delete -f deploy/crds/cache_v1alpha1_memcached_crd.yaml
$ kubectl delete -f deploy/crds/cache.example.com_memcacheds_crd.yaml
```

[operator-scope]:./../operator-scope.md
Expand Down
18 changes: 9 additions & 9 deletions doc/helm/dev/developer_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ INFO[0000] Created deploy/service_account.yaml
INFO[0000] Created deploy/role.yaml
INFO[0000] Created deploy/role_binding.yaml
INFO[0000] Created deploy/operator.yaml
INFO[0000] Created deploy/crds/foo_v1alpha1_foo_crd.yaml
INFO[0000] Created deploy/crds/foo_v1alpha1_foo_cr.yaml
INFO[0000] Created deploy/crds/foo.example.com_foos_crd.yaml
INFO[0000] Created deploy/crds/foo.example.com_v1alpha1_foo_cr.yaml
INFO[0000] Created helm-charts/foo/
INFO[0000] Run git init ...
Initialized empty Git repository in /home/joe/go/src/github.com/operator-framework/foo-operator/.git/
Initialized empty Git repository in /home/user/go/src/github.com/operator-framework/foo-operator/.git/
INFO[0000] Run git init done
INFO[0000] Project creation complete.

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

```sh
kubectl create -f deploy/crds/foo_v1alpha1_foo_crd.yaml
kubectl create -f deploy/crds/foo.example.com_foos_crd.yaml
```

**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.
Expand All @@ -302,7 +302,7 @@ INFO[0000] operator-sdk Version: v0.2.0+git

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

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

```sh
$ kubectl apply -f deploy/crds/foo_v1alpha1_foo_cr.yaml
$ kubectl apply -f deploy/crds/foo.example.com_v1alpha1_foo_cr.yaml
foo.foo.example.com/example-foo created
```

Expand Down Expand Up @@ -353,7 +353,7 @@ replicaset.apps/example-foo-4f8ay4vfr99ulx905hax3j6x1-9dfd67fc6 1 1

```

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

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

```sh
$ kubectl apply -f deploy/crds/foo_v1alpha1_foo_cr.yaml
$ kubectl apply -f deploy/crds/foo.example.com_v1alpha1_foo_cr.yaml
foo.foo.example.com/example-foo configured

$ kubectl get deployment -l app.kubernetes.io/instance=${RELEASE_NAME}
Expand Down Expand Up @@ -407,7 +407,7 @@ sed -i "" 's|REPLACE_IMAGE|quay.io/example/foo-operator:v0.0.1|g' deploy/operato
Deploy the foo-operator:

```sh
kubectl create -f deploy/crds/foo_v1alpha1_foo_crd.yaml # if CRD doesn't exist already
kubectl create -f deploy/crds/foo.example.com_foos_crd.yaml # if CRD doesn't exist already
kubectl create -f deploy/service_account.yaml
kubectl create -f deploy/role.yaml
kubectl create -f deploy/role_binding.yaml
Expand Down
Loading