2425a06cd8
This commit adds support for defining arbitrary peers that should have access to the VPN. In k8s, this is accomplished using the new Peer CRD.
83 lines
1.5 KiB
YAML
83 lines
1.5 KiB
YAML
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: kilo
|
|
namespace: kube-system
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: kilo
|
|
rules:
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- nodes
|
|
verbs:
|
|
- list
|
|
- patch
|
|
- watch
|
|
- apiGroups:
|
|
- kilo.squat.ai
|
|
resources:
|
|
- peers
|
|
verbs:
|
|
- list
|
|
- update
|
|
- watch
|
|
- apiGroups:
|
|
- apiextensions.k8s.io
|
|
resources:
|
|
- customresourcedefinitions
|
|
verbs:
|
|
- create
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: kilo
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: kilo
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: kilo
|
|
namespace: kube-system
|
|
---
|
|
apiVersion: extensions/v1beta1
|
|
kind: DaemonSet
|
|
metadata:
|
|
name: kilo
|
|
namespace: kube-system
|
|
labels:
|
|
app.kubernetes.io/name: kilo
|
|
spec:
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: kilo
|
|
spec:
|
|
serviceAccountName: kilo
|
|
hostNetwork: true
|
|
containers:
|
|
- name: kilo
|
|
image: squat/kilo
|
|
args:
|
|
- --kubeconfig=/etc/kubernetes/kubeconfig
|
|
securityContext:
|
|
privileged: true
|
|
volumeMounts:
|
|
- name: kubeconfig
|
|
mountPath: /etc/kubernetes
|
|
readOnly: true
|
|
tolerations:
|
|
- effect: NoSchedule
|
|
operator: Exists
|
|
- effect: NoExecute
|
|
operator: Exists
|
|
volumes:
|
|
- name: kubeconfig
|
|
configMap:
|
|
name: kubeconfig-in-cluster
|