This documentation is for WSO2 Microgateway 3.0.1. View documentation for the latest release.

All docs This doc
||
Skip to end of metadata
Go to start of metadata

You need to create a deployment-config.toml file and use it as the input to the WSO2 API Microgateway Toolkit in order to create a Docker image to be mounted on Kubernetes by including the runtime executable artifacts, so that you do not have to mount the artifacts from outside. When using this approach, it will generate the Docker images from the WSO2 API Microgateway base image by including all the API runtime artifacts as well.

Sample file

[kubernetes]
  [kubernetes.kubernetesDeployment]
    enable = true
    #name = ''
    #labels = ''
    #replicas = ''
    #enableLiveness = ''
    #initialDelaySeconds = ''
    #periodSeconds = ''
    #livenessPort = ''
    #imagePullPolicy = ''
    #image = ''
    #env = ''
    #buildImage = ''
    #copyFiles = ''
    #dockerHost = ''
    #dockerCertPath = ''
    #push = ''
    #username = ''
    #password = ''
    #baseImage = ''
    #singleYAML = ''
  [kubernetes.kubernetesService]
    enable = true
    #name = ''
    #labels = ''
    serviceType = 'NodePort'
    #port = ''
  [kubernetes.kubernetesConfigMap]
    enable = true
    ballerinaConf = '<MICROGW_TOOLKIT_HOME>/resources/conf/micro-gw.conf'
    #[[kubernetes.kubernetesConfigMap.configMaps]]
    #    name = ''
    #    mountPath = ''
    #    readOnly = false
    #    data = ['']

Descriptions for the configurations

kubernetes.kubernetesDeployment

ParameterDescriptionDefault value

name

Name of the deployment.<outputfilename>-deployment

namespace

Namespace of the deployment.null

labels

The labels related to the particular deployment."app: <outputfilename>"

replicas

The number of replicas.1

dependsOn

The endpoints that the deployment depends on.null

enableLiveness

Enable or disable the liveness probe.false

initialDelaySeconds

The initial delay in seconds before performing the first probe.10s

periodSeconds

The time interval between liveness probes in seconds.5s

livenessPort

The port checked by the liveness probe.<ServicePort>

imagePullPolicy

Docker image pull policy.IfNotPresent

image

Docker image with tag.<output file name>:latest

env

List of environment variables.null

buildImage

Enable or disable building the Docker image.true
copyFilesCopy external files for the Docker image.null
dockerHostDocker host IP and docker PORT.
Example:
tcp://192.168.99.100:2376
null
dockerCertPathDocker cert path.null
pushEnable or disable pushing the Docker image to the registry.
This can only be enabled if buildImage parameter is set to true.
false
usernameUsername for the Docker registry.null
passwordPassword for the Docker registry.null
baseImageBase image to create the Docker image.ballerina/ballerina:latest
imagePullSecretsImage pull secrets value.null
singleYAMLEnable or disable generating a single YAML file for all k8s resources.false


kubernetes.kubernetesService

ParameterDescriptionDefault value
nameName of the service.<service name>-service
labelsThe labels for the service."app: <outputfilename>"
serviceTypeThe type of service.ClusterIP
portThe port used by the service.Port number


kubernetes.kubernetesIngress

Parameter

Description

Default value

name

Name of the Ingress.

<service name>-ingress

labels

The labels for the service.

"app: <outputfilename>"

hostname

Host name of the Ingress.

<service name>.com

annotations

Map of additional annotations.

null

path

Resource path.

/

targetPath

This URL will be used to rewrite the target URI, which defines where the traffic should be redirected.


null

ingressClass

Ingress class.

nginx

enableTLS

Enable or disable Ingress transport level security (TLS).

false


kubernetes.kubernetesHPA

Parameter

Description

Default value

nameName of the Horizontal Pod Autoscaler<service name>-hpa
labelsThe labels for the service."app: <outputfilename>"
minReplicasThe minimum number of replicas in the deployment.No of replicas in deployment
maxReplicasThe maximum number of replicas in the deployment.minReplicas+1
cpuPrecentageCPU percentage to start scaling.50


kubernetes.kubernetesSecret

Parameter

Description

Default value

nameName of the secret mount.<service_name>-secret
mountPathPath to the mount on the container.null
readOnlyDenotes whether the mount is read-only or not.true
dataPaths to the data files.null


kubernetes.kubernetesConfigMap

Parameter

Description

Default value

nameName of the config map mount<service_name>-config-map
mountPathPath to the mount on the containernull
readOnlyDenotes whether the mount is read-only or not.true
ballerinaConfLocation of the Ballerina conf file.null
dataPaths to the data files.null


kubernetes.kubernetesPersistentVolumeClaim

Parameter

Description

Default value

nameName of the secret mount.null
annotationsThe metadata annotations in the map.null
mountPathPath to mount on the container.null
readOnlyDenotes whether the mount is read-only or not.false
accessModeAccess mode.ReadWriteOnce
volumeClaimSizeSize of the volume claim.null


kubernetes.kubernetesJob

ParameterDescriptionDefault value
nameName of the job.<output file name>-job
namespaceNamespace for the job.default
labelsThe labels for the job."app: <outputfilename>"
restartPolicyRestart policy for the job.Never
backoffLimitBackoff limit for the job.3
activeDeadlineSecondsActive deadline given in seconds.20
scheduleSchedule for cron jobs.none
imagePullPolicyDocker image pull policy.IfNotPresent
imageDocker image with tag.<output file name>:latest
envList of environment variables.null
buildImageEnable or disable building the Docker image.true
dockerHostDocker host IP and Docker port.
Example tcp://192.168.99.100:2376
null
dockerCertPathDocker cert path.null
pushEnable or disable pushing the Docker image to the registry.
This can only be enabled if the buildImage parameter is set to true.
false
usernameUsername for the Docker registry.null
passwordPassword for the Docker registry.null
baseImageBase image to create the Docker image.ballerina/ballerina:latest
  • No labels