-
Notifications
You must be signed in to change notification settings - Fork 4
/
policy-suggest-pc-api-server-and-konnectivity.yaml
56 lines (54 loc) · 2.04 KB
/
policy-suggest-pc-api-server-and-konnectivity.yaml
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
49
50
51
52
53
54
55
56
APIVersion: 1
label: recipe:policy-suggest:pc-api-server-and-konnectivity
data:
recipes:
- name: K8s Host Mode - Allow Prisma Cloud API Server and Konnectivity to Kube System
description: Creates a rule to allow traffic from Prisma Cloud API server and Konnectivity to kube system.
label: recipe:policy-suggest:pc-api-server-and-konnectivity
metadata:
- "@aporeto:author=aporeto"
associatedTags:
- "aporeto:recipe:placement=policy-suggest"
- "aporeto:recipe:placement=k8s-rules"
- "aporeto:recipe:placement=group-level"
deploymentMode: NamespaceUnique
targetIdentities:
- networkrulesetpolicy
propagate: true
longDescription: |-
### Create a Prisma Cloud API server and Konnectivity to kube system rule
This recipe will create a Network Ruleset Policy to allow traffic
from Prisma Cloud API server and Konnectivity to kube system on
ports tcp/443 and tcp/8443.
template: |-
{{`
APIVersion: 1
data:
networkrulesetpolicies:
- name: "Allow Prisma Cloud API server and Konnectivity to kube system"
description: "Ruleset automatically created by an Out of Box template."
propagate: true
subject:
- - "@org:kubernetes=kube-system"
{{- range $_, $orgmeta := .Aporeto.OrganizationalMetadata }}
- {{ $orgmeta | quote }}
{{- end }}
- - "@org:kubernetes=aporeto"
{{- range $_, $orgmeta := .Aporeto.OrganizationalMetadata }}
- {{ $orgmeta | quote }}
{{- end }}
incomingRules:
- action: Allow
protocolPorts:
- "tcp/443"
- "tcp/8443"
object:
- - "@org:kubernetes=kube-system"
outgoingRules:
- action: Allow
protocolPorts:
- "tcp/443"
- "tcp/8443"
object:
- - "@org:kubernetes=aporeto"
`}}