Package io.quarkus.kubernetes.deployment
Class KubernetesConfig
java.lang.Object
io.quarkus.kubernetes.deployment.KubernetesConfig
- All Implemented Interfaces:
EnvVarHolder,PlatformConfiguration
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) booleanWhether to add the build timestamp to the Kubernetes annotations This is a very useful way to have manifests of successive builds of the same application differ - thus ensuring that Kubernetes will apply the updated resources(package private) booleanIf true, the 'app.kubernetes.io/name' label will be part of the selectors of Service and Deployment(package private) booleanIf true, the 'app.kubernetes.io/version' label will be part of the selectors of Service and DeploymentCustom annotations to add to all resourcesIf set, the config map will be mounted to the application container and its contents will be used for application configuration.If set, the secret will mounted to the application container and its contents will be used for application configuration.The arguments(package private) Map<String,AwsElasticBlockStoreVolumeConfig> AWS Elastic BlockStore volumes(package private) Map<String,AzureDiskVolumeConfig> Azure disk volumes(package private) Map<String,AzureFileVolumeConfig> Azure file volumesThe commands(package private) Map<String,ConfigMapVolumeConfig> ConfigMap volumesIf set, it will change the name of the container according to the configuration(package private) CronJobConfigCronJob configuration.(package private) booleanIf set to true, Quarkus will attempt to deploy the application to the target Kubernetes cluster(package private) Optional<KubernetesConfig.DeploymentResourceKind>The kind of the deployment resource to use.The target deployment platform.(package private) DeployStrategyIf deploy is enabled, it will follow this strategy to update the resources to the target Kubernetes cluster.EmptyDir volumes(package private) EnvVarsConfigEnvironment variables to add to all containers.Deprecated.(package private) booleanDeprecated, for removal: This API element is subject to removal in a future version.(package private) booleanEnable generation of image pull secret, when the container image username and password are provided.(package private) Map<String,GitRepoVolumeConfig> Git Repository volumes(package private) Map<String,HostAliasConfig> The host aliases(package private) booleanSwitch used to control whether non-idempotent fields are included in generated kubernetes resources to improve git-ops compatibility(package private) io.dekorate.kubernetes.annotation.ImagePullPolicyImage pull policyThe image pull secret(package private) IngressConfigIngress configuration(package private) Map<String,ContainerConfig> Init containers(package private) InitTaskConfigDefault Init tasks configuration.(package private) Map<String,InitTaskConfig> Init tasks configuration.(package private) JobConfigJob configuration.Custom labels to add to all resources(package private) ProbeConfigThe liveness probe(package private) Map<String,MountConfig> Volume mountsThe name of the application.The namespace the generated resources should belong to.(package private) OptionalIntThe nodePort to set when serviceType is set to node-port.Optionally set directory generated kubernetes resources will be written to.The name of the group this component belongs too(package private) Map<String,PortConfig> The application ports(package private) PrometheusConfigPrometheus configuration(package private) Map<String,PvcVolumeConfig> Persistent Volume Claim volumes(package private) RbacConfigRBAC configuration(package private) ProbeConfigThe readiness probe(package private) DebugConfigDebug configuration to be set in pods.(package private) IntegerThe number of desired pods(package private) ResourcesConfigResources requirements(package private) RollingUpdateConfigSpecifies rolling update configuration.(package private) Map<String,SecretVolumeConfig> Secret volumes(package private) SecurityContextConfigIf set, it will copy the security context configuration provided into the generated pod settings.The service account(package private) io.dekorate.kubernetes.annotation.ServiceTypeThe type of service that will be generated for the application(package private) Map<String,ContainerConfig> Sidecar containers(package private) ProbeConfigThe startup probe(package private) io.dekorate.kubernetes.config.DeploymentStrategySpecifies the deployment strategy.The version of the application.Working directory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDeploymentResourceKind(io.quarkus.deployment.Capabilities capabilities) getEnv()Retrieves the definition of environment variables to add to the application's container.Deprecated.io.dekorate.kubernetes.annotation.ImagePullPolicygetName()getPorts()io.dekorate.kubernetes.annotation.ServiceTypeSpecifies which the name of the platform this EnvVarHolder targets.booleanbooleanbooleanbooleanbooleanbooleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.quarkus.kubernetes.deployment.EnvVarHolder
convertToBuildItemsMethods inherited from interface io.quarkus.kubernetes.deployment.PlatformConfiguration
getConfigName
-
Field Details
-
partOf
The name of the group this component belongs too -
name
The name of the application. This value will be used for naming Kubernetes resources like: - Deployment - Service and so on ... -
version
The version of the application. -
deploymentKind
The kind of the deployment resource to use. Supported values are 'StatefulSet', 'Job', 'CronJob' and 'Deployment' defaulting to the latter. -
namespace
The namespace the generated resources should belong to. If not value is set, then the 'namespace' field will not be added to the 'metadata' section of the generated manifests. This in turn means that when the manifests are applied to a cluster, the namespace will be resolved from the current Kubernetes context (see https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context for more details). -
labels
Custom labels to add to all resources -
annotations
Custom annotations to add to all resources -
addBuildTimestamp
@ConfigItem(defaultValue="true") boolean addBuildTimestampWhether to add the build timestamp to the Kubernetes annotations This is a very useful way to have manifests of successive builds of the same application differ - thus ensuring that Kubernetes will apply the updated resources -
workingDir
Working directory -
command
The commands -
arguments
The arguments -
serviceAccount
The service account -
ports
The application ports -
replicas
The number of desired pods -
strategy
@ConfigItem(defaultValue="None") io.dekorate.kubernetes.config.DeploymentStrategy strategySpecifies the deployment strategy. -
rollingUpdate
Specifies rolling update configuration. The configuration is applied when DeploymentStrategy == RollingUpdate, or when explicit configuration has been provided. In the later case RollingUpdate is assumed. -
serviceType
@ConfigItem(defaultValue="ClusterIP") io.dekorate.kubernetes.annotation.ServiceType serviceTypeThe type of service that will be generated for the application -
nodePort
The nodePort to set when serviceType is set to node-port. -
imagePullPolicy
@ConfigItem(defaultValue="Always") io.dekorate.kubernetes.annotation.ImagePullPolicy imagePullPolicyImage pull policy -
imagePullSecrets
The image pull secret -
generateImagePullSecret
@ConfigItem(defaultValue="false") boolean generateImagePullSecretEnable generation of image pull secret, when the container image username and password are provided. -
livenessProbe
The liveness probe -
readinessProbe
The readiness probe -
startupProbe
The startup probe -
prometheus
Prometheus configuration -
mounts
Volume mounts -
secretVolumes
Secret volumes -
configMapVolumes
ConfigMap volumes -
emptyDirVolumes
EmptyDir volumes -
gitRepoVolumes
Git Repository volumes -
pvcVolumes
Persistent Volume Claim volumes -
awsElasticBlockStoreVolumes
AWS Elastic BlockStore volumes -
azureFileVolumes
Azure file volumes -
azureDiskVolumes
Azure disk volumes -
initContainers
Init containers -
sidecars
Sidecar containers -
deploymentTarget
The target deployment platform. Defaults to kubernetes. Can be kubernetes, openshift, knative, minikube etc., or any combination of the above as comma separated list. -
hostAliases
The host aliases -
resources
Resources requirements -
rbac
RbacConfig rbacRBAC configuration -
ingress
IngressConfig ingressIngress configuration -
job
JobConfig jobJob configuration. It's only used if and only ifquarkus.kubernetes.deployment-kindis `Job`. -
cronJob
CronJobConfig cronJobCronJob configuration. It's only used if and only ifquarkus.kubernetes.deployment-kindis `CronJob`. -
addVersionToLabelSelectors
@ConfigItem(defaultValue="true") boolean addVersionToLabelSelectorsIf true, the 'app.kubernetes.io/version' label will be part of the selectors of Service and Deployment -
addNameToLabelSelectors
@ConfigItem(defaultValue="true") boolean addNameToLabelSelectorsIf true, the 'app.kubernetes.io/name' label will be part of the selectors of Service and Deployment -
deploy
@ConfigItem(defaultValue="false") boolean deployIf set to true, Quarkus will attempt to deploy the application to the target Kubernetes cluster -
deployStrategy
If deploy is enabled, it will follow this strategy to update the resources to the target Kubernetes cluster. -
appSecret
If set, the secret will mounted to the application container and its contents will be used for application configuration. -
appConfigMap
If set, the config map will be mounted to the application container and its contents will be used for application configuration. -
securityContext
If set, it will copy the security context configuration provided into the generated pod settings. -
containerName
If set, it will change the name of the container according to the configuration -
remoteDebug
DebugConfig remoteDebugDebug configuration to be set in pods. -
externalizeInit
Deprecated, for removal: This API element is subject to removal in a future version.Flag to enable init task externalization. When enabled (default), all initialization tasks created by extensions, will be externalized as Jobs. In addition, the deployment will wait for these jobs. -
initTasks
Init tasks configuration. The init tasks are automatically generated by extensions like Flyway to perform the database migration before staring up the application. This property is only taken into account if `quarkus.kubernetes.externalize-init` is true. -
initTaskDefaults
Default Init tasks configuration. The init tasks are automatically generated by extensions like Flyway to perform the database migration before staring up the application. -
idempotent
@ConfigItem(defaultValue="false") boolean idempotentSwitch used to control whether non-idempotent fields are included in generated kubernetes resources to improve git-ops compatibility -
outputDirectory
Optionally set directory generated kubernetes resources will be written to. Default is `target/kubernetes`. -
envVars
Deprecated.Useenvinstead using the new syntax as follows:quarkus.kubernetes.env-vars.foo.field=fieldNamebecomesquarkus.kubernetes.env.fields.foo=fieldNamequarkus.kubernetes.env-vars.foo.value=valuebecomesquarkus.kubernetes.env.vars.foo=barquarkus.kubernetes.env-vars.bar.configmap=configNamebecomesquarkus.kubernetes.env.configmaps=configNamequarkus.kubernetes.env-vars.baz.secret=secretNamebecomesquarkus.kubernetes.env.secrets=secretName
Environment variables to add to all containers using the old syntax. -
env
Environment variables to add to all containers.
-
-
Constructor Details
-
KubernetesConfig
public KubernetesConfig()
-
-
Method Details
-
getPartOf
- Specified by:
getPartOfin interfacePlatformConfiguration
-
getName
- Specified by:
getNamein interfacePlatformConfiguration
-
getVersion
- Specified by:
getVersionin interfacePlatformConfiguration
-
getNamespace
- Specified by:
getNamespacein interfacePlatformConfiguration
-
getLabels
- Specified by:
getLabelsin interfacePlatformConfiguration
-
getAnnotations
- Specified by:
getAnnotationsin interfacePlatformConfiguration
-
isAddBuildTimestamp
public boolean isAddBuildTimestamp()- Specified by:
isAddBuildTimestampin interfacePlatformConfiguration
-
isAddNameToLabelSelectors
public boolean isAddNameToLabelSelectors()- Specified by:
isAddNameToLabelSelectorsin interfacePlatformConfiguration
-
isAddVersionToLabelSelectors
public boolean isAddVersionToLabelSelectors()- Specified by:
isAddVersionToLabelSelectorsin interfacePlatformConfiguration
-
getTargetPlatformName
Description copied from interface:EnvVarHolderSpecifies which the name of the platform this EnvVarHolder targets. This name, when needed, is used by dekorate to generate the descriptor associated with the targeted deployment platform.- Specified by:
getTargetPlatformNamein interfaceEnvVarHolder- Returns:
- the name of the targeted platform e.g.
Constants.KUBERNETES
-
getEnvVars
Deprecated.- Specified by:
getEnvVarsin interfaceEnvVarHolder
-
getEnv
Description copied from interface:EnvVarHolderRetrieves the definition of environment variables to add to the application's container.- Specified by:
getEnvin interfaceEnvVarHolder- Returns:
- the associated
EnvVarsConfigholding the definition of which environment variables to add
-
getWorkingDir
- Specified by:
getWorkingDirin interfacePlatformConfiguration
-
getCommand
- Specified by:
getCommandin interfacePlatformConfiguration
-
getArguments
- Specified by:
getArgumentsin interfacePlatformConfiguration
-
getServiceAccount
- Specified by:
getServiceAccountin interfacePlatformConfiguration
-
getContainerName
- Specified by:
getContainerNamein interfacePlatformConfiguration
-
getPorts
- Specified by:
getPortsin interfacePlatformConfiguration
-
getReplicas
-
getServiceType
public io.dekorate.kubernetes.annotation.ServiceType getServiceType()- Specified by:
getServiceTypein interfacePlatformConfiguration
-
getNodePort
-
getImagePullPolicy
public io.dekorate.kubernetes.annotation.ImagePullPolicy getImagePullPolicy()- Specified by:
getImagePullPolicyin interfacePlatformConfiguration
-
getImagePullSecrets
- Specified by:
getImagePullSecretsin interfacePlatformConfiguration
-
isGenerateImagePullSecret
public boolean isGenerateImagePullSecret()- Specified by:
isGenerateImagePullSecretin interfacePlatformConfiguration
-
getLivenessProbe
- Specified by:
getLivenessProbein interfacePlatformConfiguration
-
getReadinessProbe
- Specified by:
getReadinessProbein interfacePlatformConfiguration
-
getStartupProbe
- Specified by:
getStartupProbein interfacePlatformConfiguration
-
getPrometheusConfig
- Specified by:
getPrometheusConfigin interfacePlatformConfiguration
-
getMounts
- Specified by:
getMountsin interfacePlatformConfiguration
-
getSecretVolumes
- Specified by:
getSecretVolumesin interfacePlatformConfiguration
-
getConfigMapVolumes
- Specified by:
getConfigMapVolumesin interfacePlatformConfiguration
-
getEmptyDirVolumes
- Specified by:
getEmptyDirVolumesin interfacePlatformConfiguration
-
getGitRepoVolumes
- Specified by:
getGitRepoVolumesin interfacePlatformConfiguration
-
getPvcVolumes
- Specified by:
getPvcVolumesin interfacePlatformConfiguration
-
getAwsElasticBlockStoreVolumes
- Specified by:
getAwsElasticBlockStoreVolumesin interfacePlatformConfiguration
-
getAzureFileVolumes
- Specified by:
getAzureFileVolumesin interfacePlatformConfiguration
-
getAzureDiskVolumes
- Specified by:
getAzureDiskVolumesin interfacePlatformConfiguration
-
getInitContainers
- Specified by:
getInitContainersin interfacePlatformConfiguration
-
getSidecars
- Specified by:
getSidecarsin interfacePlatformConfiguration
-
getHostAliases
- Specified by:
getHostAliasesin interfacePlatformConfiguration
-
getResources
- Specified by:
getResourcesin interfacePlatformConfiguration
-
getAppSecret
- Specified by:
getAppSecretin interfacePlatformConfiguration
-
getAppConfigMap
- Specified by:
getAppConfigMapin interfacePlatformConfiguration
-
getSecurityContext
- Specified by:
getSecurityContextin interfacePlatformConfiguration
-
isIdempotent
public boolean isIdempotent()- Specified by:
isIdempotentin interfacePlatformConfiguration
-
getDeployStrategy
-
getRbacConfig
- Specified by:
getRbacConfigin interfacePlatformConfiguration
-
getDeploymentResourceKind
public KubernetesConfig.DeploymentResourceKind getDeploymentResourceKind(io.quarkus.deployment.Capabilities capabilities) -
isExternalizeInit
public boolean isExternalizeInit() -
getInitTasks
-
getInitTaskDefaults
-
envinstead using the new syntax as follows:quarkus.kubernetes.env-vars.foo.field=fieldNamebecomesquarkus.kubernetes.env.fields.foo=fieldNamequarkus.kubernetes.env-vars.foo.value=valuebecomesquarkus.kubernetes.env.vars.foo=barquarkus.kubernetes.env-vars.bar.configmap=configNamebecomesquarkus.kubernetes.env.configmaps=configNamequarkus.kubernetes.env-vars.baz.secret=secretNamebecomesquarkus.kubernetes.env.secrets=secretName