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

[WIP] RBAC Proxy TLS #51

Closed
wants to merge 2 commits into from
Closed
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
8 changes: 8 additions & 0 deletions bundle/manifests/far-rbac-container-secret_v1_secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
data:
tls.cert: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURVVENDQWptZ0F3SUJBZ0lVR1BndlRWWUhPQmRVVlROSWZuUDdCRkNFdG5jd0RRWUpLb1pJaHZjTkFRRUwKQlFBd09ERVRNQkVHQTFVRUF3d0tiV1ZrYVdzNGN5NXBiekVoTUI4R0ExVUVDZ3dZWm1WdVkyVXRZV2RsYm5SegpMWEpsYldWa2FXRjBhVzl1TUI0WERUSXpNRFV5T1RFeE5UTXlORm9YRFRJME1EVXlPREV4TlRNeU5Gb3dPREVUCk1CRUdBMVVFQXd3S2JXVmthV3M0Y3k1cGJ6RWhNQjhHQTFVRUNnd1labVZ1WTJVdFlXZGxiblJ6TFhKbGJXVmsKYVdGMGFXOXVNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQXJYb1RLREJuYmtFUgpJQ1Z0L2I0aFE1RjQvc0QwTjVxcWhETXl3bmd2Rm94MXNlYTg5UUp5OFBIL3R2UzBReS9adThEcktodVhoSy9nCmpic0czSVdrZzMyNGkvVndDWUhOeWJNM0NPKzNpalcxc1ViSTRRdlc2VjFBVGMrNExndmlVb3RoV3dUK2l6RXMKTHhhcHZiemdlV3NZUTY0SWd4QWRZMGx6M0MwaDlJWThYVUt1MkNLMFhoTEp0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5EIFBSSVZBVEUgS0VZLS0tLS0K
kind: Secret
metadata:
name: far-rbac-container-secret
type: kubernetes.io/tls
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ spec:
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=0
- --tls-cert-file=/etc/tls/tls.crt
- --tls-private-key-file=/etc/tls/tls.key
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.14.1
name: kube-rbac-proxy
ports:
Expand All @@ -220,6 +222,10 @@ spec:
capabilities:
drop:
- ALL
volumeMounts:
- mountPath: /etc/tls
name: tls-secret
readOnly: true
- args:
- --health-probe-bind-address=:8081
- --metrics-bind-address=127.0.0.1:8080
Expand Down Expand Up @@ -263,6 +269,10 @@ spec:
type: RuntimeDefault
serviceAccountName: fence-agents-remediation-controller-manager
terminationGracePeriodSeconds: 10
volumes:
- name: tls-secret
secret:
secretName: far-rbac-container-secret
permissions:
- rules:
- apiGroups:
Expand Down
10 changes: 10 additions & 0 deletions config/default/manager_auth_proxy_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ metadata:
spec:
template:
spec:
volumes:
- name: tls-secret
secret:
secretName: far-rbac-container-secret
containers:
- name: kube-rbac-proxy
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.14.1
Expand All @@ -16,6 +20,12 @@ spec:
- "--upstream=http://127.0.0.1:8080/"
- "--logtostderr=true"
- "--v=0"
- "--tls-cert-file=/etc/tls/tls.crt"
- "--tls-private-key-file=/etc/tls/tls.key"
volumeMounts:
- name: tls-secret
mountPath: /etc/tls
readOnly: true
ports:
- containerPort: 8443
protocol: TCP
Expand Down
1 change: 1 addition & 0 deletions config/manifests/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ resources:
- ../default
- ../samples
- ../scorecard
- ../secret

# [WEBHOOK] To enable webhooks, uncomment all the sections with [WEBHOOK] prefix.
# Do NOT uncomment sections with prefix [CERTMANAGER], as OLM does not support cert-manager.
Expand Down
2 changes: 2 additions & 0 deletions config/secret/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
resources:
- manager_auth_proxy_secret.yaml
9 changes: 9 additions & 0 deletions config/secret/manager_auth_proxy_secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: Secret
metadata:
name: far-rbac-container-secret
namespace: default
type: kubernetes.io/tls
data:
tls.cert: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURVVENDQWptZ0F3SUJBZ0lVR1BndlRWWUhPQmRVVlROSWZuUDdCRkNFdG5jd0RRWUpLb1pJaHZjTkFRRUwKQlFBd09ERVRNQkVHQTFVRUF3d0tiV1ZrYVdzNGN5NXBiekVoTUI4R0ExVUVDZ3dZWm1WdVkyVXRZV2RsYm5SegpMWEpsYldWa2FXRjBhVzl1TUI0WERUSXpNRFV5T1RFeE5UTXlORm9YRFRJME1EVXlPREV4TlRNeU5Gb3dPREVUCk1CRUdBMVVFQXd3S2JXVmthV3M0Y3k1cGJ6RWhNQjhHQTFVRUNnd1labVZ1WTJVdFlXZGxiblJ6TFhKbGJXVmsKYVdGMGFXOXVNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQXJYb1RLREJuYmtFUgpJQ1Z0L2I0aFE1RjQvc0QwTjVxcWhETXl3bmd2Rm94MXNlYTg5UUp5OFBIL3R2UzBReS9adThEcktodVhoSy9nCmpic0czSVdrZzMyNGkvVndDWUhOeWJNM0NPKzNpalcxc1ViSTRRdlc2VjFBVGMrNExndmlVb3RoV3dUK2l6RXMKTHhhcHZiemdlV3NZUTY0SWd4QWRZMGx6M0MwaDlJWThYVUt1MkNLMFhoTEp0L0dGdHRKbGRZQlhScDkyc24vaQpiUWZ3U3FMVExVY21MT2lNS1BxazdncDRZK3BFZkpVK1VBMUZiS3Raak5QYmFsVm1nbmUzd3EwLzlxd0tHK3NjCnVCbHRqR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