-
Notifications
You must be signed in to change notification settings - Fork 6
/
step.yaml
216 lines (216 loc) · 8.62 KB
/
step.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
kind: step-type
version: '1.0'
metadata:
name: helmfile
version: 0.0.5
isPublic: true
description: Use helmfile from Codefresh pipeline
sources:
- 'https://github.com/codefresh-contrib/cfstep-helmfile'
- 'https://github.com/roboll/helmfile'
stage: incubating
maintainers:
- name: Dustin Van Buskirk
email: [email protected]
categories:
- deployment
official: true
tags: []
icon:
type: svg
url: https://cdn.jsdelivr.net/gh/codefresh-contrib/cfstep-helmfile/helm-logo.svg
background: "#f4f4f4"
examples:
- description: example-1
workflow:
deploy:
type: helmfile
arguments:
WORKING_DIRECTORY: /codefresh/volume/${{CF_REPO_NAME}}
COMMANDS: diff
ENVIRONMENT: development
KUBE_CONTEXT: dev_cluster
spec:
arguments: |-
{
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": false,
"patterns": [],
"required": [
"COMMANDS"
],
"properties": {
"COMMANDS": {
"type": "string",
"description": "helmfle commands, executed in order provided",
"examples": ["diff","diff,apply"],
"default": "version"
},
"WORKING_DIRECTORY": {
"type": "string",
"description": "",
"examples": ["/codefresh/volume/${{CF_REPO_NAME}}"],
"default": "/codefresh/volume"
},
"HELM_VERSION": {
"type": "string",
"description": "Version of helm binary",
"default": "3.0.3",
"enum": [ "2.14.3", "3.0.0", "3.0.3", "3.1.1" ]
},
"HELMFILE_VERSION": {
"type": "string",
"description": "Version of helmfile binary",
"default": "0.108.0",
"enum": [ "0.90.2", "0.90.7", "0.93.2", "0.108.0" ]
},
"HELM_BINARY": {
"type": "string",
"description": "path to helm binary",
"default": ""
},
"FILE": {
"type": "string",
"description": "load config from file or directory. defaults to helmfile.yaml or `helmfile.d`(means `helmfile.d/*.yaml`) in this preference",
"default": ""
},
"ENVIRONMENT": {
"type": "string",
"description": "specify the environment name. defaults to default",
"default": ""
},
"STATE_VALUES_SET": {
"type": "string",
"description": "set state values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)",
"default": ""
},
"STATE_VALUES_FILE": {
"type": "string",
"description": "specify state values in a YAML file",
"default": ""
},
"QUIET": {
"type": "boolean",
"description": "Silence output. Equivalent to log-level warn",
"default": false
},
"KUBE_CONTEXT": {
"type": "string",
"description": "Set kubectl context. Uses current context by default",
"default": ""
},
"NO_COLOR": {
"type": "boolean",
"description": "Output without color",
"default": false
},
"LOG_LEVEL": {
"type": "string",
"description": "Set log level, default info",
"default": ""
},
"NAMESPACE": {
"type": "string",
"description": "Set namespace. Uses the namespace set in the context by default, and is available in templates as {{ .Namespace }}",
"default": ""
},
"SELECTOR": {
"type": "string",
"description": "Only run using the releases that match labels. Labels can take the form of foo=bar or foo!=bar. A release must match all labels in a group in order to be used. Multiple groups can be specified at once. --selector tier=frontend,tier!=proxy --selector tier=backend. Will match all frontend, non-proxy releases AND all backend releases. The name of a release can be used as a label. --selector name=myrelease",
"default": ""
},
"ALLOW_NO_MATCHING_RELEASE": {
"type": "boolean",
"description": "Do not exit with an error code if the provided selector has no matching releases.",
"default": false
},
"INTERACTIVE": {
"type": "boolean",
"description": "Request confirmation before attempting to modify clusters",
"default": false
},
"HELP": {
"type": "boolean",
"description": "show help",
"default": false
},
"VERSION": {
"type": "boolean",
"description": "print the version",
"default": false
},
"DEPS_PS": {
"type": "string",
"description": "String of command options and arguments for, helmfile deps - update charts based on the contents of requirements.yaml",
"default": ""
},
"REPOS_PS": {
"type": "string",
"description": "String of command options and arguments for, helmfile repos - sync repositories from state file (helm repo add && helm repo update)",
"default": ""
},
"CHARTS_PS": {
"type": "string",
"description": "String of command options and arguments for, helmfile charts - DEPRECATED: sync releases from state file (helm upgrade --install)",
"default": ""
},
"DIFF_PS": {
"type": "string",
"description": "String of command options and arguments for, helmfile diff - diff releases from state file against env (helm diff)",
"default": ""
},
"TEMPLATE_PS": {
"type": "string",
"description": "String of command options and arguments for, helmfile template - template releases from state file against env (helm template)",
"default": ""
},
"LINT_PS": {
"type": "string",
"description": "String of command options and arguments for, helmfile lint - lint charts from state file (helm lint)",
"default": ""
},
"SYNC_PS": {
"type": "string",
"description": "String of command options and arguments for, helmfile sync - sync all resources from state file (repos, releases and chart deps)",
"default": ""
},
"APPLY_PS": {
"type": "string",
"description": "String of command options and arguments for, helmfile apply - apply all resources from state file only when there are changes",
"default": ""
},
"STATUS_PS": {
"type": "string",
"description": "String of command options and arguments for, helmfile status - retrieve status of releases in state file",
"default": ""
},
"DELETE_PS": {
"type": "string",
"description": "String of command options and arguments for, helmfile delete - DEPRECATED: delete releases from state file (helm delete)",
"default": ""
},
"DESTROY_PS": {
"type": "string",
"description": "String of command options and arguments for, helmfile destroy - deletes and then purges releases",
"default": ""
},
"TEST_PS": {
"type": "string",
"description": "String of command options and arguments for, helmfile test - test releases from state file (helm test)",
"default": ""
}
}
}
stepsTemplate: |-
main:
name: helmfile
image: 'codefreshplugins/cfstep-helmfile:[[.Arguments.HELM_VERSION]]-[[.Arguments.HELMFILE_VERSION]]'
environment:
[[ range $key, $val := .Arguments ]]
- '[[ $key ]]=[[ $val ]]'
[[- end ]]
delimiters:
left: '[['
right: ']]'