Kubernetes apps


Apps are stored in a Kubernetes ConfigMap named apps in the fastx namespace.

Creating Apps

Create apps in the application.ini format in the same way that you would in a typical cluster.
Special parameters to keep in mind that are needed for container images are shown below.

# container image
image=

# container image tag
imageTag=

# kubernetes imagePullPolicy 
imagePullPolicy= 

Container Images

When creating apps, it is important to make sure the X applications you are using are actually installed in the container. You can use a prebuilt container or build the container yourself.

You may choose to install all your X applications into one container, or create individual containers for each X application. We recommend preloading the container onto the cluster before going into production as a session cannot start until the container has been pulled, which may be multiple Gigs of data. Set your imagePullPolicy=IfNotPresent to make sure the images are loaded.

Notes on Desktop Images

We are currently working on building base desktop container images for use by our clients. Unfortunately desktops like GNOME are heavily reliant on systemd which causes issues when creating containers.

Updating the apps in the cluster

Edit your ~/fastx-cluster/kustomization.yaml file.

configMapGenerator:
  - name: apps
    namespace: fastx
    behavior: replace
    files:
      # add your app files to this section
      - apps/default.ini
      

Restart the cluster

kubectl apply -k ~/fastx-cluster
kubectl rollout restart -n fastx deploy/fastx4

session-pod.yaml

The FastX launcher dynamically creates a kustomization, configures it, and then launches it and connects back to the FastX 4 process.

The session-pod.yaml file is located at ~/fastx-cluster/base/config/launcher-pod/templates/session-pod.yaml
The session-pod.yaml file is a “handlebars” template file that injects

  • user data from the start script
  • admin configuration data
  • application.ini parameters
  • special kubernetes parameters

Built in containers

Multiple containers are built in the pod. They are listed below. Admins can modify the session pod and add more containers (for example a side car logger) as needed using the standard kustomization files

initContainers

  • fx-init-env: Used to set up the environment to contain the session data inside the pod
  • fx-init-passwd: Patches the /etc/passwd file with the username, uid,gid so that apps behave correctly
  • fx-init-tools: Sets up a mount and injects special tools in a custom directory for use with the main app

containers

  • fx-cluster-proxy: Securely connects the Xorg session to FastX server
  • fx-xorg: The FastX session. This container does not contain the user app
  • fx-ws-xorg-server: Proxy to connect the client to the FastX session
  • user-app: User defined app that runs the image that the admin has set up.
  • debug: container used for debugging purposes