-
Notifications
You must be signed in to change notification settings - Fork 722
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add PodSecurityPolicies for rancher-istio,rancher-tracing and rancher…
…-kiali-server Signed-off-by: Bastian Hofmann <[email protected]>
- Loading branch information
1 parent
c84854f
commit aed1108
Showing
12 changed files
with
326 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
packages/rancher-istio/charts/templates/istio-cni-psp.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
apiVersion: policy/v1beta1 | ||
kind: PodSecurityPolicy | ||
metadata: | ||
name: psp-istio-cni | ||
namespace: istio-system | ||
spec: | ||
allowPrivilegeEscalation: true | ||
fsGroup: | ||
rule: RunAsAny | ||
hostNetwork: true | ||
runAsUser: | ||
rule: RunAsAny | ||
seLinux: | ||
rule: RunAsAny | ||
supplementalGroups: | ||
rule: RunAsAny | ||
volumes: | ||
- secret | ||
- configMap | ||
- emptyDir | ||
- hostPath | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: psp-istio-cni | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: psp-istio-cni | ||
subjects: | ||
- kind: ServiceAccount | ||
name: istio-cni | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: psp-istio-cni | ||
rules: | ||
- apiGroups: | ||
- policy | ||
resourceNames: | ||
- psp-istio-cni | ||
resources: | ||
- podsecuritypolicies | ||
verbs: | ||
- use |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
packages/rancher-istio/charts/templates/istio-install-psp.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
apiVersion: policy/v1beta1 | ||
kind: PodSecurityPolicy | ||
metadata: | ||
name: istio-installer | ||
namespace: istio-system | ||
spec: | ||
privileged: false | ||
hostNetwork: false | ||
hostIPC: false | ||
hostPID: false | ||
runAsUser: | ||
rule: 'MustRunAsNonRoot' | ||
seLinux: | ||
rule: 'RunAsAny' | ||
supplementalGroups: | ||
rule: 'MustRunAs' | ||
ranges: | ||
- min: 1 | ||
max: 65535 | ||
fsGroup: | ||
rule: 'MustRunAs' | ||
ranges: | ||
- min: 1 | ||
max: 65535 | ||
readOnlyRootFilesystem: false | ||
volumes: | ||
- 'configMap' | ||
- 'secret' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: istio-psp | ||
namespace: istio-system | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: istio-psp | ||
subjects: | ||
- kind: ServiceAccount | ||
name: istio-egressgateway-service-account | ||
- kind: ServiceAccount | ||
name: istio-ingressgateway-service-account | ||
- kind: ServiceAccount | ||
name: istio-mixer-service-account | ||
- kind: ServiceAccount | ||
name: istio-operator-authproxy | ||
- kind: ServiceAccount | ||
name: istiod-service-account | ||
- kind: ServiceAccount | ||
name: istio-sidecar-injector-service-account | ||
- kind: ServiceAccount | ||
name: istiocoredns-service-account | ||
- kind: ServiceAccount | ||
name: default | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: istio-psp | ||
namespace: istio-system | ||
rules: | ||
- apiGroups: | ||
- policy | ||
resourceNames: | ||
- istio-psp | ||
resources: | ||
- podsecuritypolicies | ||
verbs: | ||
- use | ||
--- | ||
apiVersion: policy/v1beta1 | ||
kind: PodSecurityPolicy | ||
metadata: | ||
name: istio-psp | ||
namespace: istio-system | ||
spec: | ||
allowPrivilegeEscalation: false | ||
forbiddenSysctls: | ||
- '*' | ||
fsGroup: | ||
ranges: | ||
- max: 65535 | ||
min: 1 | ||
rule: MustRunAs | ||
requiredDropCapabilities: | ||
- ALL | ||
runAsUser: | ||
rule: MustRunAsNonRoot | ||
runAsGroup: | ||
rule: MustRunAs | ||
ranges: | ||
- min: 1 | ||
max: 65535 | ||
seLinux: | ||
rule: RunAsAny | ||
supplementalGroups: | ||
ranges: | ||
- max: 65535 | ||
min: 1 | ||
rule: MustRunAs | ||
volumes: | ||
- configMap | ||
- emptyDir | ||
- projected | ||
- secret | ||
- downwardAPI | ||
- persistentVolumeClaim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
url: local | ||
packageVersion: 00 | ||
releaseCandidateVersion: 01 | ||
packageVersion: 01 | ||
releaseCandidateVersion: 00 |
65 changes: 65 additions & 0 deletions
65
packages/rancher-kiali-server/generated-changes/overlay/templates/psp.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: kiali-psp | ||
namespace: istio-system | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: kiali-psp | ||
subjects: | ||
- kind: ServiceAccount | ||
name: kiali | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: kiali-psp | ||
namespace: istio-system | ||
rules: | ||
- apiGroups: | ||
- policy | ||
resourceNames: | ||
- kiali-psp | ||
resources: | ||
- podsecuritypolicies | ||
verbs: | ||
- use | ||
--- | ||
apiVersion: policy/v1beta1 | ||
kind: PodSecurityPolicy | ||
metadata: | ||
name: kiali-psp | ||
namespace: istio-system | ||
spec: | ||
allowPrivilegeEscalation: false | ||
forbiddenSysctls: | ||
- '*' | ||
fsGroup: | ||
ranges: | ||
- max: 65535 | ||
min: 1 | ||
rule: MustRunAs | ||
requiredDropCapabilities: | ||
- ALL | ||
runAsUser: | ||
rule: MustRunAsNonRoot | ||
runAsGroup: | ||
rule: MustRunAs | ||
ranges: | ||
- min: 1 | ||
max: 65535 | ||
seLinux: | ||
rule: RunAsAny | ||
supplementalGroups: | ||
ranges: | ||
- max: 65535 | ||
min: 1 | ||
rule: MustRunAs | ||
volumes: | ||
- configMap | ||
- emptyDir | ||
- projected | ||
- secret | ||
- downwardAPI | ||
- persistentVolumeClaim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ include "tracing.fullname" . }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
app: {{ .Values.provider }} | ||
heritage: {{ .Release.Service }} | ||
release: {{ .Release.Name }} | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: {{ include "tracing.fullname" . }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
app: {{ .Values.provider }} | ||
heritage: {{ .Release.Service }} | ||
release: {{ .Release.Name }} | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: {{ include "tracing.fullname" . }} | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ include "tracing.fullname" . }} | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: {{ include "tracing.fullname" . }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
app: {{ .Values.provider }} | ||
heritage: {{ .Release.Service }} | ||
release: {{ .Release.Name }} | ||
rules: | ||
- apiGroups: | ||
- policy | ||
resourceNames: | ||
- {{ include "tracing.fullname" . }} | ||
resources: | ||
- podsecuritypolicies | ||
verbs: | ||
- use | ||
--- | ||
apiVersion: policy/v1beta1 | ||
kind: PodSecurityPolicy | ||
metadata: | ||
name: {{ include "tracing.fullname" . }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
app: {{ .Values.provider }} | ||
heritage: {{ .Release.Service }} | ||
release: {{ .Release.Name }} | ||
spec: | ||
allowPrivilegeEscalation: false | ||
forbiddenSysctls: | ||
- '*' | ||
fsGroup: | ||
ranges: | ||
- max: 65535 | ||
min: 1 | ||
rule: MustRunAs | ||
requiredDropCapabilities: | ||
- ALL | ||
runAsUser: | ||
rule: MustRunAsNonRoot | ||
runAsGroup: | ||
rule: MustRunAs | ||
ranges: | ||
- min: 1 | ||
max: 65535 | ||
seLinux: | ||
rule: RunAsAny | ||
supplementalGroups: | ||
ranges: | ||
- max: 65535 | ||
min: 1 | ||
rule: MustRunAs | ||
volumes: | ||
- emptyDir | ||
- secret | ||
- persistentVolumeClaim |