-
Notifications
You must be signed in to change notification settings - Fork 4
/
policy-suggest-probes-to-pods.yaml
47 lines (45 loc) · 1.64 KB
/
policy-suggest-probes-to-pods.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
APIVersion: 1
label: recipe:policy-suggest:probes_to_pods
data:
recipes:
- name: K8s Host Mode - Create Allow Liveness/Readiness Probes to Pods Rule
description: Creates a liveness/readiness probes to pods rule to allow traffic.
label: recipe:policy-suggest:probes_to_pods
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 liveness/readiness probes to pods rule to allow traffic
This recipe will create a Network Ruleset Policy to
allow liveness/readiness probe traffic to pods.
template: |-
{{`
APIVersion: 1
data:
networkrulesetpolicies:
- name: "Allow Liveness/Readiness Probes to Pods"
description: "Ruleset automatically created by an Out of Box template."
propagate: true
subject:
- - "$identity=processingunit"
- $type=Docker
{{- range $_, $orgmeta := .Aporeto.OrganizationalMetadata }}
- {{ $orgmeta | quote }}
{{- end }}
incomingRules:
- action: Allow
protocolPorts:
- any
object:
- - "app:host:type=kubernetes"
{{- range $_, $orgmeta := .Aporeto.OrganizationalMetadata }}
- {{ $orgmeta | quote }}
{{- end }}
`}}