Class V1FileKeySelector
java.lang.Object
io.kubernetes.client.openapi.models.V1FileKeySelector
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2025-09-11T18:00:16.154662Z[Etc/UTC]",
comments="Generator version: 7.13.0")
public class V1FileKeySelector
extends Object
FileKeySelector selects a key of the env file.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic V1FileKeySelectorCreate an instance of V1FileKeySelector given an JSON stringgetKey()The key within the env file.Specify whether the file or its key must be defined.getPath()The path within the volume from which to select the file.The name of the volume mount containing the env file.inthashCode()voidvoidsetOptional(Boolean optional) voidvoidsetVolumeName(String volumeName) toJson()Convert an instance of V1FileKeySelector to an JSON stringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues foundvolumeName(String volumeName)
-
Field Details
-
SERIALIZED_NAME_KEY
- See Also:
-
SERIALIZED_NAME_OPTIONAL
- See Also:
-
SERIALIZED_NAME_PATH
- See Also:
-
SERIALIZED_NAME_VOLUME_NAME
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
V1FileKeySelector
public V1FileKeySelector()
-
-
Method Details
-
key
-
getKey
The key within the env file. An invalid key will prevent the pod from starting. The keys defined within a source may consist of any printable ASCII characters except '='. During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.- Returns:
- key
-
setKey
-
optional
-
getOptional
Specify whether the file or its key must be defined. If the file or key does not exist, then the env var is not published. If optional is set to true and the specified key does not exist, the environment variable will not be set in the Pod's containers. If optional is set to false and the specified key does not exist, an error will be returned during Pod creation.- Returns:
- optional
-
setOptional
-
path
-
getPath
The path within the volume from which to select the file. Must be relative and may not contain the '..' path or start with '..'.- Returns:
- path
-
setPath
-
volumeName
-
getVolumeName
The name of the volume mount containing the env file.- Returns:
- volumeName
-
setVolumeName
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement- JSON Element- Throws:
IOException- if the JSON Element is invalid with respect to V1FileKeySelector
-
fromJson
Create an instance of V1FileKeySelector given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of V1FileKeySelector
- Throws:
IOException- if the JSON string is invalid with respect to V1FileKeySelector
-
toJson
Convert an instance of V1FileKeySelector to an JSON string- Returns:
- JSON string
-