Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Commit

Permalink
Merge pull request #282 from SUSE/vladi/cfo-1.0
Browse files Browse the repository at this point in the history
Bump cf-operator to 1.0
  • Loading branch information
Thulio Ferraz Assis authored Dec 21, 2019
2 parents 73b2728 + f443a40 commit 002b49a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .drone/pipelines/default/runtime/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
export CLUSTER_NAME="kubecf-drone-ci"
export KUBECF_INSTALL_NAME="kubecf"
export KUBECF_NAMESPACE="kubecf"
export CF_OPERATOR_NAMESPACE="cfo"
export CF_OPERATOR_NAMESPACE="kubecf"
: "${EIRINI_ENABLED:=false}"
export EIRINI_ENABLED
export KUBECF_CHART_TARGET="//deploy/helm/kubecf:chart"
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/pipelines/runtime/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

export KUBECF_INSTALL_NAME="kubecf"
export KUBECF_NAMESPACE="kubecf"
export CF_OPERATOR_NAMESPACE="cfo"
export CF_OPERATOR_NAMESPACE="kubecf"
export ROUTER_CLUSTER_IP="10.43.0.231"
export SSH_PROXY_CLUSTER_IP="10.43.0.232"
export TCP_ROUTER_CLUSTER_IP="10.43.0.233"
Expand Down
5 changes: 2 additions & 3 deletions def.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ project = struct(
),
cf_operator = struct(
chart = struct(
url = "https://s3.amazonaws.com/cf-operators/helm-charts/cf-operator-v0.4.2-240.g3c753ac2.tgz",
sha256 = "98c9824651da63e5dd34116d26a45159a1d15a6c305dc0e2a04c281e19392130",
url = "https://s3.amazonaws.com/cf-operators/helm-charts/cf-operator-v1.0.0-1.g424dd0b3.tgz",
sha256 = "7cd3c54179b3c58de2996301188c7074fbcd7307a39300157e7f3e52059f961d",
),
namespace = "cfo",
),
helm = struct(
platforms = {
Expand Down
9 changes: 3 additions & 6 deletions dev/cf_operator/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,18 @@ helm_template(
name = "rendered_template",
values = glob(["**/*values.yaml"]),
install_name = "cf-operator",
namespace = project.cf_operator.namespace,
set_values = {
"global.operator.watchNamespace": project.namespace,
},
namespace = project.namespace,
chart_package = "@cf_operator//file",
)

kubectl_apply_binary(
name = "apply",
resource = ":rendered_template",
namespace = project.cf_operator.namespace,
namespace = project.namespace,
)

kubectl_delete_binary(
name = "delete",
resource = ":rendered_template",
namespace = project.cf_operator.namespace,
namespace = project.namespace,
)
19 changes: 1 addition & 18 deletions doc/dev/general.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ with Helm Tiller pre-installed.

```shell
helm install --name cf-operator \
--namespace cfo \
--namespace kubecf \
--set "global.operator.watchNamespace=kubecf" \
https://s3.amazonaws.com/cf-operators/helm-charts/cf-operator-v0.4.2-147.gb88e4296.tgz
```
Expand All @@ -63,23 +63,6 @@ into the `cf_operator` section of the top-level `def.bzl` file to find
the version of the operator validated against the current kubecf
master.

**Note:**
> The above `helm install` will generate many controllers spread over multiple pods inside the `cfo` namespace.
> Most of these controllers run inside the `cf-operator` pod.
>
> The `global.operator.watchNamespace=kubecf` path tells the
controllers to watch for CRD´s instances into the `kubecf` namespace.
>
> The cf-operator helm chart will generate the `kubecf` namespace during installation, and eventually one of the
controllers will use a webhook to label this namespace with the `cf-operator-ns` key.
>
> If the `kubecf` namespace is deleted, but the operators are still running, they will no longer
know which namespace to watch. This can lead to problems, so make sure you also delete the pods
inside the `cfo` namespace, after deleting the `kubecf` namespace.

Note how the namespace the operator is installed into (`cfo`) differs
from the namespace the operator is watching for deployments (`kubecf`).

This form of deployment enables restarting the operator because it is
not affected by webhooks. It further enables the deletion of the
Kubecf deployment namespace to start from scratch, without redeploying
Expand Down

0 comments on commit 002b49a

Please sign in to comment.