-
Notifications
You must be signed in to change notification settings - Fork 1
/
.mise.toml
78 lines (66 loc) · 2.36 KB
/
.mise.toml
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
# Copyright (C) 2024 Alexandre Nicolaie (xunleii@users.noreply.github.com)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ----------------------------------------------------------------------------
[env]
ATLAS_ROOTDIR = "{{config_root}}"
DIRENV_LAYOUTDIR = "{{config_root}}/.direnv"
HELM_HOME = "{{env.DIRENV_LAYOUTDIR}}/helm"
HELM_CACHE_HOME = "{{env.HELM_HOME}}/cache"
HELM_CONFIG_HOME = "{{env.HELM_HOME}}/config"
HELM_DATA_HOME = "{{env.HELM_HOME}}/data"
KUBERNETES_HOME = "{{env.DIRENV_LAYOUTDIR}}/kubernetes"
KUBERNETES_K3D = "{{config_root}}/k3d.yaml"
KUBERNETES_CLUSTER_NAME = "atlas"
KUBECONFIG = "{{env.KUBERNETES_HOME}}/atlas.kubeconfig"
_.path = ["{{config_root}}/scripts"]
# -- Global tasks definition
# --- Development tasks
[tasks."dev:start"]
description = "Prepare the development environment"
run = ["mise run k3d:create", "mise run k3d:prepare"]
[tasks."dev:teardown"]
description = "Tears down the development environment"
run = "mise run k3d:delete"
# --- K3D related tasks
[tasks."k3d:create"]
description = "Starts a k3d cluster"
run = [
"k3d cluster create ${KUBERNETES_CLUSTER_NAME} --config ${KUBERNETES_K3D}",
]
[tasks."k3d:prepare"]
description = "Prepares the k3d cluster"
depends = ["k3d:prepare:*"]
[tasks."k3d:prepare:kubeconfig"]
description = "Gets the kubeconfig for the current k3s cluster"
run = [
"mkdir --parents $(dirname ${KUBECONFIG})",
"k3d kubeconfig get ${KUBERNETES_CLUSTER_NAME} | sed \"s/0.0.0.0:.*/k3d-${KUBERNETES_CLUSTER_NAME}-server-0:6443/g\" > ${KUBECONFIG}",
]
[tasks."k3d:delete"]
description = "Deletes the k3s cluster"
run = [
"k3d cluster delete ${KUBERNETES_CLUSTER_NAME}",
"rm --force ${KUBECONFIG}",
]
# --- Tools
[tools]
helm = "latest"
k3d = "latest"
kubectl = "latest"
lefthook = "latest"
"cargo:ubi" = "latest"
"npm:@trunkio/launcher" = "1.3.1"
"npm:commitlint" = "latest"
"npm:czg" = "latest"
"ubi:terrastruct/d2" = "latest"