Deploying on OpenShift
このガイドでは、妥当なデフォルト設定とユーザーが提供する設定に基づいたOpenShiftリソースの生成とデプロイについて説明します。
前提条件
このガイドを完成させるには、以下が必要です:
-
約15分
-
IDE
-
JDK 11+ がインストールされ、
JAVA_HOME
が適切に設定されていること -
Apache Maven 3.8.1+
-
使用したい場合、 Quarkus CLI
-
Access to an OpenShift cluster (Minishift is a viable option)
-
OpenShift CLI (Optional, only required for manual deployment)
プロジェクトのブートストラップ
まず、OpenShift エクステンションを含む新しいプロジェクトが必要です。これは以下のコマンドを使用して行うことができます。
Quarkus offers the ability to automatically generate OpenShift resources based on sane defaults and user supplied configuration. The OpenShift extension is actually a wrapper extension that brings together the kubernetes and container-image-s2i extensions with sensible defaults so that it’s easier for the user to get started with Quarkus on OpenShift.
上記のコマンドライン呼び出しにOpenShift エクステンションを追加すると、以下のような依存関係が pom.xml
に追加されます。
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-openshift</artifactId>
</dependency>
implementation("io.quarkus:quarkus-openshift")
Log Into the OpenShift Cluster
Before we build and deploy our application we need to log into an OpenShift cluster. You can log in via the OpenShift CLI:
oc login -u myUsername (1)
1 | You’ll be prompted for the required information such as server URL, password, etc. |
Alternatively, you may log in using the API token:
oc login --token=myToken --server=myServerUrl
You can request the token via the Copy Login Command link in the OpenShift web console. |
Finally, you don’t need to use the OpenShift CLI at all. Instead, set the quarkus.kubernetes-client.master-url
config property and authenticate with the quarkus.kubernetes-client.token
, or quarkus.kubernetes-client.username
and quarkus.kubernetes-client.password
respectively:
quarkus build -Dquarkus.kubernetes-client.master-url=myServerUrl -Dquarkus.kubernetes-client.token=myToken
./mvnw clean package -Dquarkus.kubernetes-client.master-url=myServerUrl -Dquarkus.kubernetes-client.token=myToken
./gradlew build -Dquarkus.kubernetes-client.master-url=myServerUrl -Dquarkus.kubernetes-client.token=myToken
Build and Deployment
You can trigger a build and deployment in a single step or build the container image first and then configure the OpenShift application manually if you need more control over the deployment configuration.
ビルドとデプロイを1つのステップでトリガーするためには次のようにします。
quarkus build -Dquarkus.kubernetes.deploy=true
./mvnw clean package -Dquarkus.kubernetes.deploy=true
./gradlew build -Dquarkus.kubernetes.deploy=true
If you want to test your application immediately then set the quarkus.openshift.route.expose config property to true to expose the service automatically, e.g. add -Dquarkus.openshift.route.expose=true to the command above.
|
This command will build your application locally, then trigger a container image build and finally apply the generated OpenShift resources automatically. The generated resources use OpenShift’s DeploymentConfig
that is configured to automatically trigger a redeployment when a change in the ImageStream
is noticed. In other words, any container image build after the initial deployment will automatically trigger redeployment, without the need to delete, update or re-apply the generated resources.
You can use the OpenShift web console to verify that the above command has created an image stream, a service resource and has deployed the application. Alternatively, you can run the following OpenShift CLI commands:
oc get is (1)
oc get pods (2)
oc get svc (3)
1 | Lists the image streams created. |
2 | Get the list of pods. |
3 | Get the list of Kubernetes services. |
Note that the service is not exposed to the outside world by default. So unless you’ve used the quarkus.openshift.route.expose
config property to expose the created service automatically you’ll need to expose the service manually.
oc expose svc/greeting (1)
oc get routes (2)
curl http://<route>/greeting (3)
1 | Expose the service. |
2 | Get the list of exposed routes. |
3 | Access your application. |
Configure the OpenShift Application Manually
If you need more control over the deployment configuration you can build the container image first and then configure the OpenShift application manually.
To trigger a container image build:
./mvnw clean package -Dquarkus.container-image.build=true
The build that will be performed is a s2i binary build. The input of the build is the jar that has been built locally and the output of the build is an ImageStream
that is configured to automatically trigger a deployment.
During the build you may find the |
Once the build is done we can create a new application from the relevant ImageStream
.
oc get is (1)
oc new-app --name=greeting <project>/openshift-quickstart:1.0.0-SNAPSHOT (2)
oc get svc
oc expose svc/greeting (3)
oc get routes (4)
curl http://<route>/greeting (5)
1 | Lists the image streams created. The image stream of our application should be tagged as <project>/openshift-quickstart:1.0.0-SNAPSHOT. |
2 | Create a new application from the image source. |
3 | Expose the service to the outside world. |
4 | Get the list of exposed routes. |
5 | Access your application. |
After this setup the next time the container image is built a deployment to OpenShift is triggered automatically. In other words, you don’t need to repeat the above steps.
Non-S2I Builds
Out of the box the OpenShift extension is configured to use container-image-s2i. However, it’s still possible to use other container image extensions like:
When a non-s2i container image extension is used, an ImageStream
is created that is pointing to an external dockerImageRepository
. The image is built and pushed to the registry and the ImageStream
populates the tags that are available in the dockerImageRepository
.
イメージのビルドに使用するエクステンションを選択するには次のようにします。
quarkus.container-image.builder=docker
あるいは
quarkus.container-image.builder=jib
カスタマイズ
All available customization options are available in the OpenShift configuration options.
いくつかの例は、以下のセクションで提供されています。
Route の公開
Quarkusアプリケーションの Route
を公開するには次のようにします。
quarkus.openshift.route.expose=true
このプロパティーを
以下にリストされているすべてのプロパティも同様です。 |
環境変数
OpenShiftでは環境変数の定義方法が複数用意されています。
-
キー/値のペア
-
Secret または ConfigMap からすべての値をインポート
-
Secret または ConfigMap の指定されたフィールドで識別される単一の値を補間
-
同じリソース内のフィールドから値を補間
キー/値のペアからの環境変数
生成されたリソースに環境変数としてキーとバリューのペアを追加する場合:
quarkus.openshift.env.vars.my-env-var=foobar
上のコマンドは MY_ENV_VAR=foobar
を環境変数として追加します。キー my-env-var
は大文字に変換され、ダッシュはアンダースコアに置き換えられて MY_ENV_VAR
となることに注意してください。
シークレットからの環境変数
Secret
のすべてのキーと値のペアを環境変数として追加するには、以下の設定を適用し、ソースとして使用する各 Secret
をカンマ ( ,
) で区切ってください。
quarkus.openshift.env.secrets=my-secret,my-other-secret
とすると、コンテナーの定義に以下のようなものが生成されます。
envFrom:
- secretRef:
name: my-secret
optional: false
- secretRef:
name: my-other-secret
optional: false
以下は、 my-secret
Secret から keyName
フィールドで識別される値を foo
環境変数に抽出します。
quarkus.openshift.env.mapping.foo.from-secret=my-secret
quarkus.openshift.env.mapping.foo.with-key=keyName
これにより、コンテナーの env
セクションに以下のようなものが生成されます。
- env:
- name: FOO
valueFrom:
secretKeyRef:
key: keyName
name: my-secret
optional: false
ConfigMapからの環境変数
ConfigMap
からのすべてのキーと値のペアを環境変数として追加するには、以下の設定を適用し、ソースとして使用する各 ConfigMap
をカンマ ( ,
) で区切ってください。
quarkus.openshift.env.configmaps=my-config-map,another-config-map
とすると、コンテナーの定義に以下のようなものが生成されます。
envFrom:
- configMapRef:
name: my-config-map
optional: false
- configMapRef:
name: another-config-map
optional: false
以下は、 my-config-map
ConfigMap から keyName
フィールドで識別される値を foo
環境変数に抽出したものです。
quarkus.openshift.env.mapping.foo.from-configmap=my-configmap
quarkus.openshift.env.mapping.foo.with-key=keyName
これにより、コンテナーの env
セクションに以下のようなものが生成されます。
- env:
- name: FOO
valueFrom:
configMapRefKey:
key: keyName
name: my-configmap
optional: false
フィールドからの環境変数
また、以下のように、ソースとして使用するフィールドのパスを指定することで、別のフィールドの値を使用して新しい環境変数を追加することも可能です。
quarkus.openshift.env.fields.foo=metadata.name
Using Deployment instead of DeploymentConfig
Out of the box the extension will generate a DeploymentConfig
resource. Often users, prefer to use Deployment
as the main deployment resource, but still make use of OpenShift specific resources like Route
, BuildConfig
etc. This feature is enabled by setting quarkus.openshift.deployment-kind
to Deployment
.
quarkus.openshift.deployment-kind=Deployment
Since Deployment
is a Kubernetes resource and not OpenShift specific, it can’t possibly leverage ImageStream
resources, as is the case with DeploymentConfig
. This means that the image references need to include the container image registry that hosts the image. When the image is built, using OpenShift builds (s2i binary and docker strategy) the OpenShift internal image registry image-registry.openshift-image-registry.svc:5000
will be used, unless another registry has been explicitly specified by the user. Please note, that in the internal registry the project/namespace name is added as part of the image repository: image-registry.openshift-image-registry.svc:5000/<project name>/<name>:<tag>
, so users will need to make sure that the target project/namespace name is aligned with the quarkus.container-image.group
.
quarkus.container-image.group=<project/namespace name>
バリデーション
例えば、誤って両方の値を代入したり、変数がフィールドから派生したものであることを指定したりするなど、2つの定義の間で競合が発生すると、ビルド時にエラーが発生します。そのため、問題の原因を診断するのが困難なクラスターにアプリケーションをデプロイする前に問題を修正する機会を得ることができます。
同様に、同じシークレットからのインジェクションを2回定義するなど、2つの冗長な定義があっても問題は発生しませんが、その定義を複製することを意図していなかった可能性があることを知らせる警告が実際に報告されます。
下位互換性
OpenShift エクステンションの以前のバージョンでは、環境変数を追加するための異なる構文がサポートされていました。古い構文はまだサポートされていますが、非推奨となっており、新しい構文に移行することをお勧めします。
旧 |
新 |
||
素の変数 |
|
|
|
フィールドから |
|
|
|
すべての |
|
|
|
すべての |
|
|
|
ある |
|
|
|
|
|
||
ある |
|
|
|
|
|
古い構文を維持したまま新しい構文を使用して同じ変数を再定義した場合、新しいバージョン のみ が保持され、警告が表示されて問題を警告します。例えば、 quarkus.openshift.env-vars.my-env-var.value=foobar と quarkus.openshift.env.vars.my-env-var=newValue の両方を定義した場合、エクステンションは環境変数 MY_ENV_VAR=newValue のみを生成し、警告を発行します。
|
Knative - OpenShiftサーバーレス
また、OpenShiftでは、OpenShift Serverless 機能を介してKnativeを利用する機能も提供されています。
まず最初にQuarkusの設定でKnativeのリソースを生成するように指示します。
quarkus.kubernetes.deployment-target=knative
OpenShift S2I を利用してクラスタ上にコンテナイメージを構築し、その結果のコンテナイメージをKnativeアプリケーションで使用するためには、いくつかの設定プロパティを設定する必要があります。
# set the Kubernetes namespace which will be used to run the application
quarkus.container-image.group=geoand
# set the container image registry - this is the standard URL used to refer to the internal OpenShift registry
quarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000
その後、標準の quarkus.kubernetes.deploy=true
プロパティを有効にすることで、アプリケーションを OpenShift Serverless にデプロイすることができます。
設定リファレンス
ビルド時に固定される設定プロパティ - それ以外の設定プロパティは実行時に上書き可能
タイプ |
デフォルト |
|
---|---|---|
The OpenShift flavor / version to use. Older versions of OpenShift have minor differences in the labels and fields they support. This option allows users to have their manifests automatically aligned to the OpenShift 'flavor' they use. Environment variable: |
|
|
The kind of the deployment resource to use. Supported values are 'Deployment' and 'DeploymentConfig' defaulting to the latter. Environment variable: |
|
|
The name of the group this component belongs too Environment variable: |
string |
|
The name of the application. This value will be used for naming Kubernetes resources like: 'Deployment', 'Service' and so on… Environment variable: |
string |
|
The version of the application. Environment variable: |
string |
|
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). Environment variable: |
string |
|
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 Environment variable: |
boolean |
|
Working directory Environment variable: |
string |
|
The commands Environment variable: |
list of string |
|
The arguments Environment variable: |
list of string |
|
The service account Environment variable: |
string |
|
The host under which the application is going to be exposed Environment variable: |
string |
|
The number of desired pods Environment variable: |
int |
|
The type of service that will be generated for the application Environment variable: |
|
|
The nodePort to set when serviceType is set to nodePort Environment variable: |
int |
|
Image pull policy Environment variable: |
|
|
The image pull secret Environment variable: |
list of string |
|
The http path to use for the probe For this to work, the container port also needs to be set Assuming the container port has been set (as per above comment), if execAction or tcpSocketAction are not set, an HTTP probe will be used automatically even if no path is set (which will result in the root path being used) Environment variable: |
string |
|
The command to use for the probe. Environment variable: |
string |
|
The tcp socket to use for the probe (the format is host:port). Environment variable: |
string |
|
The amount of time to wait before starting to probe. Environment variable: |
|
|
The period in which the action should be called. Environment variable: |
|
|
The amount of time to wait for each action. Environment variable: |
|
|
The success threshold to use. Environment variable: |
int |
|
The failure threshold to use. Environment variable: |
int |
|
The http path to use for the probe For this to work, the container port also needs to be set Assuming the container port has been set (as per above comment), if execAction or tcpSocketAction are not set, an HTTP probe will be used automatically even if no path is set (which will result in the root path being used) Environment variable: |
string |
|
The command to use for the probe. Environment variable: |
string |
|
The tcp socket to use for the probe (the format is host:port). Environment variable: |
string |
|
The amount of time to wait before starting to probe. Environment variable: |
|
|
The period in which the action should be called. Environment variable: |
|
|
The amount of time to wait for each action. Environment variable: |
|
|
The success threshold to use. Environment variable: |
int |
|
The failure threshold to use. Environment variable: |
int |
|
When true (the default), emit a set of annotations to identify services that should be scraped by prometheus for metrics. In configurations that use the Prometheus operator with ServiceMonitor, annotations may not be necessary. Environment variable: |
boolean |
|
Define the annotation prefix used for scrape values, this value will be used as the base for other annotation name defaults. Altering the base for generated annotations can make it easier to define re-labeling rules and avoid unexpected knock-on effects. The default value is Environment variable: |
string |
|
Define the annotation used to indicate services that should be scraped. By default, Environment variable: |
string |
|
Define the annotation used to indicate the path to scrape. By default, Environment variable: |
string |
|
Define the annotation used to indicate the port to scrape. By default, Environment variable: |
string |
|
Define the annotation used to indicate the scheme to use for scraping By default, Environment variable: |
string |
|
CPU Requirements Environment variable: |
string |
|
Memory Requirements Environment variable: |
string |
|
CPU Requirements Environment variable: |
string |
|
Memory Requirements Environment variable: |
string |
|
If set, it will change the name of the container according to the configuration Environment variable: |
string |
|
If true, an Openshift Route will be created Environment variable: |
boolean |
|
If true, the service will be exposed Environment variable: |
boolean |
|
The host under which the application is going to be exposed Environment variable: |
string |
|
If true, the 'app.kubernetes.io/version' label will be part of the selectors of Service and DeploymentConfig Environment variable: |
boolean |
|
The optional list of Secret names to load environment variables from. Environment variable: |
list of string |
|
The optional list of ConfigMap names to load environment variables from. Environment variable: |
list of string |
|
If set, the secret will mounted to the application container and its contents will be used for application configuration. Environment variable: |
string |
|
If set, the config amp will be mounted to the application container and its contents will be used for application configuration. Environment variable: |
string |
|
The SELinux level label that applies to the container. Environment variable: |
string |
|
The SELinux role label that applies to the container. Environment variable: |
string |
|
The SELinux type label that applies to the container. Environment variable: |
string |
|
The SELinux user label that applies to the container. Environment variable: |
string |
|
The name of the GMSA credential spec to use. Environment variable: |
string |
|
GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field. Environment variable: |
string |
|
The UserName in Windows to run the entrypoint of the container process. Environment variable: |
string |
|
HostProcess determines if a container should be run as a 'Host Process' container. Environment variable: |
boolean |
|
The UID to run the entrypoint of the container process. Environment variable: |
long |
|
The GID to run the entrypoint of the container process. Environment variable: |
long |
|
Indicates that the container must run as a non-root user. Environment variable: |
boolean |
|
A list of groups applied to the first process run in each container, in addition to the container’s primary GID. If unspecified, no groups will be added to any container. Environment variable: |
list of long |
|
A special supplemental group that applies to all containers in a pod. Environment variable: |
long |
|
Sysctls hold a list of namespaced sysctls used for the pod. Environment variable: |
string |
|
It holds policies that will be used for applying fsGroup to a volume when volume is mounted. Values: OnRootMismatch, Always Environment variable: |
|
|
If true, the debug mode in pods will be enabled. Environment variable: |
boolean |
|
The transport to use. Environment variable: |
string |
|
If enabled, it means the JVM will wait for the debugger to attach before executing the main class. If false, the JVM will immediately execute the main class, while listening for the debugger connection. Environment variable: |
string |
|
It specifies the address at which the debug socket will listen. Environment variable: |
int |
|
Custom labels to add to all resources Environment variable: |
|
|
Custom annotations to add to all resources Environment variable: |
|
|
The port number. Refers to the container port. Environment variable: |
int |
|
The host port. Environment variable: |
int |
|
The application path (refers to web application path). Environment variable: |
string |
|
The protocol. Environment variable: |
|
|
Environment variable: |
int |
|
The name of the volumeName to mount. Environment variable: |
string |
|
The path to mount. Environment variable: |
string |
|
Path within the volumeName from which the container’s volumeName should be mounted. Environment variable: |
string |
|
ReadOnly Environment variable: |
boolean |
|
The name of the secret to mount. Environment variable: |
string |
required |
Default mode. When specifying an octal number, leading zero must be present. Environment variable: |
string |
|
The path where the file will be mounted. Environment variable: |
string |
required |
It must be a value between 0000 and 0777. If not specified, the volume defaultMode will be used. Environment variable: |
int |
|
Optional Environment variable: |
boolean |
|
The name of the ConfigMap to mount. Environment variable: |
string |
required |
Default mode. When specifying an octal number, leading zero must be present. Environment variable: |
string |
|
The path where the file will be mounted. Environment variable: |
string |
required |
It must be a value between 0000 and 0777. If not specified, the volume defaultMode will be used. Environment variable: |
int |
|
Optional Environment variable: |
boolean |
|
Git repository URL. Environment variable: |
string |
required |
The directory of the repository to mount. Environment variable: |
string |
|
The commit hash to use. Environment variable: |
string |
|
The name of the claim to mount. Environment variable: |
string |
required |
Default mode. When specifying an octal number, leading zero must be present. Environment variable: |
string |
|
Optional Environment variable: |
boolean |
|
The name of the disk to mount. Environment variable: |
string |
required |
The partition. Environment variable: |
int |
|
Filesystem type. Environment variable: |
string |
|
Whether the volumeName is read only or not. Environment variable: |
boolean |
|
The share name. Environment variable: |
string |
required |
The secret name. Environment variable: |
string |
required |
Whether the volumeName is read only or not. Environment variable: |
boolean |
|
The name of the disk to mount. Environment variable: |
string |
required |
The URI of the vhd blob object OR the resourceID of an Azure managed data disk if Kind is Managed Environment variable: |
string |
required |
Kind of disk. Environment variable: |
|
|
Disk caching mode. Environment variable: |
|
|
File system type. Environment variable: |
string |
|
Whether the volumeName is read only or not. Environment variable: |
boolean |
|
The container image. Environment variable: |
string |
|
Working directory. Environment variable: |
string |
|
The commands Environment variable: |
list of string |
|
The arguments Environment variable: |
list of string |
|
The service account. Environment variable: |
string |
|
The host under which the application is going to be exposed. Environment variable: |
string |
|
The port number. Refers to the container port. Environment variable: |
int |
|
The host port. Environment variable: |
int |
|
The application path (refers to web application path). Environment variable: |
string |
|
The protocol. Environment variable: |
|
|
Environment variable: |
int |
|
Image pull policy. Environment variable: |
|
|
The image pull secret Environment variable: |
list of string |
|
The http path to use for the probe For this to work, the container port also needs to be set Assuming the container port has been set (as per above comment), if execAction or tcpSocketAction are not set, an HTTP probe will be used automatically even if no path is set (which will result in the root path being used) Environment variable: |
string |
|
The command to use for the probe. Environment variable: |
string |
|
The tcp socket to use for the probe (the format is host:port). Environment variable: |
string |
|
The amount of time to wait before starting to probe. Environment variable: |
|
|
The period in which the action should be called. Environment variable: |
|
|
The amount of time to wait for each action. Environment variable: |
|
|
The success threshold to use. Environment variable: |
int |
|
The failure threshold to use. Environment variable: |
int |
|
The http path to use for the probe For this to work, the container port also needs to be set Assuming the container port has been set (as per above comment), if execAction or tcpSocketAction are not set, an HTTP probe will be used automatically even if no path is set (which will result in the root path being used) Environment variable: |
string |
|
The command to use for the probe. Environment variable: |
string |
|
The tcp socket to use for the probe (the format is host:port). Environment variable: |
string |
|
The amount of time to wait before starting to probe. Environment variable: |
|
|
The period in which the action should be called. Environment variable: |
|
|
The amount of time to wait for each action. Environment variable: |
|
|
The success threshold to use. Environment variable: |
int |
|
The failure threshold to use. Environment variable: |
int |
|
The name of the volumeName to mount. Environment variable: |
string |
|
The path to mount. Environment variable: |
string |
|
Path within the volumeName from which the container’s volumeName should be mounted. Environment variable: |
string |
|
ReadOnly Environment variable: |
boolean |
|
CPU Requirements Environment variable: |
string |
|
Memory Requirements Environment variable: |
string |
|
CPU Requirements Environment variable: |
string |
|
Memory Requirements Environment variable: |
string |
|
The optional list of Secret names to load environment variables from. Environment variable: |
list of string |
|
The optional list of ConfigMap names to load environment variables from. Environment variable: |
list of string |
|
The map associating environment variable names to their associated field references they take their value from. Environment variable: |
|
|
The map associating environment name to its associated value. Environment variable: |
|
|
The optional name of the Secret from which a value is to be extracted. Mutually exclusive with Environment variable: |
string |
|
The optional name of the ConfigMap from which a value is to be extracted. Mutually exclusive with Environment variable: |
string |
|
The key identifying the field from which the value is extracted. Environment variable: |
string |
required |
The container image. Environment variable: |
string |
|
Working directory. Environment variable: |
string |
|
The commands Environment variable: |
list of string |
|
The arguments Environment variable: |
list of string |
|
The service account. Environment variable: |
string |
|
The host under which the application is going to be exposed. Environment variable: |
string |
|
The port number. Refers to the container port. Environment variable: |
int |
|
The host port. Environment variable: |
int |
|
The application path (refers to web application path). Environment variable: |
string |
|
The protocol. Environment variable: |
|
|
Environment variable: |
int |
|
Image pull policy. Environment variable: |
|
|
The image pull secret Environment variable: |
list of string |
|
The http path to use for the probe For this to work, the container port also needs to be set Assuming the container port has been set (as per above comment), if execAction or tcpSocketAction are not set, an HTTP probe will be used automatically even if no path is set (which will result in the root path being used) Environment variable: |
string |
|
The command to use for the probe. Environment variable: |
string |
|
The tcp socket to use for the probe (the format is host:port). Environment variable: |
string |
|
The amount of time to wait before starting to probe. Environment variable: |
|
|
The period in which the action should be called. Environment variable: |
|
|
The amount of time to wait for each action. Environment variable: |
|
|
The success threshold to use. Environment variable: |
int |
|
The failure threshold to use. Environment variable: |
int |
|
The http path to use for the probe For this to work, the container port also needs to be set Assuming the container port has been set (as per above comment), if execAction or tcpSocketAction are not set, an HTTP probe will be used automatically even if no path is set (which will result in the root path being used) Environment variable: |
string |
|
The command to use for the probe. Environment variable: |
string |
|
The tcp socket to use for the probe (the format is host:port). Environment variable: |
string |
|
The amount of time to wait before starting to probe. Environment variable: |
|
|
The period in which the action should be called. Environment variable: |
|
|
The amount of time to wait for each action. Environment variable: |
|
|
The success threshold to use. Environment variable: |
int |
|
The failure threshold to use. Environment variable: |
int |
|
The name of the volumeName to mount. Environment variable: |
string |
|
The path to mount. Environment variable: |
string |
|
Path within the volumeName from which the container’s volumeName should be mounted. Environment variable: |
string |
|
ReadOnly Environment variable: |
boolean |
|
CPU Requirements Environment variable: |
string |
|
Memory Requirements Environment variable: |
string |
|
CPU Requirements Environment variable: |
string |
|
Memory Requirements Environment variable: |
string |
|
The optional list of Secret names to load environment variables from. Environment variable: |
list of string |
|
The optional list of ConfigMap names to load environment variables from. Environment variable: |
list of string |
|
The map associating environment variable names to their associated field references they take their value from. Environment variable: |
|
|
The map associating environment name to its associated value. Environment variable: |
|
|
The optional name of the Secret from which a value is to be extracted. Mutually exclusive with Environment variable: |
string |
|
The optional name of the ConfigMap from which a value is to be extracted. Mutually exclusive with Environment variable: |
string |
|
The key identifying the field from which the value is extracted. Environment variable: |
string |
required |
The ip address Environment variable: |
string |
|
The hostnames to resolve to the ip Environment variable: |
list of string |
|
Custom annotations to add to exposition (route or ingress) resources Environment variable: |
|
|
The map associating environment variable names to their associated field references they take their value from. Environment variable: |
|
|
The map associating environment name to its associated value. Environment variable: |
|
|
The optional name of the Secret from which a value is to be extracted. Mutually exclusive with Environment variable: |
string |
|
The optional name of the ConfigMap from which a value is to be extracted. Mutually exclusive with Environment variable: |
string |
|
The key identifying the field from which the value is extracted. Environment variable: |
string |
required |
期間フォーマットについて
期間のフォーマットは標準の 数値で始まる期間の値を指定することもできます。この場合、値が数値のみで構成されている場合、コンバーターは値を秒として扱います。そうでない場合は、 |