Package io.quarkus.kubernetes.deployment
Class KnativeConfig
- java.lang.Object
-
- io.quarkus.kubernetes.deployment.KnativeConfig
-
- All Implemented Interfaces:
EnvVarHolder,PlatformConfiguration
@ConfigRoot public class KnativeConfig extends Object implements PlatformConfiguration
-
-
Field Summary
Fields Modifier and Type Field Description (package private) booleanaddBuildTimestampWhether 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) booleanaddNameToLabelSelectorsIf true, the 'app.kubernetes.io/name' label will be part of the selectors of Service and Deployment(package private) booleanaddVersionToLabelSelectorsIf true, the 'app.kubernetes.io/version' label will be part of the selectors of Service and Deployment(package private) Map<String,String>annotationsCustom annotations to add to all resources(package private) Optional<String>appConfigMapIf set, the config map will be mounted to the application container and its contents will be used for application configuration.(package private) Optional<String>appSecretIf set, the secret will mounted to the application container and its contents will be used for application configuration.(package private) Optional<List<String>>argumentsThe arguments(package private) Map<String,AwsElasticBlockStoreVolumeConfig>awsElasticBlockStoreVolumesAWS Elastic BlockStore volumes(package private) Map<String,AzureDiskVolumeConfig>azureDiskVolumesAzure disk volumes(package private) Map<String,AzureFileVolumeConfig>azureFileVolumesAzure file volumesbooleanclusterLocalWhether this service is cluster-local.(package private) Optional<List<String>>commandThe commands(package private) Map<String,ConfigMapVolumeConfig>configMapVolumesConfigMap volumes(package private) Optional<String>containerNameIf set, it will change the name of the container according to the configuration(package private) Map<String,ContainerConfig>containersSidecar containers(package private) booleandeployIf set to true, Quarkus will attempt to deploy the application to the target knative cluster(package private) Optional<List<String>>emptyDirVolumesEmptyDir volumes(package private) EnvVarsConfigenvEnvironment variables to add to all containers.(package private) Map<String,EnvConfig>envVarsDeprecated.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(package private) Map<String,GitRepoVolumeConfig>gitRepoVolumesGit Repository volumes(package private) GlobalAutoScalingConfigglobalAutoScalingGlobal autoscaling configuration.(package private) Optional<String>hostThe host under which the application is going to be exposed(package private) Map<String,HostAliasConfig>hostAliasesThe host aliases(package private) io.dekorate.kubernetes.annotation.ImagePullPolicyimagePullPolicyImage pull policy(package private) Optional<List<String>>imagePullSecretsThe image pull secret(package private) Map<String,ContainerConfig>initContainersInit containers(package private) Map<String,String>labelsCustom labels to add to all resources(package private) ProbeConfiglivenessProbeThe liveness probe(package private) Optional<Integer>maxScaleThis value controls the maximum number of replicas each revision should have.(package private) Optional<Integer>minScaleThis value controls the minimum number of replicas each revision should have.(package private) Map<String,MountConfig>mountsVolume mounts(package private) Optional<String>nameThe name of the application.(package private) Optional<String>namespaceThe namespace the generated resources should belong to.(package private) Optional<String>partOfThe name of the group this component belongs too(package private) Map<String,PortConfig>portsThe application ports(package private) PrometheusConfigprometheusPrometheus configuration(package private) Map<String,PvcVolumeConfig>pvcVolumesPersistent Volume Claim volumes(package private) ProbeConfigreadinessProbeThe readiness probe(package private) ResourcesConfigresourcesResources requirements(package private) AutoScalingConfigrevisionAutoScalingRevision autoscaling configuration.(package private) Optional<String>revisionNameThe name of the revision.(package private) booleanscaleToZeroEnabledThe scale-to-zero values control whether Knative allows revisions to scale down to zero, or stops at “1”.(package private) Map<String,SecretVolumeConfig>secretVolumesSecret volumes(package private) SecurityContextConfigsecurityContextIf set, it will copy the security context configuration provided into the generated pod settings.(package private) Optional<String>serviceAccountThe service account(package private) io.dekorate.kubernetes.annotation.ServiceTypeserviceTypeThe type of service that will be generated for the application(package private) Map<String,TrafficConfig>trafficTraffic configuration.(package private) Optional<String>versionThe version of the application.(package private) Optional<String>workingDirWorking directory
-
Constructor Summary
Constructors Constructor Description KnativeConfig()
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.quarkus.kubernetes.deployment.EnvVarHolder
convertToBuildItems
-
Methods inherited from interface io.quarkus.kubernetes.deployment.PlatformConfiguration
getConfigName
-
-
-
-
Field Detail
-
name
@ConfigItem(defaultValue="${quarkus.container-image.name}") Optional<String> nameThe name of the application. This value will be used for naming Kubernetes resources like: - Deployment - Service and so on ...
-
version
@ConfigItem(defaultValue="${quarkus.container-image.tag}") Optional<String> versionThe version of the application.
-
namespace
@ConfigItem Optional<String> 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).
-
addBuildTimestamp
@ConfigItem(defaultValue="true") boolean addBuildTimestamp
Whether 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
-
ports
@ConfigItem Map<String,PortConfig> ports
The application ports
-
serviceType
@ConfigItem(defaultValue="ClusterIP") io.dekorate.kubernetes.annotation.ServiceType serviceType
The type of service that will be generated for the application
-
imagePullPolicy
@ConfigItem(defaultValue="Always") io.dekorate.kubernetes.annotation.ImagePullPolicy imagePullPolicy
Image pull policy
-
livenessProbe
@ConfigItem ProbeConfig livenessProbe
The liveness probe
-
readinessProbe
@ConfigItem ProbeConfig readinessProbe
The readiness probe
-
prometheus
@ConfigItem PrometheusConfig prometheus
Prometheus configuration
-
mounts
@ConfigItem Map<String,MountConfig> mounts
Volume mounts
-
secretVolumes
@ConfigItem Map<String,SecretVolumeConfig> secretVolumes
Secret volumes
-
configMapVolumes
@ConfigItem Map<String,ConfigMapVolumeConfig> configMapVolumes
ConfigMap volumes
-
gitRepoVolumes
@ConfigItem Map<String,GitRepoVolumeConfig> gitRepoVolumes
Git Repository volumes
-
pvcVolumes
@ConfigItem Map<String,PvcVolumeConfig> pvcVolumes
Persistent Volume Claim volumes
-
awsElasticBlockStoreVolumes
@ConfigItem Map<String,AwsElasticBlockStoreVolumeConfig> awsElasticBlockStoreVolumes
AWS Elastic BlockStore volumes
-
azureFileVolumes
@ConfigItem Map<String,AzureFileVolumeConfig> azureFileVolumes
Azure file volumes
-
azureDiskVolumes
@ConfigItem Map<String,AzureDiskVolumeConfig> azureDiskVolumes
Azure disk volumes
-
containerName
@ConfigItem Optional<String> containerName
If set, it will change the name of the container according to the configuration
-
initContainers
@ConfigItem Map<String,ContainerConfig> initContainers
Init containers
-
containers
@ConfigItem Map<String,ContainerConfig> containers
Sidecar containers
-
hostAliases
@ConfigItem Map<String,HostAliasConfig> hostAliases
The host aliases
-
resources
@ConfigItem ResourcesConfig resources
Resources requirements
-
addVersionToLabelSelectors
@ConfigItem(defaultValue="true") boolean addVersionToLabelSelectors
If true, the 'app.kubernetes.io/version' label will be part of the selectors of Service and Deployment
-
addNameToLabelSelectors
@ConfigItem(defaultValue="true") boolean addNameToLabelSelectors
If true, the 'app.kubernetes.io/name' label will be part of the selectors of Service and Deployment
-
envVars
@ConfigItem @Deprecated Map<String,EnvConfig> 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
@ConfigItem EnvVarsConfig env
Environment variables to add to all containers.
-
clusterLocal
@ConfigItem public boolean clusterLocal
Whether this service is cluster-local. Cluster local services are not exposed to the outside world. More information in this link.
-
minScale
@ConfigItem Optional<Integer> 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
@ConfigItem Optional<Integer> 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 scaleToZeroEnabled
The scale-to-zero values control whether Knative allows revisions to scale down to zero, or stops at “1”.
-
revisionAutoScaling
AutoScalingConfig revisionAutoScaling
Revision autoscaling configuration.
-
globalAutoScaling
GlobalAutoScalingConfig globalAutoScaling
Global autoscaling configuration.
-
traffic
Map<String,TrafficConfig> traffic
Traffic configuration.
-
appSecret
@ConfigItem Optional<String> appSecret
If set, the secret will mounted to the application container and its contents will be used for application configuration.
-
appConfigMap
@ConfigItem Optional<String> appConfigMap
If set, the config map will be mounted to the application container and its contents will be used for application configuration.
-
securityContext
@ConfigItem SecurityContextConfig securityContext
If set, it will copy the security context configuration provided into the generated pod settings.
-
deploy
@ConfigItem(defaultValue="false") boolean deploy
If set to true, Quarkus will attempt to deploy the application to the target knative cluster
-
-
Method Detail
-
getPartOf
public Optional<String> getPartOf()
- Specified by:
getPartOfin interfacePlatformConfiguration
-
getName
public Optional<String> getName()
- Specified by:
getNamein interfacePlatformConfiguration
-
getVersion
public Optional<String> getVersion()
- Specified by:
getVersionin interfacePlatformConfiguration
-
getNamespace
public Optional<String> getNamespace()
- Specified by:
getNamespacein interfacePlatformConfiguration
-
getLabels
public Map<String,String> getLabels()
- Specified by:
getLabelsin interfacePlatformConfiguration
-
getAnnotations
public Map<String,String> 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
public String 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
public Optional<String> getWorkingDir()
- Specified by:
getWorkingDirin interfacePlatformConfiguration
-
getCommand
public Optional<List<String>> getCommand()
- Specified by:
getCommandin interfacePlatformConfiguration
-
getArguments
public Optional<List<String>> getArguments()
- Specified by:
getArgumentsin interfacePlatformConfiguration
-
getServiceAccount
public Optional<String> getServiceAccount()
- Specified by:
getServiceAccountin interfacePlatformConfiguration
-
getHost
public Optional<String> getHost()
- Specified by:
getHostin interfacePlatformConfiguration
-
getContainerName
public Optional<String> getContainerName()
- Specified by:
getContainerNamein interfacePlatformConfiguration
-
getPorts
public Map<String,PortConfig> 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
public Optional<List<String>> getImagePullSecrets()
- Specified by:
getImagePullSecretsin interfacePlatformConfiguration
-
getLivenessProbe
public ProbeConfig getLivenessProbe()
- Specified by:
getLivenessProbein interfacePlatformConfiguration
-
getReadinessProbe
public ProbeConfig getReadinessProbe()
- Specified by:
getReadinessProbein interfacePlatformConfiguration
-
getPrometheusConfig
public PrometheusConfig getPrometheusConfig()
- Specified by:
getPrometheusConfigin interfacePlatformConfiguration
-
getMounts
public Map<String,MountConfig> getMounts()
- Specified by:
getMountsin interfacePlatformConfiguration
-
getSecretVolumes
public Map<String,SecretVolumeConfig> getSecretVolumes()
- Specified by:
getSecretVolumesin interfacePlatformConfiguration
-
getConfigMapVolumes
public Map<String,ConfigMapVolumeConfig> getConfigMapVolumes()
- Specified by:
getConfigMapVolumesin interfacePlatformConfiguration
-
getEmptyDirVolumes
public List<String> getEmptyDirVolumes()
- Specified by:
getEmptyDirVolumesin interfacePlatformConfiguration
-
getGitRepoVolumes
public Map<String,GitRepoVolumeConfig> getGitRepoVolumes()
- Specified by:
getGitRepoVolumesin interfacePlatformConfiguration
-
getPvcVolumes
public Map<String,PvcVolumeConfig> getPvcVolumes()
- Specified by:
getPvcVolumesin interfacePlatformConfiguration
-
getAwsElasticBlockStoreVolumes
public Map<String,AwsElasticBlockStoreVolumeConfig> getAwsElasticBlockStoreVolumes()
- Specified by:
getAwsElasticBlockStoreVolumesin interfacePlatformConfiguration
-
getAzureFileVolumes
public Map<String,AzureFileVolumeConfig> getAzureFileVolumes()
- Specified by:
getAzureFileVolumesin interfacePlatformConfiguration
-
getAzureDiskVolumes
public Map<String,AzureDiskVolumeConfig> getAzureDiskVolumes()
- Specified by:
getAzureDiskVolumesin interfacePlatformConfiguration
-
getInitContainers
public Map<String,ContainerConfig> getInitContainers()
- Specified by:
getInitContainersin interfacePlatformConfiguration
-
getSidecars
public Map<String,ContainerConfig> getSidecars()
- Specified by:
getSidecarsin interfacePlatformConfiguration
-
getHostAliases
public Map<String,HostAliasConfig> getHostAliases()
- Specified by:
getHostAliasesin interfacePlatformConfiguration
-
getResources
public ResourcesConfig getResources()
- Specified by:
getResourcesin interfacePlatformConfiguration
-
getEnvVars
@Deprecated public Map<String,EnvConfig> getEnvVars()
Deprecated.- Specified by:
getEnvVarsin interfaceEnvVarHolder
-
getEnv
public EnvVarsConfig 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
public Optional<String> getAppSecret()
- Specified by:
getAppSecretin interfacePlatformConfiguration
-
getAppConfigMap
public Optional<String> getAppConfigMap()
- Specified by:
getAppConfigMapin interfacePlatformConfiguration
-
getSecurityContext
public SecurityContextConfig getSecurityContext()
- Specified by:
getSecurityContextin interfacePlatformConfiguration
-
-