Microservice Builder Components#

Deployment#

Type

ucf.k8s.app.deployment

Description:

This component specifies the Kubernetes workload deployment type. You can use it for Deployment, StatefulSet, DaemonSet, and other workload types. You must place this component first in the spec section of your manifest.

Parameters

Field

Type

Description

apptype

string (enum) (Mandatory)

Allowed values:
statefull (StatefulSet)
stateless (Deployment)
job (Job)
cronjob (CronJob)
daemonset (DaemonSet)
replicaset (ReplicaSet)
static-pod (Pod)

Pod Deployment Type

extraSpecs

Object

Used for setting extra fields for deployment that are not explicitly supported

Examples

---
spec:
- name: deployment
  type: ucf.k8s.app.deployment
  parameters:
    apptype: stateless
    extraSpecs:
      revisionHistoryLimit: 4

To combine multiple workload types in a microservice, create separate spec sections in separate YAML documents:

---
spec:
- name: backend-deployment
  type: ucf.k8s.app.deployment
  parameters:
    apptype: stateless

- name: backend-container
  type: ucf.k8s.container
  ...

---
- name: frontend-deployment
  type: ucf.k8s.app.deployment
  parameters:
    apptype: stateless

- name: frontend-container
  type: ucf.k8s.container
  ...

Container#

Type

ucf.k8s.container

Description:

This component adds a container to the deployment workload.

Parameters

Field

Type

Description

image

object (Mandatory)

Container image details

.repository

string

Container image repository address

.tag

string

Container image tag

.config_path

string

Path to container builder configuration file

.pullPolicy

string(enum)

Allowed values:
Always
Never
IfNotPresent

Container image pull policy

workload

string

Name reference to a workload component (ucf.appspec.app.workload)

command

list of strings

Array of command line strings to be executed

args

list of strings

List of arguments to the entry point

env

list

Array of environment variables to be set

.[].name

string

Name of the environment variable

.[].value

string

Value for the environment variable

livenessProbe

object

Liveness probe for the container. Refer to Probe

readinessProbe

object

Readiness probe for the container. Refer to Probe

startupProbe

object

Startup probe for the container. Refer to Probe

ports

list

List of container ports to be exposed

.[]

object

Details on container port to expose. Refer to ContainerPort

resources

object

Container resource requirements. For more information, refer to Container Resource Management

.limits

object

Maximum amount of compute resources allowed, mentioned as key-value pairs.

.requests

object

Minimum amount of compute resources required, mentioned as key-value pairs.

volumeMounts

list

List of volumes to mount in the container.

.[]

object

Details on the volume to mount. Refer to VolumeMount

securityContext

object

Security configuration for the container. Refer to SecurityContext

Examples

# ``name`` of the component is set as the container name
- name: server
  type: ucf.k8s.container
  parameters:
    image:
      repository: nvcr.io/nvidia/pytorch
      tag: 22.04-py3
    command: [sh, -c]
    args: ["python -m http.server 8080"]
    ports:
    - containerPort: 8080
      name: http
    volumeMounts:
    - name: localvol
      mountPath: /localvol
    resources:
      requests:
        cpu: 100m
        memory: 128Mi
      limits:
        cpu: 250m
        memory: 512Mi
        nvidia.com/gpu: 1
    livenessProbe:
      httpGet:
        port: http
    readinessProbe:
      httpGet:
        port: http
    securityContext:
      runAsNonRoot: true

Init Container#

Type

ucf.k8s.initcontainer

Description:

This component adds an initialization container to the deployment workload.

Parameters

Field

Type

Description

image

string (Mandatory)

Container image name

imagePullPolicy

string(enum)

Allowed values:
Always
Never
IfNotPresent

Container image pull policy

command

list of strings

Array of command line strings to be executed

args

list of strings

List of arguments to the entry point

env

list

Array of environment variables to be set

.[].name

string

Name of the environment variable

.[].value

string

Value for the environment variable

resources

object

Container resource requirements. For more information, refer to Container Resource Management

.limits

object

Maximum amount of compute resources allowed, mentioned as key-value pairs.

.requests

object

Minimum amount of compute resources required, mentioned as key-value pairs.

volumeMounts

list

List of volumes to mount in the container.

.[]

object

Details on the volume to mount. Refer to VolumeMount

securityContext

object

Security configuration for the container. Refer to SecurityContext

Examples

---
spec:
- name: backend-deployment
  type: ucf.k8s.app.deployment
  parameters:
    apptype: stateless

# ``name`` of the component is set as the initcontainer name
- name: server
  type: ucf.k8s.initcontainer
  parameters:
    image: nvcr.io/nvidia/pytorch:22.04-py3
    command: [sh, -c]
    args: ["python -m http.server 8080"]
    volumeMounts:
    - name: localvol
      mountPath: /localvol
    resources:
      requests:
        cpu: 100m
        memory: 128Mi
      limits:
        cpu: 250m
        memory: 512Mi
        nvidia.com/gpu: 1
    securityContext:
      runAsNonRoot: true

Volume#

Type

ucf.k8s.volume

Description:

This component adds a volume to the deployment workload.

Parameters

Refer to Volume

Examples

---
spec:
- name: backend-deployment
  type: ucf.k8s.app.deployment
  parameters:
    apptype: stateless

  # ``name`` of the component is set as the volume name
  # ``name`` will be required to mount the volume in a container
- name: configmap-volume
  type: ucf.k8s.volume
  parameters:
    configMap:
      name: my-app-config

- name: data
  type: ucf.k8s.pvc
  parameters:
    annotations:
      helm.sh/resource-policy: "keep"
    spec:
      storageClassName: mdx-local-path # omit this line to use default StorageClass provisioner
      accessModes: [ReadWriteOnce]
      resources:
        requests:
          storage: 50Mi

- name: data-volume
  type: ucf.k8s.volume
  parameters:
    persistentVolumeClaim:
      claimName: ${CHART_NAME}-data # substitue ${CHART_NAME} with manifest.yaml's chartName value

- name: my-container
  type: ucf.k8s.container
  parameters:
    ...
    volumeMounts:
    - name: configmap-volume
      mountPath: /tmp/app-configs
    - name: data-volume
      mountPath: /data

Volume Claim Template#

Type

ucf.k8s.volumeClaimTemplate

Description:

This component adds a volume claim template for Stateful workloads.

Parameters

Field

Type

Description

spec

object (Mandatory)

Persistent Volume Claim specification

.storageClassName

string

Storage class for the PVC

.volumeName

string

Volume name for the PVC

.accessModes

list of strings

Allowed Values:
ReadWriteOnce
ReadOnlyMany
ReadWriteMany
ReadWriteOncePod

Access mode of the storage requested. Refer to Access Modes

.resources

object

Storage resource requirements

.requests

object

Storage resource requests

.storage

string

Minimum storage requirement

.limits

object

Storage resource limits

.storage

string

Minimum storage requirement

annotations

object

Annotations to add on the PVC resource as key-value pairs

Examples

---
spec:
- name: backend-deployment
  type: ucf.k8s.app.deployment
  parameters:
    apptype: statefull
    statefulSetServiceName: myservice

  # ``name`` of the component is set as the volume name
  # ``name`` will be required to mount the volume in a container
- name: data-storage
  type: ucf.k8s.volumeClaimTemplate
  parameters:
    annotations:
      helm.sh/resource-policy: "keep"
    spec:
      accessModes: [ReadWriteOnce]
      storageClassName: mdx-local-path # omit this line to use default StorageClass provisioner
      resources:
        requests:
          storage: 1Gi

- name: my-container
  type: ucf.k8s.container
  parameters:
    ...
    volumeMounts:
    - name: data-storage
      mountPath: /data

- name: myservice
  type: ucf.k8s.service
  parameters:
    ports:
    - port: 1000
      name: http-api

Default Volume Mount#

Type

ucf.appspec.defaultVolumeMount

Description:

This component adds a volume mount to all containers and initialization containers in the deployment workload.

Parameters

Refer to VolumeMount

Examples

---
spec:
- name: backend-deployment
  type: ucf.k8s.app.deployment
  parameters:
    apptype: stateless

# Volume ``data-volume`` will be mounted at ``/data`` in all
# containers / init-containers in the deployment
# (my-container & my-init-container in this example)
- name: data-volume-mount
  type: ucf.appspec.defaultVolumeMount
  parameters:
    name: data-volume
    mountPath: /data

- name: data
  type: ucf.k8s.pvc
  parameters:
    annotations:
      helm.sh/resource-policy: "keep"
    spec:
      storageClassName: mdx-local-path
      accessModes: [ReadWriteOnce]
      resources:
        requests:
          storage: 50Mi

- name: data-volume
  type: ucf.k8s.volume
  parameters:
    persistentVolumeClaim:
      claimName: ${CHART_NAME}-data # substitue ${CHART_NAME} with manifest.yaml's chartName value

- name: my-container
  type: ucf.k8s.container
  parameters:
    ...

- name: my-init-container
  type: ucf.k8s.initcontainer
  parameters:
    ...

Persistent Volume Claim#

Type

ucf.k8s.pvc

Description:

This component adds a Persistent Volume Claim to the microservice.

Parameters

Field

Type

Description

spec

object (Mandatory)

Persistent Volume Claim specification

.storageClassName

string

Storage class for the PVC

.volumeName

string

Volume name for the PVC

.accessModes

list of strings

Allowed Values:
ReadWriteOnce
ReadOnlyMany
ReadWriteMany
ReadWriteOncePod

Access mode of the storage requested. Refer to Access Modes

.resources

object

Storage resource requirements

.requests

object

Storage resource requests

.storage

string

Minimum storage requirement

.limits

object

Storage resource limits

.storage

string

Minimum storage requirement

annotations

object

Annotations to add on the PVC resource as key-value pairs

Examples

---
spec:
- name: backend-deployment
  type: ucf.k8s.app.deployment
  parameters:
    apptype: stateless

  # ``name`` of the component is set as PVC Name
  # ``name`` will be required to add the PVC as volume to the pod
- name: data
  type: ucf.k8s.pvc
  parameters:
    annotations:
      helm.sh/resource-policy: "keep"
    spec:
      storageClassName: mdx-local-path # omit this line to use default StorageClass provisioner
      accessModes: [ReadWriteOnce]
      resources:
        requests:
          storage: 50Mi

- name: data-volume
  type: ucf.k8s.volume
  parameters:
    persistentVolumeClaim:
      claimName: ${CHART_NAME}-data # substitue ${CHART_NAME} with manifes.yaml's chartName value

- name: my-container
  type: ucf.k8s.container
  parameters:
    ...
    volumeMounts:
    - name: data-volume
      mountPath: /data

Service#

Type

ucf.k8s.service

Description:

This component adds a service resource to the microservice and associates it with the deployment workload. It creates a Kubernetes service resource.

Parameters

Field

Type

Description

ports

list (Mandatory)

List of ports to expose in the service

.[].port

integer (Mandatory)

Port of the service to expose

.[].name

string (Mandatory)

Name for service port (this is used as endpoint name)

.[].targetPort

string or integer

Number or name for target container port

.[].nodePort

integer

Port number of the node to expose this port

.[].range

integer

Range of ports. 0-<range - 1> will be added added to port/targetPort/nodePort

type

string (enum)

Allowed Values:
ClusterIP
NodePort
LoadBalancer
ExternalName

Service type

externalTrafficPolicy

string (enum)

Allowed values:
Cluster
Local

Route external traffic to node-local or cluster-wide endpoints

clusterIP

string

Cluster IP address for the service

nameOverride

boolean

Enable to set service name as set as <appname>-<service-name>

fullNameOverride

boolean

Enable to set service name as set as <service-name>

annotations

object

Annotations to set on the service as key(string)-value(string) pairs

labels

object

Labels to set on the service as key(string)-value(string) pairs

extraSpecs

object

Used for setting extra fields for the service that are not explicitly supported

Examples

---
spec:
- name: backend-deployment
  type: ucf.k8s.app.deployment
  parameters:
    apptype: stateless

- name: "backend-container"
  type: ucf.k8s.container
  parameters:
    image:
      repository: nvcr.io/nvidia/pytorch
      tag: 22.04-py3
    command: [sh, -c]
    args: ["python -m http.server 8080"]
    ports:
    - containerPort: 8080
      name: http

- name: backend-service
  type: ucf.k8s.service
  parameters:
    annotations:
      some-annotation: annotation-value
    labels:
      some-label: label-value
    ports:
    - port: http  # Must match a container port in the workload
      name: http-api
    type: NodePort

Image Pull Secret#

Type

ucf.k8s.imagepullsecret

Description:

This component adds an image pull secret for pulling container images used in the Pod. Ideally, this should not be part of the microservice since the deployment location or deployer may not be known during microservice development. Instead, you can set it from the application.

Parameters

Field

Type

Description

name

string (Mandatory)

Image pull secret name

Examples

---
spec:
- name: backend-deployment
  type: ucf.k8s.app.deployment
  parameters:
    apptype: stateless

- name: ngc-image-pull-secret
  type: ucf.k8s.imagepullsecret
  parameters:
    name: ngc-docker-reg-secret

ConfigMap#

Type

ucf.k8s.configmap

Description:

This component adds a ConfigMap to the microservice.

Parameters

Field

Type

Description

name

string (Mandatory)

Name for the configmap resource

data

object (Mandatory)

Data to add in the configmap as key(string)-value(string) pairs

annotations

object (Mandatory)

Annotations to add on the configmap resource as key(string)-value(string) pairs

Examples

---
spec:
- name: backend-deployment
  type: ucf.k8s.app.deployment
  parameters:
    apptype: stateless

# ``config.json`` will be mounted at ``/tmp/app-configs/config.json`` in the container
- name: my-app-config
  type: ucf.k8s.configmap
  parameters:
    name: my-app-config
    data:
      config.json: |
        {
          "log-level": "DEBUG"
        }

- name: configmap-volume
  type: ucf.k8s.volume
  parameters:
    configMap:
      name: my-app-config

- name: my-container
  type: ucf.k8s.container
  parameters:
    ...
    volumeMounts:
    - name: configmap-volume
      mountPath: /tmp/app-configs

Pod Annotations#

Type

ucf.k8s.podAnnotations

Description:

This component adds annotations to pods belonging to a deployment workload.

Parameters

Field

Type

Description

annotations

object (Mandatory)

Annotations to add on the pods as key(string)-value(string) pairs

Examples

---
spec:
- name: backend-deployment
  type: ucf.k8s.app.deployment
  parameters:
    apptype: stateless

- name: pod-annotations
  type: ucf.k8s.podAnnotations
  parameters:
    kubernetes.io/description: Description of the pod behavior

Pod Labels#

Type

ucf.k8s.podLabels

Description:

This component adds labels to pods belonging to a deployment workload.

Parameters

Field

Type

Description

labels

object (Mandatory)

Labels to add on the pods as key(string)-value(string) pairs

Examples

---
spec:
- name: backend-deployment
  type: ucf.k8s.app.deployment
  parameters:
    apptype: stateless

- name: pod-labels
  type: ucf.k8s.podLabels
  parameters:
    pod-type: "backend-pod"

Pod Security Context#

Type

ucf.k8s.podSecurityContext

Description:

This component sets the security configuration at the pod level.

Parameters

Refer to Pod Security Context

Examples

---
spec:
- name: backend-deployment
  type: ucf.k8s.app.deployment
  parameters:
    apptype: stateless

- name: podSecurityContext
  type: ucf.k8s.podSecurityContext
  parameters:
    runAsGroup: 1000
    runAsUser: 1000

Container Restart Policy#

Type

ucf.k8s.restartPolicy

Description:

This component sets the container restart policy for all containers in the pod.

Parameters

Field

Type

Description

policy

string(enum) (Mandatory)

Allowed Values:
Always
Never
OnFailure

Container Restart Policy. Only certain values are allowed based on the workload type.

Examples

---
spec:
- name: backend-deployment
  type: ucf.k8s.app.deployment
  parameters:
    apptype: stateless

- name: restartPolicy
  type: ucf.k8s.restartPolicy
  parameters:
    policy: Always

Pod DNS Policy#

Type

ucf.k8s.dnsPolicy

Description:

This component sets the DNS policy for the pod. Refer to Pod’s DNS Policy.

Parameters

Field

Type

Description

policy

string(enum) (Mandatory)

Allowed Values:
Default
ClusterFirst
ClusterFirstWithHostNet
None

Pod DNS Policy

Examples

---
spec:
- name: backend-deployment
  type: ucf.k8s.app.deployment
  parameters:
    apptype: stateless

- name: dnsPolicy
  type: ucf.k8s.dnsPolicy
  parameters:
    policy: ClusterFirst

PVC Retention Policy#

Type

ucf.k8s.persistentVolumeClaimRetentionPolicy

Description:

This component sets the retention policy for PVCs created using volumeClaimTemplates of a StatefulSet. It requires Kubernetes 1.27+.

Parameters

Field

Type

Description

whenDeleted

string(enum)

Allowed Values:
Retain (Keep the PVC)
Delete (Delete the PVC)

PVC retention policy when StatefulSet resource is deleted

whenScaled

string(enum)

Allowed Values:
Retain (Keep the PVC)
Delete (Delete the PVC)

PVC retention policy when StatefulSet resource is scaled down

Examples

---
spec:
- name: backend-deployment
  type: ucf.k8s.app.deployment
  parameters:
    apptype: statefull

- name: pvc-retention-policy
  type: ucf.k8s.persistentVolumeClaimRetentionPolicy
  parameters:
    whenDeleted: Delete
    whenScaled: Retain

Pod Management Policy#

Type

ucf.k8s.persistentVolumeClaimRetentionPolicy

Description:

This component sets the pod replica ordering policy for a StatefulSet. Refer to Pod Management Policies.

Parameters

Field

Type

Description

policy

string(enum)

Allowed Values:
OrderedReady (Launch Pod replicas Sequentially)
Parallel (Launch Pod replicas Parallelly)

Pod replica management policy

Examples

---
spec:
- name: backend-deployment
  type: ucf.k8s.app.deployment
  parameters:
    apptype: statefull

- name: pvc-management-policy
  type: ucf.k8s.podManagementPolicy
  parameters:
    policy: Parallel

Job Options#

Type

ucf.k8s.app.job.jobOptions

Description:

This component sets various parameters for a Job workload. Refer to Job Spec.

Parameters

Field

Type

Description

backoffLimit

integer

Number of retries before marking job as failed

completionMode

string(enum)

Allowed Values:
NonIndexed
Indexed

Method to track completion of pods

completions

integer

Number of successfully finished pods this job should be run with

manualSelector

boolean

Enable user specified selectors

parallelism

integer

Maximum number of pods that run at any time

selector

object

Labels to query. Should match job count

suspend

boolean

Whether the job controller should create pods

ttlSecondsAfterFinished

integer

Time after job completion after which pods will be deleted

Examples

---
spec:
- name: backend-deployment
  type: ucf.k8s.app.deployment
  parameters:
    apptype: job

- name: job-options
  type: ucf.k8s.app.job.jobOptions
  parameters:
    completionMode: Indexed
    parallelism: 3

Job Deadline#

Type

ucf.k8s.app.job.activeDeadlineSeconds

Description:

This component sets the maximum duration that a pod should execute for a Job workload.

Parameters

Field

Type

Description

seconds

integer

Deadline for the job in seconds

Examples

---
spec:
- name: backend-deployment
  type: ucf.k8s.app.deployment
  parameters:
    apptype: job

- name: job-deadline
  type: ucf.k8s.app.job.activeDeadlineSeconds
  parameters:
    seconds: 100

CronJob Schedule#

Type

ucf.k8s.app.cronjob.schedule

Description:

This component sets the cron schedule for pods of CronJob workload.

Parameters

Field

Type

Description

schedule

string

Cronjob schedule string

Examples

---
spec:
- name: backend-deployment
  type: ucf.k8s.app.deployment
  parameters:
    apptype: cronjob

# Execute daily at 1:00 am
- name: cronjob-schedule
  type: ucf.k8s.app.cronjob.schedule
  parameters:
    schedule: "1 0 * * *"

Restart Pod On Config Changes#

Type

ucf.appspec.restartPodOnConfigChanges

Description:

This component restarts pods when any configmaps associated with the microservice are updated. It only supports Deployment, StatefulSet, and DaemonSet workload types. Refer to Restarting Pods on Config Changes.

Parameters

Field

Type

Description

addAll

boolean

Add dependency on all configmaps found in the microservice

addDefault

boolean

Add dependency on default configmaps added to the microservice viz. - scripts, configs, workload-configs, external-files

configMaps

list of strings

List of names of configmaps to add dependency on

Examples

---
spec:
- name: backend-deployment
  type: ucf.k8s.app.deployment
  parameters:
    apptype: stateless

- name: cm-dependencies
  type: ucf.appspec.restartPodOnConfigChanges
  parameters:
    # Add dependency on all configmaps detected in the microservice
    addAll: true

    # Add dependency on default configmaps for scripts, configs and workload configs
    # addDefault: true

    # Add dependency on individual configmaps using the configmap names
    # configMaps:
    # - http-server-configs-cm

Ingress#

Type

ucf.appspec.ingress

Description:

This component adds an Ingress resource for the microservice.

Parameters

Field

Type

Description

enabled

boolean (Mandatory)

Ingress controller state (enabled/disabled)

className

string

Ingress controller class name

annotations

object (Mandatory)

Annotations to set on the ingress resource as key(string)-value(string) pairs

rules

list (Mandatory)

List of Ingress Rules. Refer to IngressRule

Examples

---
spec:
- name: backend
  type: ucf.k8s.app.deployment
  parameters:
    apptype: stateless

- name: backend-container
  type: ucf.k8s.container
  parameters:
    ...
    ports:
      - containerPort: 5000
        name: http

- name: backend-svc
  type: ucf.k8s.service
  parameters:
    ports:
      - port: 5000
        targetPort: http
        protocol: TCP
        name: http
    type: ClusterIP

# Route HTTP calls with /api prefix to the backend service
- name: ingress
  type: ucf.appspec.ingress
  parameters:
    enabled: true
    annotations:
      nginx.ingress.kubernetes.io/proxy-body-size: "0"
    rules:
    - http:
        paths:
          - path: /api(/|$)(.*)
            pathType: Prefix
            backend:
              service:
                name: backend-backend-svc
                port:
                 number: 5000

Application Workload#

Type

ucf.appspec.app.workload

Description:

This component associates an application workload with a container. Fields added to a workload component will be set on the container that is associated with the workload.

Parameters

Field

Type

Description

wl_units

integer

Workload units. This translates to replica count in Deployments and StatefulSets

wl_resources: Workload resource requirements

.requests

object

Workload minimum resource requirements mentioned as key-value pairs

.limits

object

Workload maximum limits for resources mentioned as key-value pairs

wl_data

string

Workload data. This is a free-form text section that will be mounted as /opt/workload-config/<workload-name> available to containers at run-time

wl_env

list

Workload additional environment variables

.[].name

string

Name of the environment variable

.[].value

string

Value for the environment variable

Examples

---
spec:
- name: backend-deployment
  type: ucf.k8s.app.deployment
  parameters:
    apptype: stateless

- name: backend-workload
  type: ucf.appspec.app.workload
  parameters:
    wl_units: 1
    wl_resources:
      limits:
        nvidia.com/gpu: 1
    wl_data: |
      inputFile: /root/video.mp4
    wl_env:
    - name: WORKLOAD_NAME
      env: backend-workload

- name: backend-container
  type: ucf.k8s.container
  parameters:
    ...
    workload: backend-workload

UCX Configuration#

Type

ucf.k8s.ucx-config

Description:

This component adds configuration for UCX components used in the microservice. UCS Tools will add a container to replace the $egress placeholders with the secondary network interface IP address for UCX interface. Refer to UCX Support in UCS Tools.

Parameters

Field

Type

Description

name

string

Name to create the configmap with

data

string

Configuration data as a string

annotations

object

Annotations for the configmap as key(string)-value(string) pairs

updaterImage

string

Container image to update the config file with update placeholder params

Examples

Refer to UCX Support in UCS Tools

Custom Metadata#

Type

ucf.metadata.custom

Description:

This component adds user-specified custom metadata for the microservice to its UCS MS Specification.

Parameters

No schema is enforced. You can add any metadata as required in YAML format.

Examples

---
spec:
- name: backend-deployment
  type: ucf.k8s.app.deployment
  parameters:
    apptype: stateless

# Data in this component will be added to MS spec under ``metadata`` field.
- name: custom-data
  type: ucf.metadata.custom
  parameters:
    param1: value1
    param2: value2

Pod Scheduling Specification#

Type

ucf.k8s.scheduling

Description:

This component specifies the pod scheduling control parameters.

Parameters

Field

Type

Description

nodeSelector

object

k8s node selector definition (Refer to scheduling).

tolerations

array

k8s toleration list (Refer to scheduling).

affinity

object

k8s affinity definition (Refer to scheduling).

Examples

---
spec:
- name: backend-deployment
  type: ucf.k8s.app.deployment
  parameters:
    apptype: stateless
- name: my-service-scheduling
  type: ucf.k8s.scheduling
  parameters:
    nodeSelector:
      kubernetes.io/os: linux
    tolerations:
      - key: key1
        operator: Exists
        effect: NoSchedule
    affinity:
      nodeAffinity:
        requiredDuringSchedulingIgnoredDuringExecution:
          nodeSelectorTerms:
           - matchExpressions:
             - key: some-key-1
               operator: In
               values: [some-value-1, some-value-2]
           - matchFields:
             - key: status.phase
               operator: In
               values:
                 - Running

Service Account Specification#

Type

ucf.k8s.serviceAccount

Description:

This component specifies a service account for a Pod.

Parameters

Field

Type

Description

name

string

name of the service account

clusterRole

string

the cluster role which the service account binds

create

boolean

option to create the service account

Examples

---
spec:
- name: backend-deployment
  type: ucf.k8s.app.deployment
  parameters:
    apptype: stateless
- name: my-service-sa
  type: ucf.k8s.serviceAccount
  parameters:
    name: my-sa
    clusterRole: edit
    create: true

Pod Monitor Custom Resource Definition#

Type

ucf.crd.podMonitor

Description:

This component creates a pod monitor.

Parameters

Field

Type

Description

portName

string

Name of the container port for the metrics endpoint

path

string

HTTP path where the metrics will be available

Examples

---
spec:
- name: backend-deployment
  type: ucf.k8s.app.deployment
  parameters:
    apptype: stateless
- name: "abcd-container"
  type: ucf.k8s.container
  parameters:
    image:
      repository: ubuntu
      tag: "latest"
    ports:
    - containerPort: 1000 # <PORT>
      name: http
    - containerPort: 10002 # <PORT>
      name: ms-metrics
- name: ms-metrics
  type: ucf.crd.podMonitor
  parameters:
    portName: ms-metrics
    path: /metrics