Skip to content

Commit

Permalink
removing kube-rbac-proxy from website docs (#6864)
Browse files Browse the repository at this point in the history
Signed-off-by: Adam D. Cornett <[email protected]>
  • Loading branch information
acornett21 authored Nov 19, 2024
1 parent c6fef29 commit b049c1c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 31 deletions.
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`

0 comments on commit b049c1c

Please sign in to comment.