Metadata

简要概述

TODO;

数据结构

k8s.io/apimachinery/pkg/apis/meta/v1/types.go

TypeMeta

// TypeMeta describes an individual object in an API response or request
// with strings representing the type of the object and its API schema version.
// Structures that are versioned or persisted should inline TypeMeta.
//
// +k8s:deepcopy-gen=false
type TypeMeta struct {
    // 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
    // +optional
    Kind string `json:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"`

    // 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
    // +optional
    APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,2,opt,name=apiVersion"`
}

ObjectMeta

// ObjectMeta is metadata that all persisted resources must have, which includes all objects
// users must create.
type ObjectMeta struct {
    // Name must be unique within a namespace. Is required when creating resources, although
    // some resources may allow a client to request the generation of an appropriate name
    // automatically. Name is primarily intended for creation idempotence and configuration
    // definition.
    // Cannot be updated.
    // More info: http://kubernetes.io/docs/user-guide/identifiers#names
    // +optional
    Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`

    // GenerateName is an optional prefix, used by the server, to generate a unique
    // name ONLY IF the Name field has not been provided.
    // If this field is used, the name returned to the client will be different
    // than the name passed. This value will also be combined with a unique suffix.
    // The provided value has the same validation rules as the Name field,
    // and may be truncated by the length of the suffix required to make the value
    // unique on the server.
    //
    // If this field is specified and the generated name exists, the server will return a 409.
    //
    // Applied only if Name is not specified.
    // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency
    // +optional
    GenerateName string `json:"generateName,omitempty" protobuf:"bytes,2,opt,name=generateName"`

    // Namespace defines the space within which each name must be unique. An empty namespace is
    // equivalent to the "default" namespace, but "default" is the canonical representation.
    // Not all objects are required to be scoped to a namespace - the value of this field for
    // those objects will be empty.
    //
    // Must be a DNS_LABEL.
    // Cannot be updated.
    // More info: http://kubernetes.io/docs/user-guide/namespaces
    // +optional
    Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"`

    // Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.
    // +optional
    SelfLink string `json:"selfLink,omitempty" protobuf:"bytes,4,opt,name=selfLink"`

    // UID is the unique in time and space value for this object. It is typically generated by
    // the server on successful creation of a resource and is not allowed to change on PUT
    // operations.
    //
    // Populated by the system.
    // Read-only.
    // More info: http://kubernetes.io/docs/user-guide/identifiers#uids
    // +optional
    UID types.UID `json:"uid,omitempty" protobuf:"bytes,5,opt,name=uid,casttype=k8s.io/kubernetes/pkg/types.UID"`

    // An opaque value that represents the internal version of this object that can
    // be used by clients to determine when objects have changed. May be used for optimistic
    // concurrency, change detection, and the watch operation on a resource or set of resources.
    // Clients must treat these values as opaque and passed unmodified back to the server.
    // They may only be valid for a particular resource or set of resources.
    //
    // Populated by the system.
    // Read-only.
    // Value must be treated as opaque by clients and .
    // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
    // +optional
    ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,6,opt,name=resourceVersion"`

    // A sequence number representing a specific generation of the desired state.
    // Populated by the system. Read-only.
    // +optional
    Generation int64 `json:"generation,omitempty" protobuf:"varint,7,opt,name=generation"`

    // CreationTimestamp is a timestamp representing the server time when this object was
    // created. It is not guaranteed to be set in happens-before order across separate operations.
    // Clients may not set this value. It is represented in RFC3339 form and is in UTC.
    //
    // Populated by the system.
    // Read-only.
    // Null for lists.
    // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    // +optional
    CreationTimestamp Time `json:"creationTimestamp,omitempty" protobuf:"bytes,8,opt,name=creationTimestamp"`

    // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This
    // field is set by the server when a graceful deletion is requested by the user, and is not
    // directly settable by a client. The resource is expected to be deleted (no longer visible
    // from resource lists, and not reachable by name) after the time in this field, once the
    // finalizers list is empty. As long as the finalizers list contains items, deletion is blocked.
    // Once the deletionTimestamp is set, this value may not be unset or be set further into the
    // future, although it may be shortened or the resource may be deleted prior to this time.
    // For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react
    // by sending a graceful termination signal to the containers in the pod. After that 30 seconds,
    // the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup,
    // remove the pod from the API. In the presence of network partitions, this object may still
    // exist after this timestamp, until an administrator or automated process can determine the
    // resource is fully terminated.
    // If not set, graceful deletion of the object has not been requested.
    //
    // Populated by the system when a graceful deletion is requested.
    // Read-only.
    // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    // +optional
    DeletionTimestamp *Time `json:"deletionTimestamp,omitempty" protobuf:"bytes,9,opt,name=deletionTimestamp"`

    // Number of seconds allowed for this object to gracefully terminate before
    // it will be removed from the system. Only set when deletionTimestamp is also set.
    // May only be shortened.
    // Read-only.
    // +optional
    DeletionGracePeriodSeconds *int64 `json:"deletionGracePeriodSeconds,omitempty" protobuf:"varint,10,opt,name=deletionGracePeriodSeconds"`

    // Map of string keys and values that can be used to organize and categorize
    // (scope and select) objects. May match selectors of replication controllers
    // and services.
    // More info: http://kubernetes.io/docs/user-guide/labels
    // +optional
    Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,11,rep,name=labels"`

    // Annotations is an unstructured key value map stored with a resource that may be
    // set by external tools to store and retrieve arbitrary metadata. They are not
    // queryable and should be preserved when modifying objects.
    // More info: http://kubernetes.io/docs/user-guide/annotations
    // +optional
    Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,12,rep,name=annotations"`

    // List of objects depended by this object. If ALL objects in the list have
    // been deleted, this object will be garbage collected. If this object is managed by a controller,
    // then an entry in this list will point to this controller, with the controller field set to true.
    // There cannot be more than one managing controller.
    // +optional
    // +patchMergeKey=uid
    // +patchStrategy=merge
    OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" patchStrategy:"merge" patchMergeKey:"uid" protobuf:"bytes,13,rep,name=ownerReferences"`

    // Must be empty before the object is deleted from the registry. Each entry
    // is an identifier for the responsible component that will remove the entry
    // from the list. If the deletionTimestamp of the object is non-nil, entries
    // in this list can only be removed.
    // Finalizers may be processed and removed in any order.  Order is NOT enforced
    // because it introduces significant risk of stuck finalizers.
    // finalizers is a shared field, any actor with permission can reorder it.
    // If the finalizer list is processed in order, then this can lead to a situation
    // in which the component responsible for the first finalizer in the list is
    // waiting for a signal (field value, external system, or other) produced by a
    // component responsible for a finalizer later in the list, resulting in a deadlock.
    // Without enforced ordering finalizers are free to order amongst themselves and
    // are not vulnerable to ordering changes in the list.
    // +optional
    // +patchStrategy=merge
    Finalizers []string `json:"finalizers,omitempty" patchStrategy:"merge" protobuf:"bytes,14,rep,name=finalizers"`

    // Tombstone: ClusterName was a legacy field that was always cleared by
    // the system and never used.
    // ClusterName string `json:"clusterName,omitempty" protobuf:"bytes,15,opt,name=clusterName"`

    // ManagedFields maps workflow-id and version to the set of fields
    // that are managed by that workflow. This is mostly for internal
    // housekeeping, and users typically shouldn't need to set or
    // understand this field. A workflow can be the user's name, a
    // controller's name, or the name of a specific apply path like
    // "ci-cd". The set of fields is always in the version that the
    // workflow used when modifying the object.
    //
    // +optional
    ManagedFields []ManagedFieldsEntry `json:"managedFields,omitempty" protobuf:"bytes,17,rep,name=managedFields"`
}

LabelSelector

// Note:
// There are two different styles of label selectors used in versioned types:
// an older style which is represented as just a string in versioned types, and a
// newer style that is structured.  LabelSelector is an internal representation for the
// latter style.

// A label selector is a label query over a set of resources. The result of matchLabels and
// matchExpressions are ANDed. An empty label selector matches all objects. A null
// label selector matches no objects.
// +structType=atomic
type LabelSelector struct {
    // matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
    // map is equivalent to an element of matchExpressions, whose key field is "key", the
    // operator is "In", and the values array contains only "value". The requirements are ANDed.
    // +optional
    MatchLabels map[string]string `json:"matchLabels,omitempty" protobuf:"bytes,1,rep,name=matchLabels"`
    // matchExpressions is a list of label selector requirements. The requirements are ANDed.
    // +optional
    MatchExpressions []LabelSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,2,rep,name=matchExpressions"`
}

LabelSelectorRequirement

// A label selector requirement is a selector that contains values, a key, and an operator that
// relates the key and values.
type LabelSelectorRequirement struct {
    // key is the label key that the selector applies to.
    // +patchMergeKey=key
    // +patchStrategy=merge
    Key string `json:"key" patchStrategy:"merge" patchMergeKey:"key" protobuf:"bytes,1,opt,name=key"`
    // operator represents a key's relationship to a set of values.
    // Valid operators are In, NotIn, Exists and DoesNotExist.
    Operator LabelSelectorOperator `json:"operator" protobuf:"bytes,2,opt,name=operator,casttype=LabelSelectorOperator"`
    // values is an array of string values. If the operator is In or NotIn,
    // the values array must be non-empty. If the operator is Exists or DoesNotExist,
    // the values array must be empty. This array is replaced during a strategic
    // merge patch.
    // +optional
    Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"`
}

// A label selector operator is the set of operators that can be used in a selector requirement.
type LabelSelectorOperator string

const (
    LabelSelectorOpIn           LabelSelectorOperator = "In"
    LabelSelectorOpNotIn        LabelSelectorOperator = "NotIn"
    LabelSelectorOpExists       LabelSelectorOperator = "Exists"
    LabelSelectorOpDoesNotExist LabelSelectorOperator = "DoesNotExist"
)

GroupVersionKind

k8s.io/apimachinery/pkg/apis/meta/v1/group_version.go

// GroupVersionKind unambiguously identifies a kind.  It doesn't anonymously include GroupVersion
// to avoid automatic coercion.  It doesn't use a GroupVersion to avoid custom marshalling
//
// +protobuf.options.(gogoproto.goproto_stringer)=false
type GroupVersionKind struct {
    Group   string `json:"group" protobuf:"bytes,1,opt,name=group"`
    Version string `json:"version" protobuf:"bytes,2,opt,name=version"`
    Kind    string `json:"kind" protobuf:"bytes,3,opt,name=kind"`
}

func (gvk GroupVersionKind) String() string {
    return gvk.Group + "/" + gvk.Version + ", Kind=" + gvk.Kind
}

GroupVersionResource

// GroupVersionResource unambiguously identifies a resource.  It doesn't anonymously include GroupVersion
// to avoid automatic coercion.  It doesn't use a GroupVersion to avoid custom marshalling
//
// +protobuf.options.(gogoproto.goproto_stringer)=false
type GroupVersionResource struct {
    Group    string `json:"group" protobuf:"bytes,1,opt,name=group"`
    Version  string `json:"version" protobuf:"bytes,2,opt,name=version"`
    Resource string `json:"resource" protobuf:"bytes,3,opt,name=resource"`
}

func (gvr *GroupVersionResource) String() string {
    if gvr == nil {
        return "<nil>"
    }
    return strings.Join([]string{gvr.Group, "/", gvr.Version, ", Resource=", gvr.Resource}, "")
}

Status

// Status is a return value for calls that don't return other objects.
type Status struct {
    TypeMeta `json:",inline"`
    // Standard list metadata.
    // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    // +optional
    ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

    // Status of the operation.
    // One of: "Success" or "Failure".
    // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    // +optional
    Status string `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"`
    // A human-readable description of the status of this operation.
    // +optional
    Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"`
    // A machine-readable description of why this operation is in the
    // "Failure" status. If this value is empty there
    // is no information available. A Reason clarifies an HTTP status
    // code but does not override it.
    // +optional
    Reason StatusReason `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason,casttype=StatusReason"`
    // Extended data associated with the reason.  Each reason may define its
    // own extended details. This field is optional and the data returned
    // is not guaranteed to conform to any schema except that defined by
    // the reason type.
    // +optional
    Details *StatusDetails `json:"details,omitempty" protobuf:"bytes,5,opt,name=details"`
    // Suggested HTTP return code for this status, 0 if not set.
    // +optional
    Code int32 `json:"code,omitempty" protobuf:"varint,6,opt,name=code"`
}

StatusReason

// Values of Status.Status
const (
    StatusSuccess = "Success"
    StatusFailure = "Failure"
)

// StatusReason is an enumeration of possible failure causes.  Each StatusReason
// must map to a single HTTP status code, but multiple reasons may map
// to the same HTTP status code.
// TODO: move to apiserver
type StatusReason string

const (
    // StatusReasonUnknown means the server has declined to indicate a specific reason.
    // The details field may contain other information about this error.
    // Status code 500.
    StatusReasonUnknown StatusReason = ""

    // StatusReasonUnauthorized means the server can be reached and understood the request, but requires
    // the user to present appropriate authorization credentials (identified by the WWW-Authenticate header)
    // in order for the action to be completed. If the user has specified credentials on the request, the
    // server considers them insufficient.
    // Status code 401
    StatusReasonUnauthorized StatusReason = "Unauthorized"

    // StatusReasonForbidden means the server can be reached and understood the request, but refuses
    // to take any further action.  It is the result of the server being configured to deny access for some reason
    // to the requested resource by the client.
    // Details (optional):
    //   "kind" string - the kind attribute of the forbidden resource
    //                   on some operations may differ from the requested
    //                   resource.
    //   "id"   string - the identifier of the forbidden resource
    // Status code 403
    StatusReasonForbidden StatusReason = "Forbidden"

    // StatusReasonNotFound means one or more resources required for this operation
    // could not be found.
    // Details (optional):
    //   "kind" string - the kind attribute of the missing resource
    //                   on some operations may differ from the requested
    //                   resource.
    //   "id"   string - the identifier of the missing resource
    // Status code 404
    StatusReasonNotFound StatusReason = "NotFound"

    // StatusReasonAlreadyExists means the resource you are creating already exists.
    // Details (optional):
    //   "kind" string - the kind attribute of the conflicting resource
    //   "id"   string - the identifier of the conflicting resource
    // Status code 409
    StatusReasonAlreadyExists StatusReason = "AlreadyExists"

    // StatusReasonConflict means the requested operation cannot be completed
    // due to a conflict in the operation. The client may need to alter the
    // request. Each resource may define custom details that indicate the
    // nature of the conflict.
    // Status code 409
    StatusReasonConflict StatusReason = "Conflict"

    // StatusReasonGone means the item is no longer available at the server and no
    // forwarding address is known.
    // Status code 410
    StatusReasonGone StatusReason = "Gone"

    // StatusReasonInvalid means the requested create or update operation cannot be
    // completed due to invalid data provided as part of the request. The client may
    // need to alter the request. When set, the client may use the StatusDetails
    // message field as a summary of the issues encountered.
    // Details (optional):
    //   "kind" string - the kind attribute of the invalid resource
    //   "id"   string - the identifier of the invalid resource
    //   "causes"      - one or more StatusCause entries indicating the data in the
    //                   provided resource that was invalid.  The code, message, and
    //                   field attributes will be set.
    // Status code 422
    StatusReasonInvalid StatusReason = "Invalid"

    // StatusReasonServerTimeout means the server can be reached and understood the request,
    // but cannot complete the action in a reasonable time. The client should retry the request.
    // This is may be due to temporary server load or a transient communication issue with
    // another server. Status code 500 is used because the HTTP spec provides no suitable
    // server-requested client retry and the 5xx class represents actionable errors.
    // Details (optional):
    //   "kind" string - the kind attribute of the resource being acted on.
    //   "id"   string - the operation that is being attempted.
    //   "retryAfterSeconds" int32 - the number of seconds before the operation should be retried
    // Status code 500
    StatusReasonServerTimeout StatusReason = "ServerTimeout"

    // StatusReasonTimeout means that the request could not be completed within the given time.
    // Clients can get this response only when they specified a timeout param in the request,
    // or if the server cannot complete the operation within a reasonable amount of time.
    // The request might succeed with an increased value of timeout param. The client *should*
    // wait at least the number of seconds specified by the retryAfterSeconds field.
    // Details (optional):
    //   "retryAfterSeconds" int32 - the number of seconds before the operation should be retried
    // Status code 504
    StatusReasonTimeout StatusReason = "Timeout"

    // StatusReasonTooManyRequests means the server experienced too many requests within a
    // given window and that the client must wait to perform the action again. A client may
    // always retry the request that led to this error, although the client should wait at least
    // the number of seconds specified by the retryAfterSeconds field.
    // Details (optional):
    //   "retryAfterSeconds" int32 - the number of seconds before the operation should be retried
    // Status code 429
    StatusReasonTooManyRequests StatusReason = "TooManyRequests"

    // StatusReasonBadRequest means that the request itself was invalid, because the request
    // doesn't make any sense, for example deleting a read-only object.  This is different than
    // StatusReasonInvalid above which indicates that the API call could possibly succeed, but the
    // data was invalid.  API calls that return BadRequest can never succeed.
    // Status code 400
    StatusReasonBadRequest StatusReason = "BadRequest"

    // StatusReasonMethodNotAllowed means that the action the client attempted to perform on the
    // resource was not supported by the code - for instance, attempting to delete a resource that
    // can only be created. API calls that return MethodNotAllowed can never succeed.
    // Status code 405
    StatusReasonMethodNotAllowed StatusReason = "MethodNotAllowed"

    // StatusReasonNotAcceptable means that the accept types indicated by the client were not acceptable
    // to the server - for instance, attempting to receive protobuf for a resource that supports only json and yaml.
    // API calls that return NotAcceptable can never succeed.
    // Status code 406
    StatusReasonNotAcceptable StatusReason = "NotAcceptable"

    // StatusReasonRequestEntityTooLarge means that the request entity is too large.
    // Status code 413
    StatusReasonRequestEntityTooLarge StatusReason = "RequestEntityTooLarge"

    // StatusReasonUnsupportedMediaType means that the content type sent by the client is not acceptable
    // to the server - for instance, attempting to send protobuf for a resource that supports only json and yaml.
    // API calls that return UnsupportedMediaType can never succeed.
    // Status code 415
    StatusReasonUnsupportedMediaType StatusReason = "UnsupportedMediaType"

    // StatusReasonInternalError indicates that an internal error occurred, it is unexpected
    // and the outcome of the call is unknown.
    // Details (optional):
    //   "causes" - The original error
    // Status code 500
    StatusReasonInternalError StatusReason = "InternalError"

    // StatusReasonExpired indicates that the request is invalid because the content you are requesting
    // has expired and is no longer available. It is typically associated with watches that can't be
    // serviced.
    // Status code 410 (gone)
    StatusReasonExpired StatusReason = "Expired"

    // StatusReasonServiceUnavailable means that the request itself was valid,
    // but the requested service is unavailable at this time.
    // Retrying the request after some time might succeed.
    // Status code 503
    StatusReasonServiceUnavailable StatusReason = "ServiceUnavailable"
)

StatusDetails

// StatusDetails is a set of additional properties that MAY be set by the
// server to provide additional information about a response. The Reason
// field of a Status object defines what attributes will be set. Clients
// must ignore fields that do not match the defined type of each attribute,
// and should assume that any attribute may be empty, invalid, or under
// defined.
type StatusDetails struct {
    // The name attribute of the resource associated with the status StatusReason
    // (when there is a single name which can be described).
    // +optional
    Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
    // The group attribute of the resource associated with the status StatusReason.
    // +optional
    Group string `json:"group,omitempty" protobuf:"bytes,2,opt,name=group"`
    // The kind attribute of the resource associated with the status StatusReason.
    // On some operations may differ from the requested resource Kind.
    // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    // +optional
    Kind string `json:"kind,omitempty" protobuf:"bytes,3,opt,name=kind"`
    // UID of the resource.
    // (when there is a single resource which can be described).
    // More info: http://kubernetes.io/docs/user-guide/identifiers#uids
    // +optional
    UID types.UID `json:"uid,omitempty" protobuf:"bytes,6,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"`
    // The Causes array includes more details associated with the StatusReason
    // failure. Not all StatusReasons may provide detailed causes.
    // +optional
    Causes []StatusCause `json:"causes,omitempty" protobuf:"bytes,4,rep,name=causes"`
    // If specified, the time in seconds before the operation should be retried. Some errors may indicate
    // the client must take an alternate action - for those errors this field may indicate how long to wait
    // before taking the alternate action.
    // +optional
    RetryAfterSeconds int32 `json:"retryAfterSeconds,omitempty" protobuf:"varint,5,opt,name=retryAfterSeconds"`
}

StatusCause

// StatusCause provides more information about an api.Status failure, including
// cases when multiple errors are encountered.
type StatusCause struct {
    // A machine-readable description of the cause of the error. If this value is
    // empty there is no information available.
    // +optional
    Type CauseType `json:"reason,omitempty" protobuf:"bytes,1,opt,name=reason,casttype=CauseType"`
    // A human-readable description of the cause of the error.  This field may be
    // presented as-is to a reader.
    // +optional
    Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"`
    // The field of the resource that has caused this error, as named by its JSON
    // serialization. May include dot and postfix notation for nested attributes.
    // Arrays are zero-indexed.  Fields may appear more than once in an array of
    // causes due to fields having multiple errors.
    // Optional.
    //
    // Examples:
    //   "name" - the field "name" on the current resource
    //   "items[0].name" - the field "name" on the first array entry in "items"
    // +optional
    Field string `json:"field,omitempty" protobuf:"bytes,3,opt,name=field"`
}

CauseType

// CauseType is a machine readable value providing more detail about what
// occurred in a status response. An operation may have multiple causes for a
// status (whether Failure or Success).
type CauseType string

const (
    // CauseTypeFieldValueNotFound is used to report failure to find a requested value
    // (e.g. looking up an ID).
    CauseTypeFieldValueNotFound CauseType = "FieldValueNotFound"
    // CauseTypeFieldValueRequired is used to report required values that are not
    // provided (e.g. empty strings, null values, or empty arrays).
    CauseTypeFieldValueRequired CauseType = "FieldValueRequired"
    // CauseTypeFieldValueDuplicate is used to report collisions of values that must be
    // unique (e.g. unique IDs).
    CauseTypeFieldValueDuplicate CauseType = "FieldValueDuplicate"
    // CauseTypeFieldValueInvalid is used to report malformed values (e.g. failed regex
    // match).
    CauseTypeFieldValueInvalid CauseType = "FieldValueInvalid"
    // CauseTypeFieldValueNotSupported is used to report valid (as per formatting rules)
    // values that can not be handled (e.g. an enumerated string).
    CauseTypeFieldValueNotSupported CauseType = "FieldValueNotSupported"
    // CauseTypeUnexpectedServerResponse is used to report when the server responded to the client
    // without the expected return type. The presence of this cause indicates the error may be
    // due to an intervening proxy or the server software malfunctioning.
    CauseTypeUnexpectedServerResponse CauseType = "UnexpectedServerResponse"
    // FieldManagerConflict is used to report when another client claims to manage this field,
    // It should only be returned for a request using server-side apply.
    CauseTypeFieldManagerConflict CauseType = "FieldManagerConflict"
    // CauseTypeResourceVersionTooLarge is used to report that the requested resource version
    // is newer than the data observed by the API server, so the request cannot be served.
    CauseTypeResourceVersionTooLarge CauseType = "ResourceVersionTooLarge"
)