mirror of
https://gerrit.hackerspace.pl/hscloud
synced 2024-10-18 03:07:44 +00:00
hswaw/labelmaker: deploy OG labelmaker
Change-Id: Ibe0e334f1c5faabeba14c8dce1afabe6a8095d4e Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1901 Reviewed-by: informatic <informatic@hackerspace.pl>
This commit is contained in:
parent
ff8a50cb02
commit
7bde2d4f0c
3 changed files with 81 additions and 1 deletions
78
hswaw/labelmaker/labelmaker.libsonnet
Normal file
78
hswaw/labelmaker/labelmaker.libsonnet
Normal file
|
@ -0,0 +1,78 @@
|
|||
local kube = import "../../kube/hscloud.libsonnet";
|
||||
|
||||
{
|
||||
local top = self,
|
||||
local cfg = self.cfg,
|
||||
|
||||
cfg:: {
|
||||
name: 'labelmaker',
|
||||
namespace: 'labelmaker',
|
||||
domain: 'label.hackerspace.pl',
|
||||
images: {
|
||||
app: 'registry.k0.hswaw.net/radex/labelmaker:20240207180545',
|
||||
proxy: "quay.io/oauth2-proxy/oauth2-proxy:v7.2.1",
|
||||
},
|
||||
},
|
||||
|
||||
secretRefs:: {
|
||||
cookie_secret: { secretKeyRef: { name: "labelmaker-proxy", key: "cookie_secret" } },
|
||||
oidc_secret: { secretKeyRef: { name: "labelmaker-proxy", key: "oidc_secret" } },
|
||||
},
|
||||
|
||||
local ns = kube.Namespace(cfg.namespace),
|
||||
|
||||
deployment: ns.Contain(kube.Deployment(cfg.name)) {
|
||||
spec+: {
|
||||
replicas: 1,
|
||||
template+: {
|
||||
spec+: {
|
||||
containers_: {
|
||||
default: kube.Container("default") {
|
||||
image: cfg.images.proxy,
|
||||
ports_: {
|
||||
http: { containerPort: 8001 },
|
||||
},
|
||||
env_: {
|
||||
OAUTH2_PROXY_UPSTREAMS: "http://127.0.0.1:5000",
|
||||
OAUTH2_PROXY_HTTP_ADDRESS: "0.0.0.0:8001",
|
||||
|
||||
OAUTH2_PROXY_COOKIE_SECRET: top.secretRefs.cookie_secret,
|
||||
|
||||
OAUTH2_PROXY_PROVIDER: "oidc",
|
||||
OAUTH2_PROXY_OIDC_ISSUER_URL: "https://sso.hackerspace.pl",
|
||||
OAUTH2_PROXY_SKIP_PROVIDER_BUTTON: "true",
|
||||
|
||||
OAUTH2_PROXY_CLIENT_ID: "f99bcf63-fb39-4916-baae-7f66aa969115",
|
||||
OAUTH2_PROXY_CLIENT_SECRET: top.secretRefs.oidc_secret,
|
||||
|
||||
OAUTH2_PROXY_EMAIL_DOMAINS: "*",
|
||||
|
||||
OAUTH2_PROXY_REVERSE_PROXY: true,
|
||||
OAUTH2_PROXY_TRUSTED_IPS: "185.236.240.5", // customs.hackerspace.pl
|
||||
},
|
||||
},
|
||||
|
||||
app: kube.Container("app") {
|
||||
image: cfg.images.app,
|
||||
ports_: {
|
||||
http: { containerPort: 5000 },
|
||||
},
|
||||
env_: {
|
||||
PRINTSERVANT_HOST: 'http://printservant.printservant.svc.cluster.local:3199',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
service: ns.Contain(kube.Service(cfg.name)) {
|
||||
target:: top.deployment,
|
||||
},
|
||||
|
||||
ingress: ns.Contain(kube.SimpleIngress(cfg.name)) {
|
||||
hosts:: [cfg.domain],
|
||||
target:: top.service,
|
||||
},
|
||||
}
|
|
@ -1,7 +1,9 @@
|
|||
local labelmaker = import "./labelmaker.libsonnet";
|
||||
local method_draw = import "./method-draw.libsonnet";
|
||||
local jspaint = import "./jspaint.libsonnet";
|
||||
|
||||
{
|
||||
text: labelmaker,
|
||||
vector: method_draw,
|
||||
pixel: jspaint,
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ local kube = import "../../kube/hscloud.libsonnet";
|
|||
cfg:: {
|
||||
name: 'printservant',
|
||||
namespace: 'printservant',
|
||||
image: 'registry.k0.hswaw.net/radex/printservant:20240202125925',
|
||||
image: 'registry.k0.hswaw.net/radex/printservant:20240207175956',
|
||||
},
|
||||
|
||||
secretRefs:: {
|
||||
|
|
Loading…
Reference in a new issue