app/inventory: add labelmaker
Change-Id: Iec74829c796865a11df67333eb9a9e3f1ca9d6ce
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1886
Reviewed-by: palid <palid@hackerspace.pl>
diff --git a/app/inventory/prod.jsonnet b/app/inventory/prod.jsonnet
index 5825ab4..32ba5bf 100644
--- a/app/inventory/prod.jsonnet
+++ b/app/inventory/prod.jsonnet
@@ -10,7 +10,10 @@
namespace: 'inventory',
domain: 'inventory.hackerspace.pl',
- image: 'registry.k0.hswaw.net/palid/inventory-19.01.2024-2',
+ images: {
+ app: 'registry.k0.hswaw.net/palid/inventory-31.01.2024-3',
+ labelmaker: 'registry.k0.hswaw.net/radex/spejstore-labelmaker:20240131004254',
+ },
oauthClientId: '82fffb65-0bbd-4d18-becd-0ce0b31373cf',
storageClassName: 'waw-hdd-redundant-3',
@@ -18,12 +21,12 @@
},
secretRefs:: {
- // Uses basic auth
- labelApi: { secretKeyRef: { name: cfg.name, key: 'label_api' } },
postgres: { secretKeyRef: { name: cfg.name, key: 'postgres_password' } },
oauth: { secretKeyRef: { name: cfg.name, key: 'oauth_secret' } },
s3Secret: { secretKeyRef: { name: cfg.name, key: 's3_secret_key' } },
s3Access: { secretKeyRef: { name: cfg.name, key: 's3_access_key' } },
+ // Uses http basic auth
+ ipp_printer_url: { secretKeyRef: { name: cfg.name, key: 'ipp_printer_url' } },
},
local ns = kube.Namespace(cfg.namespace),
@@ -37,7 +40,7 @@
},
containers_: {
default: kube.Container('default') {
- image: cfg.image,
+ image: cfg.images.app,
ports_: {
web: { containerPort: 8000 },
},
@@ -55,7 +58,7 @@
SPEJSTORE_REQUIRE_AUTH: 'true',
SPEJSTORE_LAN_ALLOWED_ADDRESS_SPACE: '185.236.240.5',
SPEJSTORE_HOST: 'https://' + cfg.domain,
- SPEJSTORE_LABEL_API: top.secretRefs.labelApi,
+ SPEJSTORE_LABEL_API: 'http://localhost:4567',
SPEJSTORE_FILE_STORAGE_TYPE: 's3',
SPEJSTORE_S3_ACCESS_KEY: top.secretRefs.s3Access,
SPEJSTORE_S3_SECRET_KEY: top.secretRefs.s3Secret,
@@ -69,6 +72,23 @@
media: { mountPath: cfg.mediaPath },
},
},
+ labelmaker: kube.Container('labelmaker') {
+ image: cfg.images.labelmaker,
+ ports_: {
+ web: { containerPort: 4567 },
+ },
+ env_: {
+ LABELMAKER_CODE_PREFIX: 'https://inventory.hackerspace.pl/',
+ LABELMAKER_LABEL_SIZE: '[89, 36]',
+ LABELMAKER_LOCAL_PRINTER_NAME: '',
+ LABELMAKER_IPP_PRINTER_URL: top.secretRefs.ipp_printer_url,
+ },
+ livenessProbe: {
+ httpGet: { path: '/api/2/health', port: 4567 },
+ initialDelaySeconds: 60,
+ periodSeconds: 60,
+ },
+ },
},
},
},