Application specification (API reference)

Overview of the applications specification yaml structure (application API reference)

Example

Example of how your application deployment might look like:

name: redis-example-private
description: Multi-container redis example
scheduling:
  type: Conditional
  selectors:
    location: roof
spec:
  containers:
  - name: hello
    image: quay.io/synpse/hello-synpse-redis-go-private:latest
    # Registry authentication
    auth:
      username:  my_registry
      fromSecret: registry_secret
    # Expose a port
    ports:
    - 8090:8090
    # Optionally mount tty devices into the container
    devices:
      - hostPath: /dev/ttyACM0
        containerPath: /dev/ttyACM0
  - name: redis
    image: docker.io/redis:latest
    # Mount a file type secret directly into 
    # the container
    secrets:
    - name: redis-config
      filepath: /path/to/config.yaml
    env:
    - name: REDIS_PASSWORD
      fromSecret: redis-password
    - name: RANDOM_KEY
      value: random-value
    # Mount a volume from the host machine
    volumes:
    - /tmp/redis:/data

Spec API

Scheduling

Specification

Container

Exec

Auth

Devices

Synpse allows adding host device to the container, similarly how Docker API works. It is often necessary to directly expose devices to a container. The devices config enables that. For example, a specific block storage device or loop device or audio device can be added to an otherwise unprivileged container and have the application directly access it.

Environment

Secret (file)

Secrets has its own API. This documentation is here for convenience as it is very closely tied to Application API

Last updated