inline

Description of the inline asset type

This content is associated with a legacy version of the Replicated product. For the current Replicated product documentation, see docs.replicated.com.

Inline Asset Type

Inline asset types are useful to deliver text files such as Kubernetes manifests, application config files and shell scripts. The YAML reference documentation is published that defines all available keys.

Kubernetes Manifests

An example of delivering a simple Kubernetes manifest as an inline asset in Ship is:

assets:
  v1:
    - inline:
        dest: ./k8s/redis.yml
        contents: |
          ---
          apiVersion: v1
          kind: Pod
          metadata:
            labels:
              name: redis
              redis-sentinel: "true"
              role: master
            name: redis-master
          spec:
            containers:
              - name: master
                image: redis:4.0.9
                ports:
                  - containerPort: 6379
                resources:
                  limits:
                    cpu: "0.1"
                    value: "true"

Application Config

An example of delivering an applicastion config file as an inline asset (redis.conf) in Ship is:

assets:
  v1:
    - inline:
        dest: ./conf/redis.conf
        contents: |
          slaveof redis-master 6379
          slave-serve-stale-data yes

Shell Scripts

An example of delivering a shell script as an inline asset in Ship is:

assets:
  v1:
    - inline:
        dest: ./install.sh
        mode: 755
        contents: |
          #!/bin/bash

          kubectl apply -f ./k8s/ -n {{repl ConfigOption "k8s_namespace"}}