-
Notifications
You must be signed in to change notification settings - Fork 4
/
TEMPLATE.yaml
95 lines (91 loc) · 3.52 KB
/
TEMPLATE.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# The content of this file is imported to create a recipe.
# The recipe has a set of steps and parameters that are filled via the UI.
# Parameters are injected into the `template` property of the recipe and then
# imported.
APIVersion: 1
# Label of the import
# It is important to keep it when reimporting the recipe itself
label: recipe:template
data:
# Define the recipes that are imported
recipes:
# Name of the recipe as it shows in the UI
- name: My recipe template
# Description of a recipe
description: This recipe is just a template.
# Label of the recipe
# It is used for keep an import reference.
label: recipe:template
# Message shown upon successful recipe creation
successfullMessage: Great success
# Indicate if the recipe should be available in child namespaces.
propagate: true
# Specify the deployment of the recipe
# * Unrestricted: Recipe can be imported multiple times (default)
# * Unique: Only one recipe can be imported in the entire hierarchy of namespaces
# * NamespaceUnique: Only one recipe can be imported in a given namespace.
deploymentMode: Unrestricted
# Adding a metadata to make sure we know where it is coming from.
metadata:
- "@aporeto:author=aporeto"
# Tags can define where the recipe should be shown in the UI
associatedTags:
# aporeto:recipe:placement indicates where in the UI. Available values
# - "toolbar": appears in the toolbar of an identity page
# - "getting-started": appears on the getting started page
# - "create-button": appears in the create button of an identity page
- "aporeto:recipe:placement=toolbar"
- "aporeto:recipe:identity=networkaccesspolicy"
# Defines which identities are created
targetIdentities:
- externalnetwork
- networkaccesspolicy
# Define the first page of the recipe that explains to the user
# what it is going to be done.
longDescription: |-
### Recipe Template
Welcome to my new recipe!
How can I use markdown ?
* Follow your instinct
* Check Markdown cheat sheets
* Look for **other recipes**
# Template where the parameters will be injected.
# /!\ Please respect the start and end syntax /!\
# Parameters will be injected with {{ .Values.key }}
# For more information, check other recipes.
template: |-
{{`
APIVersion: 1
data:
networkaccesspolicies:
- name: "Templated allow all policy"
description: "Description of my template policy."
action: "Allow"
protected: false
logsEnabled: true
{{- if .Values.propagate }}
propagate: true
{{- end }}
subject:
- - "$identity=processingunit"
- - "$identity=externalnetwork"
object:
- - "$identity=processingunit"
- - "$identity=externalnetwork"
`}}
# Define the list of steps of the recipe
steps:
- name: Propagation
description: |-
Define if the templated policy should be propagated to the child namespaces or not.
Obviously, you can use some **Markdown** here too!
# Define the list of parameters in this step
parameters:
# key is referenced in the template with {{ .Values.key }}
- key: propagate
# Name displayed in the UI
name: Propagate
description: propagate down to child namespaces.
# Type of parameter (ie: String, Boolean, Integer)
# Check other recipes for more information.
type: Boolean