k8s: import other apps
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
81d091659f
commit
35e2add229
|
@ -5,15 +5,19 @@ in { Type =
|
||||||
, appPort : Natural
|
, appPort : Natural
|
||||||
, image : Text
|
, image : Text
|
||||||
, domain : Text
|
, domain : Text
|
||||||
|
, replicas : Natural
|
||||||
, leIssuer : Text
|
, leIssuer : Text
|
||||||
, envVars : List kubernetes.EnvVar.Type
|
, envVars : List kubernetes.EnvVar.Type
|
||||||
|
, otherContainers : List kubernetes.Container.Type
|
||||||
}
|
}
|
||||||
, default =
|
, default =
|
||||||
{ name = ""
|
{ name = ""
|
||||||
, appPort = 5000
|
, appPort = 5000
|
||||||
, image = ""
|
, image = ""
|
||||||
, domain = ""
|
, domain = ""
|
||||||
|
, replicas = 1
|
||||||
, leIssuer = "staging"
|
, leIssuer = "staging"
|
||||||
, envVars = [] : List kubernetes.EnvVar.Type
|
, envVars = [] : List kubernetes.EnvVar.Type
|
||||||
|
, otherContainers = [] : List kubernetes.Container.Type
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
let makeApp = ../app/make.dhall
|
||||||
|
|
||||||
|
let Config = ../app/config.dhall
|
||||||
|
|
||||||
|
let cfg =
|
||||||
|
Config::{
|
||||||
|
, name = "idp"
|
||||||
|
, appPort = 5000
|
||||||
|
, image = "xena/idp:031320190918"
|
||||||
|
, domain = "idp.christine.website"
|
||||||
|
, leIssuer = "prod"
|
||||||
|
, envVars = /home/cadey/code/within-terraform-secret/idp.dhall
|
||||||
|
}
|
||||||
|
|
||||||
|
in makeApp cfg
|
|
@ -0,0 +1,14 @@
|
||||||
|
let makeApp = ../app/make.dhall
|
||||||
|
|
||||||
|
let Config = ../app/config.dhall
|
||||||
|
|
||||||
|
let cfg =
|
||||||
|
Config::{
|
||||||
|
, name = "olin"
|
||||||
|
, appPort = 5000
|
||||||
|
, image = "xena/olin:latest"
|
||||||
|
, domain = "olin.within.website"
|
||||||
|
, leIssuer = "prod"
|
||||||
|
}
|
||||||
|
|
||||||
|
in makeApp cfg
|
|
@ -0,0 +1,16 @@
|
||||||
|
let makeApp = ../app/make.dhall
|
||||||
|
|
||||||
|
let Config = ../app/config.dhall
|
||||||
|
|
||||||
|
let image = env:DOCKER_IMAGE as Text ? "xena/tulpaforce:20190906"
|
||||||
|
|
||||||
|
let cfg =
|
||||||
|
Config::{
|
||||||
|
, name = "tulpaforcexyz"
|
||||||
|
, appPort = 80
|
||||||
|
, image = image
|
||||||
|
, domain = "tulpaforce.xyz"
|
||||||
|
, leIssuer = "prod"
|
||||||
|
}
|
||||||
|
|
||||||
|
in makeApp cfg
|
|
@ -0,0 +1,16 @@
|
||||||
|
let makeApp = ../app/make.dhall
|
||||||
|
|
||||||
|
let Config = ../app/config.dhall
|
||||||
|
|
||||||
|
let image = env:DOCKER_IMAGE as Text ? "xena/within.website:091120192252"
|
||||||
|
|
||||||
|
let cfg =
|
||||||
|
Config::{
|
||||||
|
, name = "withinwebsite"
|
||||||
|
, appPort = 5000
|
||||||
|
, image = image
|
||||||
|
, domain = "within.website"
|
||||||
|
, leIssuer = "prod"
|
||||||
|
}
|
||||||
|
|
||||||
|
in makeApp cfg
|
|
@ -11,17 +11,24 @@ let selector = ./selector.dhall
|
||||||
let podSpec
|
let podSpec
|
||||||
: Config.Type → kubernetes.PodSpec.Type
|
: Config.Type → kubernetes.PodSpec.Type
|
||||||
= λ(config : Config.Type)
|
= λ(config : Config.Type)
|
||||||
→ kubernetes.PodSpec::{
|
→ let rootContainer =
|
||||||
, containers =
|
|
||||||
[ kubernetes.Container::{
|
[ kubernetes.Container::{
|
||||||
, name = "web"
|
, name = "web"
|
||||||
, env = config.envVars
|
, env = config.envVars
|
||||||
, image = Some config.image
|
, image = Some config.image
|
||||||
, imagePullPolicy = Some "Always"
|
, imagePullPolicy = Some "Always"
|
||||||
, ports =
|
, ports =
|
||||||
[ kubernetes.ContainerPort::{ containerPort = config.appPort } ]
|
[ kubernetes.ContainerPort::{ containerPort = config.appPort }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
let other = config.otherContainers
|
||||||
|
|
||||||
|
let combined = rootContainer # other
|
||||||
|
|
||||||
|
in kubernetes.PodSpec::{
|
||||||
|
, containers = combined
|
||||||
, imagePullSecrets =
|
, imagePullSecrets =
|
||||||
[ kubernetes.LocalObjectReference::{ name = Some "regcred" } ]
|
[ kubernetes.LocalObjectReference::{ name = Some "regcred" } ]
|
||||||
}
|
}
|
||||||
|
@ -32,6 +39,7 @@ let spec =
|
||||||
, selector = kubernetes.LabelSelector::{
|
, selector = kubernetes.LabelSelector::{
|
||||||
, matchLabels = selector config.name
|
, matchLabels = selector config.name
|
||||||
}
|
}
|
||||||
|
, replicas = Some config.replicas
|
||||||
, template = kubernetes.PodTemplateSpec::{
|
, template = kubernetes.PodTemplateSpec::{
|
||||||
, metadata = kubernetes.ObjectMeta::{
|
, metadata = kubernetes.ObjectMeta::{
|
||||||
, name = config.name
|
, name = config.name
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
https://raw.githubusercontent.com/dhall-lang/dhall-kubernetes/master/1.15/typesUnion.dhall sha256:930a34021bd380209b6763d4a98fb16e1f5608fe5e8d1403d0ec03f6c4a08f00
|
https://xena.greedo.xeserv.us/pkg/dhall/dhall-kubernetes/1.15/typesUnion.dhall sha256:930a34021bd380209b6763d4a98fb16e1f5608fe5e8d1403d0ec03f6c4a08f00
|
||||||
|
|
Loading…
Reference in New Issue