-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathgetting-started.variant
More file actions
51 lines (44 loc) · 852 Bytes
/
getting-started.variant
File metadata and controls
51 lines (44 loc) · 852 Bytes
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
option "namespace" {
description = "Namespace to interact with"
type = string
default = "default"
short = "n"
}
job "kubectl" {
parameter "dir" {
type = string
}
exec {
command = "kubectl"
args = ["-n", opt.namespace, "-f", param.dir]
}
}
job "helm" {
parameter "release" {
type = string
}
parameter "chart" {
type = string
}
option "values" {
type = list(string)
}
exec {
command = "helm"
args = ["upgrade", "--install", "-n", opt.namespace, param.release, param.chart]
}
}
job "deploy" {
description = "Deploys our application and the infrastructure onto the K8s cluster"
step "deploy infra" {
run "helm" {
release = "app1"
chart = "app1"
}
}
step "deploy apps" {
run "kubectl" {
dir = "deploy/environments/${opt.env}/manifests"
}
}
}