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

Update example k8s deployment to include RBAC #568

Merged
merged 1 commit into from
Mar 21, 2023
Merged
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
38 changes: 36 additions & 2 deletions deploy/k8s/promxy.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,36 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: promxy
namespace: promxy
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: promxy-role
rules:
- apiGroups:
- ''
resources:
- pods
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: promxy-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: promxy-role
subjects:
- kind: ServiceAccount
name: promxy
namespace: promxy
---
apiVersion: v1
data:
Expand Down Expand Up @@ -31,7 +63,7 @@ metadata:
namespace: promxy

---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
Expand All @@ -48,6 +80,8 @@ spec:
labels:
app: promxy
spec:
terminationGracePeriodSeconds: 5
serviceAccountName: promxy
containers:
- args:
- "--config=/etc/promxy/config.yaml"
Expand All @@ -58,7 +92,7 @@ spec:
value: "1"
command:
- "/bin/promxy"
image: 127.0.0.1:32000/promxy:latest
image: quay.io/jacksontj/promxy:v0.0.77
imagePullPolicy: Always
name: promxy
livenessProbe:
Expand Down