ballerina/kubernetes package

Annotations

Name Attachement Points Data Type Description
ConfigMap service ConfigMapMount

@kubernetes:ConfigMap annotation to configure config maps

Deployment endpoint, service DeploymentConfiguration

@kubernetes:Deployment annotation to configure deplyoment yaml

HPA service PodAutoscalerConfig

@kubernetes:HPA annotation to configure horizontal pod autoscaler yaml

Ingress endpoint, service IngressConfiguration

@kubernetes:Ingress annotation to configure ingress yaml

Job function JobConfig

@kubernetes:Job annotation to configure kubernetes jobs

PersistentVolumeClaim service PersistentVolumeClaims

@kubernetes:PersistentVolumeClaim annotation to configure Persistent Volume Claims

Secret service SecretMount

@kubernetes:Secret annotation to configure secrets

Service service, endpoint ServiceConfiguration

@kubernetes:Service annotation to configure service yaml

Records Summary

Record Description
ConfigMap

Kubernetes Config Map volume mount

ConfigMapMount

Secret volume mount configurations for kubernetes

DeploymentConfiguration

Kubernetes deployment configuration

FileConfig

External file type for docker

IngressConfiguration

Kubernetes ingress configuration

JobConfig

value:"Kubernetes job configuration

PersistentVolumeClaimConfig

Kubernetes Persistent Volume Claim

PersistentVolumeClaims

Persistent Volume Claims configurations for kubernetes

PodAutoscalerConfig

Kubernetes Horizontal Pod Autoscaler configuration

Secret

Kubernetes secret volume mount

SecretMount

Secret volume mount configurations for kubernetes

ServiceConfiguration

Kubernetes service configuration

public type ConfigMap

Kubernetes Config Map volume mount

Field Name Data Type Default Value Description
name string
  • Name of the volume mount
mountPath string
  • Mount path
readOnly boolean
  • Is mount read only
data string[]
  • Paths to data files

public type ConfigMapMount

Secret volume mount configurations for kubernetes

Field Name Data Type Default Value Description
ballerinaConf string
  • path to ballerina configuration file
configMaps kubernetes:ConfigMap[]

public type DeploymentConfiguration

Kubernetes deployment configuration

Field Name Data Type Default Value Description
name string
  • Name of the deployment
labels map
  • Map of labels for deployment
replicas int
  • Number of replicas
enableLiveness string
  • Enable/Disable liveness probe
livenessPort int
  • Port to check the liveness
initialDelaySeconds int
  • Initial delay in seconds before performing the first probe
periodSeconds int
  • Liveness probe interval
imagePullPolicy string
  • Kubernetes image pull policy
image string
  • Docker image with tag
env map
  • Environment varialbe map for containers
buildImage boolean
  • Docker image to be build or not
dockerHost string
  • Docker host IP and docker PORT. (e.g minikube IP and docker PORT)
username string
  • Username for docker registry
password string
  • Password for docker registry
baseImage string
  • Base image for docker image building
push boolean
  • Push to remote registry
dockerCertPath string
  • Docker certificate path
copyFiles kubernetes:FileConfig[]

public type FileConfig

External file type for docker

Field Name Data Type Default Value Description
source string
  • source path of the file (in your machine)
target string
  • target path (inside container)

public type IngressConfiguration

Kubernetes ingress configuration

Field Name Data Type Default Value Description
name string
  • Name of the ingress
endpointName string
  • Name of the endpoint ingress attached
labels map
  • Label map for ingress
annotations map
  • Map of additional annotations
hostname string
  • Host name of the ingress
path string
  • Resource path
targetPath string
  • Target path for url rewrite
ingressClass string
  • Ingress class
enableTLS boolean
  • Enable/Disable ingress TLS

public type JobConfig

value:"Kubernetes job configuration

Field Name Data Type Default Value Description
name string
  • Name of the job
labels map
  • Labels for job
restartPolicy string
  • Restart policy
backoffLimit string
  • Backoff limit
activeDeadlineSeconds string
  • Active deadline seconds
schedule string
  • Schedule for cron jobs
env map
  • Environment varialbes for container
imagePullPolicy string
image string
  • Docker image with tag
buildImage boolean
  • Docker image to be build or not
dockerHost string
  • Docker host IP and docker PORT. (e.g minikube IP and docker PORT)
username string
  • Username for docker registry
password string
  • Password for docker registry
baseImage string
  • Base image for docker image building
push boolean
  • Push to remote registry
dockerCertPath string
  • Docker cert path

public type PersistentVolumeClaimConfig

Kubernetes Persistent Volume Claim

Field Name Data Type Default Value Description
name string
  • Name of the volume claim
mountPath string
  • Mount Path
accessMode string
  • Access mode
volumeClaimSize string
  • Size of the volume claim
readOnly boolean
  • Is mount read only

public type PersistentVolumeClaims

Persistent Volume Claims configurations for kubernetes

Field Name Data Type Default Value Description
volumeClaims kubernetes:PersistentVolumeClaimConfig[]

public type PodAutoscalerConfig

Kubernetes Horizontal Pod Autoscaler configuration

Field Name Data Type Default Value Description
name string
  • Name of the Autoscaler
labels map
  • Labels for Autoscaler
minReplicas int
  • Minimum number of replicas
maxReplicas int
  • Maximum number of replicas
cpuPercentage int
  • CPU percentage to start scaling

public type Secret

Kubernetes secret volume mount

Field Name Data Type Default Value Description
name string
  • Name of the volume mount
mountPath string
  • Mount path
readOnly boolean
  • Is mount read only
data string[]
  • Paths to data files as an array

public type SecretMount

Secret volume mount configurations for kubernetes

Field Name Data Type Default Value Description
secrets kubernetes:Secret[]

public type ServiceConfiguration

Kubernetes service configuration

Field Name Data Type Default Value Description
name string
  • Name of the service
labels map
  • Map of labels for deployment
serviceType string
  • Service type of the service