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
|
||||
, image : Text
|
||||
, domain : Text
|
||||
, replicas : Natural
|
||||
, leIssuer : Text
|
||||
, envVars : List kubernetes.EnvVar.Type
|
||||
, otherContainers : List kubernetes.Container.Type
|
||||
}
|
||||
, default =
|
||||
{ name = ""
|
||||
, appPort = 5000
|
||||
, image = ""
|
||||
, domain = ""
|
||||
, replicas = 1
|
||||
, leIssuer = "staging"
|
||||
, 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,20 +11,27 @@ let selector = ./selector.dhall
|
|||
let podSpec
|
||||
: Config.Type → kubernetes.PodSpec.Type
|
||||
= λ(config : Config.Type)
|
||||
→ kubernetes.PodSpec::{
|
||||
, containers =
|
||||
[ kubernetes.Container::{
|
||||
, name = "web"
|
||||
, env = config.envVars
|
||||
, image = Some config.image
|
||||
, imagePullPolicy = Some "Always"
|
||||
, ports =
|
||||
[ kubernetes.ContainerPort::{ containerPort = config.appPort } ]
|
||||
→ let rootContainer =
|
||||
[ kubernetes.Container::{
|
||||
, name = "web"
|
||||
, env = config.envVars
|
||||
, image = Some config.image
|
||||
, imagePullPolicy = Some "Always"
|
||||
, ports =
|
||||
[ kubernetes.ContainerPort::{ containerPort = config.appPort }
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
let other = config.otherContainers
|
||||
|
||||
let combined = rootContainer # other
|
||||
|
||||
in kubernetes.PodSpec::{
|
||||
, containers = combined
|
||||
, imagePullSecrets =
|
||||
[ kubernetes.LocalObjectReference::{ name = Some "regcred" } ]
|
||||
}
|
||||
]
|
||||
, imagePullSecrets =
|
||||
[ kubernetes.LocalObjectReference::{ name = Some "regcred" } ]
|
||||
}
|
||||
|
||||
let spec =
|
||||
λ(config : Config.Type)
|
||||
|
@ -32,6 +39,7 @@ let spec =
|
|||
, selector = kubernetes.LabelSelector::{
|
||||
, matchLabels = selector config.name
|
||||
}
|
||||
, replicas = Some config.replicas
|
||||
, template = kubernetes.PodTemplateSpec::{
|
||||
, metadata = kubernetes.ObjectMeta::{
|
||||
, 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