Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removing kube-rbac-proxy from website docs #6864

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ check the full Ansible result in the logs in order to be able to debug it.

**Example**

In `config/manager/manager.yaml` and `config/default/manager_auth_proxy_patch.yaml`:
In `config/manager/manager.yaml` and `config/default/manager_metrics_patch.yaml`:

```yaml
...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ If the operator can watch multiple namespaces, set the following in your `spec.i
[ctrl-manager]: https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/manager#Manager
[ctrl-options]: https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/manager#Options
[k8s-rbac]: https://kubernetes.io/docs/reference/access-authn-authz/rbac/
[kube-rbac-proxy]: https://github.com/brancz/kube-rbac-proxy
[rbac-clusterrole]: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-and-clusterrole
[crd-scope-doc]: /docs/building-operators/golang/crds-scope/
[rbac-markers]: https://book.kubebuilder.io/reference/markers/rbac.html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,34 +151,15 @@ run: manifests generate fmt vet

### Setting flags when deploying to a cluster

When deploying your operator to a cluster you can set additional flags using an `args` array in your operator's `container` spec in the file `config/default/manager_auth_proxy_patch.yaml` For example:
When deploying your operator to a cluster you can set additional flags using an `args` array in your operator's `container` spec in the file `config/default/manager_metrics_patch.yaml` For example:

```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
namespace: system
spec:
template:
spec:
containers:
- name: kube-rbac-proxy
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0
args:
- "--secure-listen-address=0.0.0.0:8443"
- "--upstream=http://127.0.0.1:8080/"
- "--logtostderr=true"
- "--v=10"
ports:
- containerPort: 8443
name: https
- name: manager
args:
- "--metrics-bind-address=127.0.0.1:8080"
- "--leader-elect"
- "--zap-encoder=console"
- "--zap-log-level=debug"
- op: add
path: /spec/template/spec/containers/0/args/0
value: --zap-log-level=debug
- op: add
path: /spec/template/spec/containers/0/args/0
value: --zap-encoder=console
```

## Creating a structured log statement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ While running locally, this flag can also be added to the helm binary. For examp
helm-operator --max-concurrent-reconciles=10
```

**NOTE**: If you're using the default scaffolding, it is necessary to also apply this change to the `config/default/manager_auth_proxy_patch.yaml` file. This file is a `kustomize` patch to the operator deployment that configures [kube-rbac-proxy][kube-rbac-proxy] to require authorization for accessing your operator metrics. When `kustomize` applies this patch, it overrides the args defined in `config/manager/manager.yaml`

[kube-rbac-proxy]: https://github.com/brancz/kube-rbac-proxy
**NOTE**: If you're using the default scaffolding, it is necessary to also apply this change to the `config/default/manager_metrics_patch.yaml` file.
This file is a `kustomize` patch to the operator deployment that configures metrics to require authorization for accessing
your operator metrics. When `kustomize` applies this patch, it overrides the args defined in `config/manager/manager.yaml`