抱歉,这听起来好像我很懒,但是我已经四处搜寻,但找不到它!
我正在寻找可以解释OpenShift / Kubernetes模板中可能存在的每个字段的参考,例如有什么可能的值。
答案 0 :(得分:2)
您在OpenShift中获得的模板是特定于OpenShift的,而不是Kubernetes的一部分。如果您是指可以为参数指定的每个可能字段的目的,则可以运行oc explain template
。例如:
$ oc explain template.parameters
RESOURCE: parameters <[]Object>
DESCRIPTION:
parameters is an optional array of Parameters used during the Template to
Config transformation.
Parameter defines a name/value variable that is to be processed during the
Template to Config transformation.
FIELDS:
description <string>
Description of a parameter. Optional.
displayName <string>
Optional: The name that will show in UI instead of parameter 'Name'
from <string>
From is an input value for the generator. Optional.
generate <string>
generate specifies the generator to be used to generate random string from
an input value specified by From field. The result string is stored into
Value field. If empty, no generator is being used, leaving the result Value
untouched. Optional. The only supported generator is "expression", which
accepts a "from" value in the form of a simple regular expression
containing the range expression "[a-zA-Z0-9]", and the length expression
"a{length}". Examples: from | value -----------------------------
"test[0-9]{1}x" | "test7x" "[0-1]{8}" | "01001100" "0x[A-F0-9]{4}" |
"0xB3AF" "[a-zA-Z0-9]{8}" | "hW4yQU5i"
name <string> -required-
Name must be set and it can be referenced in Template Items using
${PARAMETER_NAME}. Required.
required <boolean>
Optional: Indicates the parameter must have a value. Defaults to false.
value <string>
Value holds the Parameter data. If specified, the generator will be
ignored. The value replaces all occurrences of the Parameter ${Name}
expression during the Template to Config transformation. Optional.
您可以在以下位置找到更多信息:
如果这不是您的意思,则您需要更具体地说明您的意思。如果您在谈论任何资源对象上的字段(模板是OpenShift中资源对象的特定类型),则可以在其中的任何一个上使用oc explain
,将资源类型的名称作为参数传递,然后使用虚线路径当您遍历字段时。如果使用普通的Kubernetes,则可以使用kubectl explain
。