Class V1ServiceAccount
java.lang.Object
io.kubernetes.client.openapi.models.V1ServiceAccount
- All Implemented Interfaces:
KubernetesObject
,KubernetesType
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2024-02-02T17:56:12.287571Z[Etc/UTC]")
public class V1ServiceAccount
extends Object
implements KubernetesObject
ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddImagePullSecretsItem
(V1LocalObjectReference imagePullSecretsItem) addSecretsItem
(V1ObjectReference secretsItem) apiVersion
(String apiVersion) automountServiceAccountToken
(Boolean automountServiceAccountToken) boolean
static V1ServiceAccount
Create an instance of V1ServiceAccount given an JSON stringAPIVersion defines the versioned schema of this representation of an object.AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted.ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount.getKind()
Kind is a string value representing the REST resource this object represents.Get metadataSecrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use.int
hashCode()
imagePullSecrets
(List<V1LocalObjectReference> imagePullSecrets) metadata
(V1ObjectMeta metadata) secrets
(List<V1ObjectReference> secrets) void
setApiVersion
(String apiVersion) void
setAutomountServiceAccountToken
(Boolean automountServiceAccountToken) void
setImagePullSecrets
(List<V1LocalObjectReference> imagePullSecrets) void
void
setMetadata
(V1ObjectMeta metadata) void
setSecrets
(List<V1ObjectReference> secrets) toJson()
Convert an instance of V1ServiceAccount to an JSON stringtoString()
static void
validateJsonObject
(com.google.gson.JsonObject jsonObj) Validates the JSON Object and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_API_VERSION
- See Also:
-
SERIALIZED_NAME_AUTOMOUNT_SERVICE_ACCOUNT_TOKEN
- See Also:
-
SERIALIZED_NAME_IMAGE_PULL_SECRETS
- See Also:
-
SERIALIZED_NAME_KIND
- See Also:
-
SERIALIZED_NAME_METADATA
- See Also:
-
SERIALIZED_NAME_SECRETS
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
V1ServiceAccount
public V1ServiceAccount()
-
-
Method Details
-
apiVersion
-
getApiVersion
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources- Specified by:
getApiVersion
in interfaceKubernetesType
- Returns:
- apiVersion
-
setApiVersion
-
automountServiceAccountToken
-
getAutomountServiceAccountToken
AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level.- Returns:
- automountServiceAccountToken
-
setAutomountServiceAccountToken
-
imagePullSecrets
-
addImagePullSecretsItem
-
getImagePullSecrets
ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod- Returns:
- imagePullSecrets
-
setImagePullSecrets
-
kind
-
getKind
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds- Specified by:
getKind
in interfaceKubernetesType
- Returns:
- kind
-
setKind
-
metadata
-
getMetadata
Get metadata- Specified by:
getMetadata
in interfaceKubernetesObject
- Returns:
- metadata
-
setMetadata
-
secrets
-
addSecretsItem
-
getSecrets
Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. Pods are only limited to this list if this service account has a \"kubernetes.io/enforce-mountable-secrets\" annotation set to \"true\". This field should not be used to find auto-generated service account token secrets for use outside of pods. Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. More info: https://kubernetes.io/docs/concepts/configuration/secret- Returns:
- secrets
-
setSecrets
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonObject
Validates the JSON Object and throws an exception if issues found- Parameters:
jsonObj
- JSON Object- Throws:
IOException
- if the JSON Object is invalid with respect to V1ServiceAccount
-
fromJson
Create an instance of V1ServiceAccount given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of V1ServiceAccount
- Throws:
IOException
- if the JSON string is invalid with respect to V1ServiceAccount
-
toJson
Convert an instance of V1ServiceAccount to an JSON string- Returns:
- JSON string
-