mirror of https://github.com/k3s-io/k3s
Add optional addon PSPs
parent
a1513161b3
commit
cd720c4759
|
@ -0,0 +1,16 @@
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: gce:podsecuritypolicy:calico
|
||||||
|
namespace: kube-system
|
||||||
|
labels:
|
||||||
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
|
kubernetes.io/cluster-service: "true"
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: gce:podsecuritypolicy:privileged
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: calico
|
||||||
|
namespace: kube-system
|
|
@ -1,4 +1,14 @@
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: etcd-empty-dir-cleanup
|
||||||
|
namespace: kube-system
|
||||||
|
labels:
|
||||||
|
k8s-app: etcd-empty-dir-cleanup
|
||||||
|
kubernetes.io/cluster-service: "true"
|
||||||
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
name: etcd-empty-dir-cleanup
|
name: etcd-empty-dir-cleanup
|
||||||
|
@ -8,6 +18,7 @@ metadata:
|
||||||
labels:
|
labels:
|
||||||
k8s-app: etcd-empty-dir-cleanup
|
k8s-app: etcd-empty-dir-cleanup
|
||||||
spec:
|
spec:
|
||||||
|
serviceAccountName: etcd-empty-dir-cleanup
|
||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
dnsPolicy: Default
|
dnsPolicy: Default
|
||||||
containers:
|
containers:
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: gce:podsecuritypolicy:etcd-empty-dir-cleanup
|
||||||
|
namespace: kube-system
|
||||||
|
labels:
|
||||||
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
|
kubernetes.io/cluster-service: "true"
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: gce:podsecuritypolicy:etcd-empty-dir-cleanup
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: etcd-empty-dir-cleanup
|
||||||
|
namespace: kube-system
|
|
@ -0,0 +1,17 @@
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: gce:podsecuritypolicy:etcd-empty-dir-cleanup
|
||||||
|
namespace: kube-system
|
||||||
|
labels:
|
||||||
|
kubernetes.io/cluster-service: "true"
|
||||||
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- extensions
|
||||||
|
resourceNames:
|
||||||
|
- gce.etcd-empty-dir-cleanup
|
||||||
|
resources:
|
||||||
|
- podsecuritypolicies
|
||||||
|
verbs:
|
||||||
|
- use
|
|
@ -0,0 +1,31 @@
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
kind: PodSecurityPolicy
|
||||||
|
metadata:
|
||||||
|
name: gce.etcd-empty-dir-cleanup
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/description: 'Policy used by the etcd-empty-dir-cleanup addon.'
|
||||||
|
# TODO: etcd-empty-dir-cleanup should run with the default seccomp profile
|
||||||
|
seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*'
|
||||||
|
# 'runtime/default' is already the default, but must be filled in on the
|
||||||
|
# pod to pass admission.
|
||||||
|
apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default'
|
||||||
|
apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default'
|
||||||
|
labels:
|
||||||
|
kubernetes.io/cluster-service: 'true'
|
||||||
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
|
spec:
|
||||||
|
privileged: false
|
||||||
|
volumes:
|
||||||
|
- 'secret'
|
||||||
|
hostNetwork: true
|
||||||
|
hostIPC: false
|
||||||
|
hostPID: false
|
||||||
|
runAsUser:
|
||||||
|
rule: 'RunAsAny'
|
||||||
|
seLinux:
|
||||||
|
rule: 'RunAsAny'
|
||||||
|
supplementalGroups:
|
||||||
|
rule: 'RunAsAny'
|
||||||
|
fsGroup:
|
||||||
|
rule: 'RunAsAny'
|
||||||
|
readOnlyRootFilesystem: false
|
|
@ -0,0 +1,16 @@
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: gce:podsecuritypolicy:elasticsearch-logging
|
||||||
|
namespace: kube-system
|
||||||
|
labels:
|
||||||
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
|
kubernetes.io/cluster-service: "true"
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: gce:podsecuritypolicy:privileged
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: elasticsearch-logging
|
||||||
|
namespace: kube-system
|
|
@ -1,3 +1,13 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: ip-masq-agent
|
||||||
|
namespace: kube-system
|
||||||
|
labels:
|
||||||
|
k8s-app: ip-masq-agent
|
||||||
|
kubernetes.io/cluster-service: "true"
|
||||||
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
|
---
|
||||||
# https://github.com/kubernetes-incubator/ip-masq-agent/blob/v2.0.0/README.md
|
# https://github.com/kubernetes-incubator/ip-masq-agent/blob/v2.0.0/README.md
|
||||||
apiVersion: extensions/v1beta1
|
apiVersion: extensions/v1beta1
|
||||||
kind: DaemonSet
|
kind: DaemonSet
|
||||||
|
@ -14,6 +24,7 @@ spec:
|
||||||
annotations:
|
annotations:
|
||||||
scheduler.alpha.kubernetes.io/critical-pod: ''
|
scheduler.alpha.kubernetes.io/critical-pod: ''
|
||||||
spec:
|
spec:
|
||||||
|
serviceAccountName: ip-masq-agent
|
||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
containers:
|
containers:
|
||||||
- name: ip-masq-agent
|
- name: ip-masq-agent
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: gce:podsecuritypolicy:ip-masq-agent
|
||||||
|
namespace: kube-system
|
||||||
|
labels:
|
||||||
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
|
kubernetes.io/cluster-service: "true"
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: gce:podsecuritypolicy:privileged
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: ip-masq-agent
|
||||||
|
namespace: kube-system
|
Loading…
Reference in New Issue