-
Notifications
You must be signed in to change notification settings - Fork 0
/
psp.tf
48 lines (42 loc) · 820 Bytes
/
psp.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
resource "kubernetes_pod_security_policy" "example" {
count = var.enable_pod_security_policy ? 1 : 0
metadata {
name = format("%s-psp", var.name)
}
spec {
privileged = false
allow_privilege_escalation = false
volumes = [
"configMap",
"emptyDir",
"projected",
"secret",
"downwardAPI",
"persistentVolumeClaim",
]
run_as_user {
rule = "MustRunAsNonRoot"
}
se_linux {
rule = "RunAsAny"
}
supplemental_groups {
rule = "MustRunAs"
range {
min = 1
max = 65535
}
}
fs_group {
rule = "MustRunAs"
range {
min = 1
max = 65535
}
}
required_drop_capabilities = [
"NET_RAW"
]
read_only_root_filesystem = true
}
}