Package io.quarkus.kubernetes.deployment
Class OpenshiftConfig
- java.lang.Object
-
- io.quarkus.kubernetes.deployment.OpenshiftConfig
-
- All Implemented Interfaces:
EnvVarHolder,PlatformConfiguration
@ConfigRoot public class OpenshiftConfig extends Object implements PlatformConfiguration
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOpenshiftConfig.OpenshiftFlavor
-
Field Summary
Fields Modifier and Type Field Description (package private) booleanaddBuildTimestampWhether or not 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) booleanaddVersionToLabelSelectorsIf true, the 'app.kubernetes.io/version' label will be part of the selectors of Service and DeploymentConfig(package private) Map<String,String>annotationsCustom annotations to add to all resources(package private) Optional<String>appConfigMapIf set, the config amp will 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 volumes(package private) Optional<List<String>>commandThe commands(package private) Map<String,ConfigMapVolumeConfig>configMapVolumesConfigMap volumes(package private) Map<String,ContainerConfig>containersDeprecated.Use thesidecarsproperty instead(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) booleanexposeDeprecated.Use thequarkus.openshift.route.expositioninstead(package private) OpenshiftConfig.OpenshiftFlavorflavorThe OpenShift flavor / version to use.(package private) Map<String,GitRepoVolumeConfig>gitRepoVolumesGit Repository volumes(package private) Optional<String>hostDeprecated.Use thequarkus.openshift.route.hostinstead(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) 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) OptionalIntnodePortThe nodePort to set when serviceType is set to nodePort(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) IntegerreplicasThe number of desired pods(package private) ResourcesConfigresourcesResources requirements(package private) ExpositionConfigrouteOpenshift route configuration(package private) Map<String,SecretVolumeConfig>secretVolumesSecret volumes(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,ContainerConfig>sidecarsSidecar containers(package private) Optional<String>versionThe version of the application.(package private) Optional<String>workingDirWorking directory
-
Constructor Summary
Constructors Constructor Description OpenshiftConfig()
-
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
-
flavor
@ConfigItem(defaultValue="v4") OpenshiftConfig.OpenshiftFlavor flavor
The OpenShift flavor / version to use. Older versions of OpenShift have minor differrences in the labels and fields they support. This option allows users to have their manifests automatically aligned to the OpenShift 'flavor' they use.
-
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 or not 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
-
host
@ConfigItem Optional<String> host
Deprecated.Use thequarkus.openshift.route.hostinsteadThe host under which the application is going to be exposed
-
ports
@ConfigItem Map<String,PortConfig> ports
The application ports
-
replicas
@ConfigItem(defaultValue="1") Integer replicas
The number of desired pods
-
serviceType
@ConfigItem(defaultValue="ClusterIP") io.dekorate.kubernetes.annotation.ServiceType serviceType
The type of service that will be generated for the application
-
nodePort
@ConfigItem OptionalInt nodePort
The nodePort to set when serviceType is set to nodePort
-
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
-
initContainers
@ConfigItem Map<String,ContainerConfig> initContainers
Init containers
-
containers
@ConfigItem @Deprecated Map<String,ContainerConfig> containers
Deprecated.Use thesidecarsproperty insteadSidecar containers
-
sidecars
@ConfigItem Map<String,ContainerConfig> sidecars
Sidecar containers
-
hostAliases
@ConfigItem Map<String,HostAliasConfig> hostAliases
The host aliases
-
resources
@ConfigItem ResourcesConfig resources
Resources requirements
-
expose
@ConfigItem boolean expose
Deprecated.Use thequarkus.openshift.route.expositioninsteadIf true, an Openshift Route will be created
-
route
ExpositionConfig route
Openshift route configuration
-
addVersionToLabelSelectors
@ConfigItem(defaultValue="true") boolean addVersionToLabelSelectors
If true, the 'app.kubernetes.io/version' label will be part of the selectors of Service and DeploymentConfig
-
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.
-
appSecret
@ConfigItem Optional<String> appSecret
If set, the secret will mounted to the application container and its contents will be used for application configuration.
-
-
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
-
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
-
getReplicas
public Integer getReplicas()
-
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
-
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
-
getHostAliases
public Map<String,HostAliasConfig> getHostAliases()
- Specified by:
getHostAliasesin interfacePlatformConfiguration
-
getResources
public ResourcesConfig getResources()
- Specified by:
getResourcesin interfacePlatformConfiguration
-
getInitContainers
public Map<String,ContainerConfig> getInitContainers()
- Specified by:
getInitContainersin interfacePlatformConfiguration
-
getSidecars
public Map<String,ContainerConfig> getSidecars()
- Specified by:
getSidecarsin interfacePlatformConfiguration
-
isExpose
public boolean isExpose()
- Specified by:
isExposein 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
-
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
-
getExposition
public Optional<ExpositionConfig> getExposition()
- Specified by:
getExpositionin interfacePlatformConfiguration
-
-