| local mirko = import "../../kube/mirko.libsonnet"; |
| local kube = import "../../kube/kube.libsonnet"; |
| |
| { |
| cfg:: { |
| ldapBindPassword: error "ldapBindPassword must be set!", |
| image: "registry.k0.hswaw.net/q3k/capacifier:1680390588", |
| fqdn: "capacifier.hackerspace.pl", |
| }, |
| |
| component(cfg, env):: mirko.Component(env, "capacifier") { |
| local capacifier = self, |
| cfg+: { |
| image: cfg.image, |
| container: capacifier.GoContainer("main", "/hswaw/capacifier/capacifier") { |
| env_: { |
| BIND_PW: kube.SecretKeyRef(capacifier.secret, "bindPW"), |
| }, |
| command+: [ |
| "-api_listen", "0.0.0.0:5000", |
| "-ldap_bind_pw", "$(BIND_PW)", |
| ], |
| }, |
| ports+: { |
| publicHTTP: { |
| api: { |
| port: 5000, |
| dns: cfg.fqdn, |
| } |
| }, |
| }, |
| }, |
| |
| secret: kube.Secret("capacifier") { |
| metadata+: capacifier.metadata, |
| data_: { |
| bindPW: cfg.ldapBindPassword, |
| }, |
| }, |
| }, |
| } |