ballerinax/kubernetes module
Module Detail
Records
Record | Description |
---|---|
BuildExtension | Extend building of the docker image. |
ConfigMap | Kubernetes Config Map volume mount. |
ConfigMapKeyRef | Value from config map key. |
ConfigMapKeyValue | Value for config map key. |
ConfigMapMount | Secret volume mount configurations for kubernetes. |
DeploymentConfiguration | Kubernetes deployment configuration. |
FieldRef | Value from field. |
FieldValue | Value for a field. |
FileConfig | External file type for docker. |
IngressConfiguration | Kubernetes ingress configuration. |
JobConfig | Kubernetes job configuration. |
Metadata | Metadata for artifacts |
OpenShiftBuildConfigConfiguration | Build Config configuration for OpenShift. |
PersistentVolumeClaimConfig | Kubernetes Persistent Volume Claim. |
PersistentVolumeClaims | Persistent Volume Claims configurations for kubernetes. |
PodAutoscalerConfig | Kubernetes Horizontal Pod Autoscaler configuration |
ProbeConfiguration | Probing configuration. |
ResourceFieldRef | Value from resource field. |
ResourceFieldValue | Value for resource field. |
ResourceQuotaConfig | Kubernetes Resource Quota |
ResourceQuotas | Resource Quota configuration for kubernetes. |
Secret | Kubernetes secret volume mount. |
SecretKeyRef | Value from secret key. |
SecretKeyValue | Value for a secret key. |
SecretMount | Secret volume mount configurations for kubernetes. |
ServiceConfiguration | Kubernetes service configuration. |
Type Definitions
Type | Values | Description |
---|---|---|
ImagePullPolicy | Never | IfNotPresent | Always | Image pull policy type field for kubernetes deployment and jobs. |
ResourceQuotaScope | Terminating | NotTerminating | NotBestEffort | BestEffort | Scopes for kubernetes resource quotas |
RestartPolicy | OnFailure | Never | Always | Restart policy type field for kubernetes jobs. |
ServiceType | NodePort | LoadBalancer | ClusterIP | Service type field for kubernetes services. |
SessionAffinity | None | ClientIP | Session affinity field for kubernetes services. |
Annotations
Name | Attaches To | Data Type | Description |
---|---|---|---|
ConfigMap | service, function | ConfigMapMount | @kubernetes:ConfigMap annotation to configure config maps. |
Deployment | service, function, listener | DeploymentConfiguration | @kubernetes:Deployment annotation to configure deplyoment yaml. |
HPA | service, function | PodAutoscalerConfig | @kubernetes:HPA annotation to configure horizontal pod autoscaler yaml. |
Ingress | service, listener | IngressConfiguration | @kubernetes:Ingress annotation to configure ingress yaml. |
Job | function | JobConfig | @kubernetes:Job annotation to configure kubernetes jobs. |
PersistentVolumeClaim | service, function | PersistentVolumeClaims | @kubernetes:PersistentVolumeClaim annotation to configure Persistent Volume Claims. |
ResourceQuota | service, function | ResourceQuotas | @kubernetes:ResourcesQuotas annotation to configure Resource Quotas. |
Secret | service, function | SecretMount | @kubernetes:Secret annotation to configure secrets. |
Service | service, listener | ServiceConfiguration | @kubernetes:Service annotation to configure service yaml. |
public type BuildExtension
Extend building of the docker image.
Field Name | Data Type | Default Value | Description |
---|---|---|---|
openshift | kubernetes:OpenShiftBuildConfigConfiguration | Openshift build config. |
public type ConfigMap
Kubernetes Config Map volume mount.
Field Name | Data Type | Default Value | Description |
---|---|---|---|
mountPath | string | Mount path |
|
readOnly | boolean | true | Is mount read only |
data | string[] | Paths to data files |
public type ConfigMapKeyRef
Value from config map key.
Field Name | Data Type | Default Value | Description |
---|---|---|---|
configMapKeyRef | kubernetes:ConfigMapKeyValue | Reference for config map key. |
public type ConfigMapKeyValue
Value for config map key.
Field Name | Data Type | Default Value | Description |
---|---|---|---|
name | string | name of the config. |
|
key | string | key of the config. |
public type ConfigMapMount
Secret volume mount configurations for kubernetes.
Field Name | Data Type | Default Value | Description |
---|---|---|---|
conf | string | path to ballerina configuration file |
|
configMaps | kubernetes:ConfigMap[] | Array of ConfigMap |
public type DeploymentConfiguration
Kubernetes deployment configuration.
Field Name | Data Type | Default Value | Description |
---|---|---|---|
namespace | string | Kubernetes namespace to be used on all artifacts |
|
podAnnotations | map<string> | Map of annotations for pods |
|
replicas | int | Number of replicas |
|
livenessProbe | boolean|kubernetes:ProbeConfiguration | false | Enable/Disable liveness probe and configure it. |
readinessProbe | boolean|kubernetes:ProbeConfiguration | false | Enable/Disable readiness probe and configure it. |
imagePullPolicy | IfNotPresent|Always|Never | IMAGE_PULL_POLICY_IF_NOT_PRESENT | Kubernetes image pull policy |
image | string | Docker image with tag |
|
env | map<string|kubernetes:FieldRef|kubernetes:SecretKeyRef|kubernetes:ResourceFieldRef|kubernetes:ConfigMapKeyRef> | 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) |
|
registry | string | Docker registry url |
|
username | string | Username for docker registry |
|
password | string | Password for docker registry |
|
buildExtension | kubernetes:BuildExtension|string | Docker image build extensions |
|
baseImage | string | Base image for docker image building |
|
push | boolean | Push to remote registry |
|
dockerCertPath | string | Docker certificate path |
|
copyFiles | kubernetes:FileConfig[] | Array of External files for docker image |
|
singleYAML | boolean | true | Generate a single yaml file with all kubernetes artifacts (services,deployment,ingress,) |
dependsOn | string[] | Services this deployment depends on |
|
imagePullSecrets | string[] | Image pull secrets |
public type FieldRef
Value from field.
Field Name | Data Type | Default Value | Description |
---|---|---|---|
fieldRef | kubernetes:FieldValue | Reference for a field. |
public type FieldValue
Value for a field.
Field Name | Data Type | Default Value | Description |
---|---|---|---|
fieldPath | string | Path of the field |
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 |
---|---|---|---|
listenerName | string | Name of the listener ingress attached |
|
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
Kubernetes job configuration.
Field Name | Data Type | Default Value | Description |
---|---|---|---|
namespace | string | Kubernetes namespace to be used on all artifacts |
|
restartPolicy | OnFailure|Always|Never | RESTART_POLICY_NEVER | Restart policy |
backoffLimit | string | Backoff limit |
|
activeDeadlineSeconds | string | Active deadline seconds |
|
schedule | string | Schedule for cron jobs |
|
env | map<string|kubernetes:FieldRef|kubernetes:SecretKeyRef|kubernetes:ResourceFieldRef|kubernetes:ConfigMapKeyRef> | Environment varialbes for container |
|
imagePullPolicy | IfNotPresent|Always|Never | IMAGE_PULL_POLICY_IF_NOT_PRESENT | Policy for pulling an image |
image | string | Docker image with tag |
|
buildImage | boolean | true | 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 | false | Push to remote registry |
dockerCertPath | string | Docker cert path |
|
copyFiles | kubernetes:FileConfig[] | Array of External files for docker image |
|
imagePullSecrets | string[] | Image pull secrets |
|
singleYAML | boolean | true | Generate a single yaml file with all kubernetes artifacts (services,deployment,ingress,) |
public type Metadata
Metadata for artifacts
Field Name | Data Type | Default Value | Description |
---|---|---|---|
name | string | Name of the resource |
|
labels | map<string> | Map of labels for the resource |
|
annotations | map<string> | Map of annotations for resource |
public type OpenShiftBuildConfigConfiguration
Build Config configuration for OpenShift.
Field Name | Data Type | Default Value | Description |
---|---|---|---|
forcePullDockerImage | boolean | false | Set force pull images when building docker image. |
buildDockerWithNoCache | boolean | false | Build docker image with no cache enabled. |
public type PersistentVolumeClaimConfig
Kubernetes Persistent Volume Claim.
Field Name | Data Type | Default Value | Description |
---|---|---|---|
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[] | Array of PersistentVolumeClaimConfig |
public type PodAutoscalerConfig
Kubernetes Horizontal Pod Autoscaler configuration
Field Name | Data Type | Default Value | Description |
---|---|---|---|
minReplicas | int | Minimum number of replicas |
|
maxReplicas | int | Maximum number of replicas |
|
cpuPercentage | int | CPU percentage to start scaling |
public type ProbeConfiguration
Probing configuration.
Field Name | Data Type | Default Value | Description |
---|---|---|---|
port | int | Port to check for tcp connection. |
|
initialDelaySeconds | int | Initial delay for pobing in seconds. |
|
periodSeconds | int | Interval between probes in seconds. |
public type ResourceFieldRef
Value from resource field.
Field Name | Data Type | Default Value | Description |
---|---|---|---|
resourceFieldRef | kubernetes:ResourceFieldValue | Reference for resource field. |
public type ResourceFieldValue
Value for resource field.
Field Name | Data Type | Default Value | Description |
---|---|---|---|
containerName | string | Name of the container. |
|
resource | string | Resource field |
public type ResourceQuotaConfig
Kubernetes Resource Quota
Field Name | Data Type | Default Value | Description |
---|---|---|---|
hard | map<string> | Quotas for the resources |
|
scopes | Terminating|NotTerminating|BestEffort|NotBestEffort?[] | [] | Scopes of the quota |
public type ResourceQuotas
Resource Quota configuration for kubernetes.
Field Name | Data Type | Default Value | Description |
---|---|---|---|
resourceQuotas | kubernetes:ResourceQuotaConfig[] | Array of ResourceQuotaConfig |
public type Secret
Kubernetes secret volume mount.
Field Name | Data Type | Default Value | Description |
---|---|---|---|
mountPath | string | Mount path |
|
readOnly | boolean | true | Is mount read only |
data | string[] | Paths to data files as an array |
public type SecretKeyRef
Value from secret key.
Field Name | Data Type | Default Value | Description |
---|---|---|---|
secretKeyRef | kubernetes:SecretKeyValue | Reference for secret key. |
public type SecretKeyValue
Value for a secret key.
Field Name | Data Type | Default Value | Description |
---|---|---|---|
name | string | Name of the secret. |
|
key | string | Key of the secret. |
public type SecretMount
Secret volume mount configurations for kubernetes.
Field Name | Data Type | Default Value | Description |
---|---|---|---|
secrets | kubernetes:Secret[] | Array of Secret |
public type ServiceConfiguration
Kubernetes service configuration.
Field Name | Data Type | Default Value | Description |
---|---|---|---|
port | int | Service port |
|
targetPort | int | Port of the pods |
|
sessionAffinity | None|ClientIP | SESSION_AFFINITY_NONE | Session affinity for pods |
serviceType | NodePort|ClusterIP|LoadBalancer | SERVICE_TYPE_CLUSTER_IP | Service type of the service |