-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplan_server.tf
50 lines (44 loc) · 1.17 KB
/
plan_server.tf
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
resource "kubernetes_manifest" "system_upgrade" {
manifest = {
apiVersion = "upgrade.cattle.io/v1"
kind = "Plan"
metadata = {
name = "server-upgrade-plan"
namespace = "system-upgrade"
labels = {
"k3s-upgrade" = "server"
}
}
spec = {
channel = "https://update.k3s.io/v1-release/channels/${var.k3s_channel}"
serviceAccountName = "system-upgrade"
concurrency = var.server_concurrency
cordon = true
drain = {
force = var.force_drain
deleteLocalData = var.delete_local_data
ignoreDaemonSets = var.ignore_daemonsets
}
upgrade = {
image = "rancher/k3s-upgrade"
}
nodeSelector = {
matchExpressions = [
{
key = "k3s-upgrade"
operator = "Exists"
},
{
key = "node-role.kubernetes.io/control-plane"
operator = "Exists"
},
{
key = "k3s-upgrade"
operator = "NotIn"
values = ["disabled", "false"]
}
]
}
}
}
}