aboutsummaryrefslogtreecommitdiffhomepage
path: root/dhall
diff options
context:
space:
mode:
authorClement Delafargue <clement.delafargue@fretlink.com>2020-06-19 15:39:22 +0200
committerClement Delafargue <clement.delafargue@fretlink.com>2020-06-22 14:41:16 +0200
commit96f02eb1f426c16c631598c80bec4bc0e60f75c1 (patch)
tree36a0cf97bdfea091f673537eef7c5465c97a657c /dhall
parentf39118d499132f017d7f2ec0944bf673b6deb7e9 (diff)
downloadansible-clever-96f02eb1f426c16c631598c80bec4bc0e60f75c1.tar.gz
ansible-clever-96f02eb1f426c16c631598c80bec4bc0e60f75c1.tar.zst
ansible-clever-96f02eb1f426c16c631598c80bec4bc0e60f75c1.zip
Add support for scalability configuration
Closes #52
Diffstat (limited to 'dhall')
-rw-r--r--dhall/Config.dhall25
1 files changed, 24 insertions, 1 deletions
diff --git a/dhall/Config.dhall b/dhall/Config.dhall
index e092e2c..12371f5 100644
--- a/dhall/Config.dhall
+++ b/dhall/Config.dhall
@@ -2,6 +2,20 @@ let Addon = (./Addon.dhall).Type
2 2
3let Vault = ./Vault.dhall 3let Vault = ./Vault.dhall
4 4
5let FixedOrRange =
6 λ(t : Type) → < Fixed : { fixed : t } | Range : { min : t, max : t } >
7
8let fixed = λ(t : Type) → λ(f : t) → (FixedOrRange t).Fixed { fixed = f }
9
10let range = λ(t : Type) → λ(r : { min : t, max : t }) → (FixedOrRange t).Range r
11
12let InstancesConfig = FixedOrRange Natural
13
14let FlavorsConfig = FixedOrRange Text
15
16let ScalingParameters =
17 { flavor : Optional FlavorsConfig, instances : Optional InstancesConfig }
18
5let Config = 19let Config =
6 λ(Environment : Type) 20 λ(Environment : Type)
7 → { clever_app : Text 21 → { clever_app : Text
@@ -16,6 +30,7 @@ let Config =
16 , clever_addons : List Addon 30 , clever_addons : List Addon
17 , clever_env : Environment 31 , clever_env : Environment
18 , clever_build_flavor : Optional Text 32 , clever_build_flavor : Optional Text
33 , clever_scaling : Optional ScalingParameters
19 } 34 }
20 35
21let mkConfig = 36let mkConfig =
@@ -34,7 +49,15 @@ let mkConfig =
34 , clever_addons = [] : List Addon 49 , clever_addons = [] : List Addon
35 , clever_env = {=} 50 , clever_env = {=}
36 , clever_build_flavor = None Text 51 , clever_build_flavor = None Text
52 , clever_scaling = None ScalingParameters
37 } 53 }
38 : Config {} 54 : Config {}
39 55
40in { Type = Config, mkConfig = mkConfig } 56in { Type = Config
57 , mkConfig = mkConfig
58 , ScalingParameters = ScalingParameters
59 , InstancesConfig = InstancesConfig
60 , FlavorsConfig = FlavorsConfig
61 , fixed = fixed
62 , range = range
63 }