aboutsummaryrefslogtreecommitdiffhomepage
path: root/dhall/Config.dhall
diff options
context:
space:
mode:
authorClément Delafargue <39330590+clementd-fretlink@users.noreply.github.com>2020-06-22 14:53:42 +0200
committerGitHub <noreply@github.com>2020-06-22 14:53:42 +0200
commitfcb00fd5cc86db70d122e126f52e24d0eba4af96 (patch)
tree93dee19980af622d21d08039aec2248e61bff186 /dhall/Config.dhall
parentf39118d499132f017d7f2ec0944bf673b6deb7e9 (diff)
parent791d2dcbcb3d90ea66ce9b6b519eeb576f5f601b (diff)
downloadansible-clever-fcb00fd5cc86db70d122e126f52e24d0eba4af96.tar.gz
ansible-clever-fcb00fd5cc86db70d122e126f52e24d0eba4af96.tar.zst
ansible-clever-fcb00fd5cc86db70d122e126f52e24d0eba4af96.zip
Merge pull request #67 from clementd-fretlink/scaling
scalability configuration
Diffstat (limited to 'dhall/Config.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 }