Package io.quarkus.kubernetes.deployment
Class KnativeConfig
java.lang.Object
io.quarkus.kubernetes.deployment.KnativeConfig
- All Implemented Interfaces:
EnvVarHolder,PlatformConfiguration
-
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 volumesbooleanWhether this service is cluster-local.The commands(package private) Map<String,ConfigMapVolumeConfig> ConfigMap volumesIf set, it will change the name of the container according to the configuration(package private) Map<String,ContainerConfig> Sidecar containers(package private) booleanIf set to true, Quarkus will attempt to deploy the application to the target knative cluster(package private) DeployStrategyIf deploy is enabled, it will follow this strategy to update the resources to the target Knative cluster.EmptyDir volumes(package private) EnvVarsConfigEnvironment variables to add to all containers.Deprecated.(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) GlobalAutoScalingConfigGlobal autoscaling configuration.(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) Map<String,ContainerConfig> Init containersCustom labels to add to all resources(package private) ProbeConfigThe liveness probeThis value controls the maximum number of replicas each revision should have.This value controls the minimum number of replicas each revision should have.(package private) Map<String,MountConfig> Volume mountsThe name of the application.The namespace the generated resources should belong 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) ResourcesConfigResources requirements(package private) AutoScalingConfigRevision autoscaling configuration.The name of the revision.(package private) booleanThe scale-to-zero values control whether Knative allows revisions to scale down to zero, or stops at “1”.(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) ProbeConfigThe startup probe(package private) Map<String,TrafficConfig> Traffic configuration.The version of the application.Working directory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEnv()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.booleanbooleanbooleanbooleanbooleanMethods 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. -
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 -
serviceType
@ConfigItem(defaultValue="ClusterIP") io.dekorate.kubernetes.annotation.ServiceType serviceTypeThe type of service that will be generated for the application -
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 -
containerName
If set, it will change the name of the container according to the configuration -
initContainers
Init containers -
containers
Sidecar containers -
hostAliases
The host aliases -
resources
Resources requirements -
rbac
RBAC configuration -
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 -
idempotent
@ConfigItem(defaultValue="false") boolean idempotentSwitch used to control whether non-idempotent fields are included in generated kubernetes resources to improve git-ops compatibility -
envVars
Deprecated.Useenvinstead using the new syntax as follows:quarkus.kubernetes.env-vars.foo.field=fieldNamebecomesquarkus.kubernetes.env.fields.foo=fieldNamequarkus.kubernetes.env-vars.envvar.value=valuebecomesquarkus.kubernetes.env.vars.envvar=valuequarkus.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. -
clusterLocal
@ConfigItem public boolean clusterLocalWhether this service is cluster-local. Cluster local services are not exposed to the outside world. More information in this link. -
minScale
This value controls the minimum number of replicas each revision should have. Knative will attempt to never have less than this number of replicas at any point in time. -
maxScale
This value controls the maximum number of replicas each revision should have. Knative will attempt to never have more than this number of replicas running, or in the process of being created, at any point in time. -
scaleToZeroEnabled
@ConfigItem(defaultValue="true") boolean scaleToZeroEnabledThe scale-to-zero values control whether Knative allows revisions to scale down to zero, or stops at “1”. -
revisionAutoScaling
AutoScalingConfig revisionAutoScalingRevision autoscaling configuration. -
globalAutoScaling
GlobalAutoScalingConfig globalAutoScalingGlobal autoscaling configuration. -
revisionName
The name of the revision. -
traffic
Traffic configuration. -
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. -
deploy
@ConfigItem(defaultValue="false") boolean deployIf set to true, Quarkus will attempt to deploy the application to the target knative cluster -
deployStrategy
If deploy is enabled, it will follow this strategy to update the resources to the target Knative cluster.
-
-
Constructor Details
-
KnativeConfig
public KnativeConfig()
-
-
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
-
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
-
getServiceType
public io.dekorate.kubernetes.annotation.ServiceType getServiceType()- Specified by:
getServiceTypein interfacePlatformConfiguration
-
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
-
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
-
getAppSecret
- Specified by:
getAppSecretin interfacePlatformConfiguration
-
getAppConfigMap
- Specified by:
getAppConfigMapin interfacePlatformConfiguration
-
getSecurityContext
- Specified by:
getSecurityContextin interfacePlatformConfiguration
-
isIdempotent
public boolean isIdempotent()- Specified by:
isIdempotentin interfacePlatformConfiguration
-
getRbacConfig
- Specified by:
getRbacConfigin interfacePlatformConfiguration
-
envinstead using the new syntax as follows:quarkus.kubernetes.env-vars.foo.field=fieldNamebecomesquarkus.kubernetes.env.fields.foo=fieldNamequarkus.kubernetes.env-vars.envvar.value=valuebecomesquarkus.kubernetes.env.vars.envvar=valuequarkus.kubernetes.env-vars.bar.configmap=configNamebecomesquarkus.kubernetes.env.configmaps=configNamequarkus.kubernetes.env-vars.baz.secret=secretNamebecomesquarkus.kubernetes.env.secrets=secretName