Update to use docker-build format and modern config style
This commit is contained in:
@@ -1,12 +1,24 @@
|
|||||||
(ns k8s.services.foundryvtt.service)
|
(ns k8s.services.foundryvtt.service)
|
||||||
|
|
||||||
(def config
|
(def config
|
||||||
{:stack [:vault-secrets :docker-image :deployment :service :ingress]
|
{:stack [:vault:prepare :harbor:robot-account :docker:image [:k8s :deployment :service :httproute]]
|
||||||
:image-port 30000
|
:image-port 30000
|
||||||
:app-namespace "generic"
|
:app-namespace "generic"
|
||||||
:app-name "foundry"
|
:app-name "foundry"
|
||||||
:image-opts {:build {:args {:FOUNDRY_USERNAME 'FOUNDRY_USERNAME
|
:docker:image-opts {:is-local true
|
||||||
:FOUNDRY_PASSWORD 'FOUNDRY_PASSWORD}}
|
:buildArgs {:FOUNDRY_USERNAME 'FOUNDRY_USERNAME
|
||||||
:imageName '(str repo "/" app-name ":latest")}
|
:FOUNDRY_PASSWORD 'FOUNDRY_PASSWORD}
|
||||||
:deployment-opts {:spec {:template {:spec {:imagePullSecrets [{:name "harbor-creds-secrets"}]
|
:registry {:server '(str registry-base "/" registry-namespace)
|
||||||
:containers [{:name 'app-name :image '(str repo "/" app-name ":latest")}]}}}}})
|
:username '(-> :harbor:robot-account .-name)
|
||||||
|
:password '(-> :harbor:robot-account .-secret)}
|
||||||
|
:tags ['(str registry-base "/" registry-namespace "/" app-name)]
|
||||||
|
:push true}
|
||||||
|
:k8s:deployment-opts {:spec {:template {:spec {:imagePullSecrets [{:name "harbor-creds-secrets"}]
|
||||||
|
:containers [{:name 'app-name :image '(str registry-base "/" registry-namespace "/" app-name ":latest")}]}}}}
|
||||||
|
:harbor:robot-account-opts {:name 'app-name
|
||||||
|
:permissions [{:kind "project"
|
||||||
|
:namespace 'registry-namespace
|
||||||
|
:access [{:action "pull" :resource "repository"}
|
||||||
|
{:action "push" :resource "repository"}
|
||||||
|
{:action "list" :resource "repository"}]}]}
|
||||||
|
:k8s:httproute-opts {:spec {::hostnames ['host]}}})
|
||||||
|
|||||||
Reference in New Issue
Block a user