Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Keep all resources in vault namespace and support kubernetes 16+ #370

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
7 changes: 6 additions & 1 deletion example/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: vault-operator
namespace: vault
spec:
selector:
matchLabels:
name: vault-operator
replicas: 1
template:
metadata:
labels:
name: vault-operator
spec:
serviceAccountName: vault
containers:
- name: vault-operator
image: quay.io/coreos/vault-operator:latest
Expand Down
7 changes: 6 additions & 1 deletion example/etcd-operator-deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: etcd-operator
namespace: vault
labels:
name: etcd-operator
spec:
selector:
matchLabels:
name: etcd-operator
replicas: 1
template:
metadata:
labels:
name: etcd-operator
spec:
serviceAccountName: vault
containers:
- name: etcd-operator
image: quay.io/coreos/etcd-operator:v0.8.3
Expand Down
15 changes: 11 additions & 4 deletions example/rbac-template.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
kind: ServiceAccount
apiVersion: v1
metadata:
name: vault
namespace: vault
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: vault-operator-role
namespace: vault
rules:
- apiGroups:
- etcd.database.coreos.com
Expand All @@ -24,7 +31,7 @@ rules:
verbs:
- "*"
- apiGroups:
- "" # "" indicates the core API group
- ""
resources:
- pods
- services
Expand All @@ -43,15 +50,15 @@ rules:
- "*"

---

kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: vault-operator-rolebinding
namespace: vault
subjects:
- kind: ServiceAccount
name: <service-account>
namespace: <namespace>
name: vault
namespace: vault
roleRef:
kind: Role
name: vault-operator-role
Expand Down