Skip to content

Custom Kubernetes objects ​

If app.yml doesn't cover what your app needs, you have two options: resources provided by plugins, or arbitrary Kubernetes objects.

Plugin resources ​

Custom resource plugins add new kinds of resources that apps can use, for example Tor onion services. Declare them as top-level keys in app.yml, in the form <plugin app>: <plugin id>: <definition>:

yaml
version: 1

containers:
  main:
    image: linkstackorg/linkstack:latest
    ingress_port: 80

tor:
  onion-service:
    web:
      target_svc: main
      ports:
        80: 80

n5i passes the definition to the plugin, which turns it into Kubernetes objects. The format of the definition is up to the plugin, so check its documentation. Add the plugin's app to your app's dependencies so it is installed first.

Arbitrary objects ​

You can also apply arbitrary Kubernetes objects. Put them into custom.yml (or the template custom.yml.jinja) in your app's directory, separated by ---:

yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: linkstack-extra
data:
  hello: world
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: linkstack-more
data:
  foo: bar

The objects are applied when the app is installed.

WARNING

Apps with a custom.yml get the builtin/root permission, so only admins can install them. If your use case should work without admin permissions, please open an issue so it can become a built-in feature.

Free and open-source software under the GNU AGPL 3.0 or later.