Define Cinny
This commit is contained in:
@@ -1,12 +1,29 @@
|
|||||||
(ns k8s.services.matrix.cinny.service)
|
(ns k8s.services.matrix.cinny.service)
|
||||||
|
|
||||||
(def config
|
(def config
|
||||||
{:stack [:vault-secrets :docker-image :deployment :service :ingress]
|
{:stack [:vault:prepare
|
||||||
:image-port 80
|
:harbor:robot-account
|
||||||
|
:docker:image
|
||||||
|
[:k8s :deployment :service :httproute]]
|
||||||
:app-namespace "matrix"
|
:app-namespace "matrix"
|
||||||
:app-name "cinny"
|
:app-name "cinny"
|
||||||
:image-opts {:build {:args {:FOUNDRY_USERNAME 'FOUNDRY_USERNAME
|
:docker:image-opts {:context {:location "https://github.com/GigiaJ/cinny.git"}
|
||||||
:FOUNDRY_PASSWORD 'FOUNDRY_PASSWORD}}
|
:imageName '(str registry-base "/" registry-namespace "/" app-name ":latest")
|
||||||
:imageName '(str repo "/" app-name ":latest")}
|
:registry {:server '(str registry-base "/" registry-namespace)
|
||||||
:deployment-opts {:spec {:template {:spec {:imagePullSecrets [{:name "harbor-creds-secrets"}]
|
:username '(-> :harbor:robot-account .-name)
|
||||||
:containers [{:name 'app-name :image '(str repo "/" app-name ":latest")}]}}}}})
|
:password '(-> :harbor:robot-account .-secret)}
|
||||||
|
:tags ['(str registry-base "/" registry-namespace "/" app-name)]
|
||||||
|
:push true}
|
||||||
|
|
||||||
|
: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:deployment-opts {:spec {:template {:spec {:imagePullSecrets [{:name "harbor-creds-secrets"}]
|
||||||
|
:containers [{:name 'app-name
|
||||||
|
:image '(str registry-base "/" registry-namespace "/" app-name ":latest")
|
||||||
|
:ports [{:containerPort 80}]}]}}}}
|
||||||
|
:k8s:httproute-opts {:spec {::hostnames ['host]}}})
|
||||||
Reference in New Issue
Block a user