// AUTOGENERATED from the Kubernetes OpenAPI specification. DO NOT MODIFY. // Kubernetes version: v1.8.0 // SHA of ksonnet-lib HEAD: 8ce7ccb863d6e8f899bfd5a307694dc356b15f76 // SHA of Kubernetes HEAD OpenAPI spec is generated from: 0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4 { admissionregistration:: { v1alpha1:: { local apiVersion = {apiVersion: "admissionregistration.k8s.io/v1alpha1"}, // ExternalAdmissionHookConfiguration describes the configuration of initializers. externalAdmissionHookConfiguration:: { local kind = {kind: "ExternalAdmissionHookConfiguration"}, new():: apiVersion + kind, // ExternalAdmissionHooks is a list of external admission webhooks and the affected resources and operations. withExternalAdmissionHooks(externalAdmissionHooks):: self + if std.type(externalAdmissionHooks) == "array" then {externalAdmissionHooks: externalAdmissionHooks} else {externalAdmissionHooks: [externalAdmissionHooks]}, // ExternalAdmissionHooks is a list of external admission webhooks and the affected resources and operations. withExternalAdmissionHooksMixin(externalAdmissionHooks):: self + if std.type(externalAdmissionHooks) == "array" then {externalAdmissionHooks+: externalAdmissionHooks} else {externalAdmissionHooks+: [externalAdmissionHooks]}, externalAdmissionHooksType:: hidden.admissionregistration.v1alpha1.externalAdmissionHook, mixin:: { // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, }, }, // ExternalAdmissionHookConfigurationList is a list of ExternalAdmissionHookConfiguration. externalAdmissionHookConfigurationList:: { local kind = {kind: "ExternalAdmissionHookConfigurationList"}, new(items):: apiVersion + kind + self.withItems(items), // List of ExternalAdmissionHookConfiguration. withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // List of ExternalAdmissionHookConfiguration. withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.admissionregistration.v1alpha1.externalAdmissionHookConfiguration, mixin:: { }, }, // InitializerConfiguration describes the configuration of initializers. initializerConfiguration:: { local kind = {kind: "InitializerConfiguration"}, new():: apiVersion + kind, // Initializers is a list of resources and their default initializers Order-sensitive. When merging multiple InitializerConfigurations, we sort the initializers from different InitializerConfigurations by the name of the InitializerConfigurations; the order of the initializers from the same InitializerConfiguration is preserved. withInitializers(initializers):: self + if std.type(initializers) == "array" then {initializers: initializers} else {initializers: [initializers]}, // Initializers is a list of resources and their default initializers Order-sensitive. When merging multiple InitializerConfigurations, we sort the initializers from different InitializerConfigurations by the name of the InitializerConfigurations; the order of the initializers from the same InitializerConfiguration is preserved. withInitializersMixin(initializers):: self + if std.type(initializers) == "array" then {initializers+: initializers} else {initializers+: [initializers]}, initializersType:: hidden.admissionregistration.v1alpha1.initializer, mixin:: { // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, }, }, // InitializerConfigurationList is a list of InitializerConfiguration. initializerConfigurationList:: { local kind = {kind: "InitializerConfigurationList"}, new(items):: apiVersion + kind + self.withItems(items), // List of InitializerConfiguration. withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // List of InitializerConfiguration. withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.admissionregistration.v1alpha1.initializerConfiguration, mixin:: { }, }, }, }, apps:: { v1beta1:: { local apiVersion = {apiVersion: "apps/v1beta1"}, // DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1beta2/ControllerRevision. See the release notes for more information. ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers. controllerRevision:: { local kind = {kind: "ControllerRevision"}, new():: apiVersion + kind, // Revision indicates the revision of the state represented by Data. withRevision(revision):: self + {revision: revision}, mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, }, }, // ControllerRevisionList is a resource containing a list of ControllerRevision objects. controllerRevisionList:: { local kind = {kind: "ControllerRevisionList"}, new(items):: apiVersion + kind + self.withItems(items), // Items is the list of ControllerRevisions withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is the list of ControllerRevisions withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.apps.v1beta1.controllerRevision, mixin:: { }, }, // DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets. deployment:: { local kind = {kind: "Deployment"}, new(name, replicas, containers, podLabels={app: name}):: apiVersion + kind + self.mixin.metadata.withName(name) + self.mixin.spec.withReplicas(replicas) + self.mixin.spec.template.spec.withContainers(containers) + self.mixin.spec.template.metadata.withLabels(podLabels), mixin:: { // Standard object metadata. metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the Deployment. spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) withMinReadySeconds(minReadySeconds):: self + __specMixin({minReadySeconds: minReadySeconds}), // Indicates that the deployment is paused. withPaused(paused):: self + __specMixin({paused: paused}), // The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s. withProgressDeadlineSeconds(progressDeadlineSeconds):: self + __specMixin({progressDeadlineSeconds: progressDeadlineSeconds}), // Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. withReplicas(replicas):: self + __specMixin({replicas: replicas}), // The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 2. withRevisionHistoryLimit(revisionHistoryLimit):: self + __specMixin({revisionHistoryLimit: revisionHistoryLimit}), // DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done. rollbackTo:: { local __rollbackToMixin(rollbackTo) = __specMixin({rollbackTo+: rollbackTo}), mixinInstance(rollbackTo):: __rollbackToMixin(rollbackTo), // The revision to rollback to. If set to 0, rollback to the last revision. withRevision(revision):: self + __rollbackToMixin({revision: revision}), }, rollbackToType:: hidden.apps.v1beta1.rollbackConfig, // Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. selector:: { local __selectorMixin(selector) = __specMixin({selector+: selector}), mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // The deployment strategy to use to replace existing pods with new ones. strategy:: { local __strategyMixin(strategy) = __specMixin({strategy+: strategy}), mixinInstance(strategy):: __strategyMixin(strategy), // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. rollingUpdate:: { local __rollingUpdateMixin(rollingUpdate) = __strategyMixin({rollingUpdate+: rollingUpdate}), mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), // The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. withMaxSurge(maxSurge):: __rollingUpdateMixin({maxSurge: maxSurge}), // The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), }, rollingUpdateType:: hidden.apps.v1beta1.rollingUpdateDeployment, // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. withType(type):: self + __strategyMixin({type: type}), }, strategyType:: hidden.apps.v1beta1.deploymentStrategy, // Template describes the pods that will be created. template:: { local __templateMixin(template) = __specMixin({template+: template}), mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, }, specType:: hidden.apps.v1beta1.deploymentSpec, }, }, // DeploymentList is a list of Deployments. deploymentList:: { local kind = {kind: "DeploymentList"}, new(items):: apiVersion + kind + self.withItems(items), // Items is the list of Deployments. withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is the list of Deployments. withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.apps.v1beta1.deployment, mixin:: { }, }, // DEPRECATED. DeploymentRollback stores the information required to rollback a deployment. deploymentRollback:: { local kind = {kind: "DeploymentRollback"}, new(name):: apiVersion + kind + self.withName(name), // Required: This must match the Name of a deployment. withName(name):: self + {name: name}, // The annotations to be updated to a deployment withUpdatedAnnotations(updatedAnnotations):: self + {updatedAnnotations: updatedAnnotations}, // The annotations to be updated to a deployment withUpdatedAnnotationsMixin(updatedAnnotations):: self + {updatedAnnotations+: updatedAnnotations}, mixin:: { // The config of this deployment rollback. rollbackTo:: { local __rollbackToMixin(rollbackTo) = {rollbackTo+: rollbackTo}, mixinInstance(rollbackTo):: __rollbackToMixin(rollbackTo), // The revision to rollback to. If set to 0, rollback to the last revision. withRevision(revision):: self + __rollbackToMixin({revision: revision}), }, rollbackToType:: hidden.apps.v1beta1.rollbackConfig, }, }, // Scale represents a scaling request for a resource. scale:: { local kind = {kind: "Scale"}, new(replicas):: apiVersion + kind + self.mixin.spec.withReplicas(replicas), mixin:: { // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // desired number of instances for the scaled object. withReplicas(replicas):: self + __specMixin({replicas: replicas}), }, specType:: hidden.apps.v1beta1.scaleSpec, }, }, // DEPRECATED - This group version of StatefulSet is deprecated by apps/v1beta2/StatefulSet. See the release notes for more information. StatefulSet represents a set of pods with consistent identities. Identities are defined as: // - Network: A single stable DNS and hostname. // - Storage: As many VolumeClaims as requested. // The StatefulSet guarantees that a given network identity will always map to the same storage identity. statefulSet:: { local kind = {kind: "StatefulSet"}, new(name, replicas, containers, volumeClaims, podLabels={app: name}):: apiVersion + kind + self.mixin.metadata.withName(name) + self.mixin.spec.withReplicas(replicas) + self.mixin.spec.template.spec.withContainers(containers) + self.mixin.spec.withVolumeClaimTemplates(volumeClaims) + self.mixin.spec.template.metadata.withLabels(podLabels), mixin:: { // metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Spec defines the desired identities of pods in this set. spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once. withPodManagementPolicy(podManagementPolicy):: self + __specMixin({podManagementPolicy: podManagementPolicy}), // replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1. withReplicas(replicas):: self + __specMixin({replicas: replicas}), // revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10. withRevisionHistoryLimit(revisionHistoryLimit):: self + __specMixin({revisionHistoryLimit: revisionHistoryLimit}), // selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors selector:: { local __selectorMixin(selector) = __specMixin({selector+: selector}), mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where "pod-specific-string" is managed by the StatefulSet controller. withServiceName(serviceName):: self + __specMixin({serviceName: serviceName}), // template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet. template:: { local __templateMixin(template) = __specMixin({template+: template}), mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, // updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. updateStrategy:: { local __updateStrategyMixin(updateStrategy) = __specMixin({updateStrategy+: updateStrategy}), mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. rollingUpdate:: { local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({rollingUpdate+: rollingUpdate}), mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), // Partition indicates the ordinal at which the StatefulSet should be partitioned. withPartition(partition):: self + __rollingUpdateMixin({partition: partition}), }, rollingUpdateType:: hidden.apps.v1beta1.rollingUpdateStatefulSetStrategy, // Type indicates the type of the StatefulSetUpdateStrategy. withType(type):: self + __updateStrategyMixin({type: type}), }, updateStrategyType:: hidden.apps.v1beta1.statefulSetUpdateStrategy, // volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name. withVolumeClaimTemplates(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == "array" then __specMixin({volumeClaimTemplates: volumeClaimTemplates}) else __specMixin({volumeClaimTemplates: [volumeClaimTemplates]}), // volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name. withVolumeClaimTemplatesMixin(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == "array" then __specMixin({volumeClaimTemplates+: volumeClaimTemplates}) else __specMixin({volumeClaimTemplates+: [volumeClaimTemplates]}), volumeClaimTemplatesType:: hidden.core.v1.persistentVolumeClaim, }, specType:: hidden.apps.v1beta1.statefulSetSpec, }, }, // StatefulSetList is a collection of StatefulSets. statefulSetList:: { local kind = {kind: "StatefulSetList"}, new(items):: apiVersion + kind + self.withItems(items), // withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.apps.v1beta1.statefulSet, mixin:: { }, }, }, v1beta2:: { local apiVersion = {apiVersion: "apps/v1beta2"}, // ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers. controllerRevision:: { local kind = {kind: "ControllerRevision"}, new():: apiVersion + kind, // Revision indicates the revision of the state represented by Data. withRevision(revision):: self + {revision: revision}, mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, }, }, // ControllerRevisionList is a resource containing a list of ControllerRevision objects. controllerRevisionList:: { local kind = {kind: "ControllerRevisionList"}, new(items):: apiVersion + kind + self.withItems(items), // Items is the list of ControllerRevisions withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is the list of ControllerRevisions withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.apps.v1beta2.controllerRevision, mixin:: { }, }, // DaemonSet represents the configuration of a daemon set. daemonSet:: { local kind = {kind: "DaemonSet"}, new():: apiVersion + kind, mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready). withMinReadySeconds(minReadySeconds):: self + __specMixin({minReadySeconds: minReadySeconds}), // The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. withRevisionHistoryLimit(revisionHistoryLimit):: self + __specMixin({revisionHistoryLimit: revisionHistoryLimit}), // A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors selector:: { local __selectorMixin(selector) = __specMixin({selector+: selector}), mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template template:: { local __templateMixin(template) = __specMixin({template+: template}), mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, // An update strategy to replace existing DaemonSet pods with new pods. updateStrategy:: { local __updateStrategyMixin(updateStrategy) = __specMixin({updateStrategy+: updateStrategy}), mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), // Rolling update config params. Present only if type = "RollingUpdate". rollingUpdate:: { local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({rollingUpdate+: rollingUpdate}), mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), // The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), }, rollingUpdateType:: hidden.apps.v1beta2.rollingUpdateDaemonSet, // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate. withType(type):: self + __updateStrategyMixin({type: type}), }, updateStrategyType:: hidden.apps.v1beta2.daemonSetUpdateStrategy, }, specType:: hidden.apps.v1beta2.daemonSetSpec, }, }, // DaemonSetList is a collection of daemon sets. daemonSetList:: { local kind = {kind: "DaemonSetList"}, new(items):: apiVersion + kind + self.withItems(items), // A list of daemon sets. withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // A list of daemon sets. withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.apps.v1beta2.daemonSet, mixin:: { }, }, // Deployment enables declarative updates for Pods and ReplicaSets. deployment:: { local kind = {kind: "Deployment"}, new(name, replicas, containers, podLabels={app: name}):: apiVersion + kind + self.mixin.metadata.withName(name) + self.mixin.spec.withReplicas(replicas) + self.mixin.spec.template.spec.withContainers(containers) + self.mixin.spec.template.metadata.withLabels(podLabels), mixin:: { // Standard object metadata. metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the Deployment. spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) withMinReadySeconds(minReadySeconds):: self + __specMixin({minReadySeconds: minReadySeconds}), // Indicates that the deployment is paused. withPaused(paused):: self + __specMixin({paused: paused}), // The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s. withProgressDeadlineSeconds(progressDeadlineSeconds):: self + __specMixin({progressDeadlineSeconds: progressDeadlineSeconds}), // Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. withReplicas(replicas):: self + __specMixin({replicas: replicas}), // The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. withRevisionHistoryLimit(revisionHistoryLimit):: self + __specMixin({revisionHistoryLimit: revisionHistoryLimit}), // Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. selector:: { local __selectorMixin(selector) = __specMixin({selector+: selector}), mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // The deployment strategy to use to replace existing pods with new ones. strategy:: { local __strategyMixin(strategy) = __specMixin({strategy+: strategy}), mixinInstance(strategy):: __strategyMixin(strategy), // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. rollingUpdate:: { local __rollingUpdateMixin(rollingUpdate) = __strategyMixin({rollingUpdate+: rollingUpdate}), mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), // The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. withMaxSurge(maxSurge):: __rollingUpdateMixin({maxSurge: maxSurge}), // The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), }, rollingUpdateType:: hidden.apps.v1beta2.rollingUpdateDeployment, // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. withType(type):: self + __strategyMixin({type: type}), }, strategyType:: hidden.apps.v1beta2.deploymentStrategy, // Template describes the pods that will be created. template:: { local __templateMixin(template) = __specMixin({template+: template}), mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, }, specType:: hidden.apps.v1beta2.deploymentSpec, }, }, // DeploymentList is a list of Deployments. deploymentList:: { local kind = {kind: "DeploymentList"}, new(items):: apiVersion + kind + self.withItems(items), // Items is the list of Deployments. withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is the list of Deployments. withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.apps.v1beta2.deployment, mixin:: { }, }, // ReplicaSet represents the configuration of a ReplicaSet. replicaSet:: { local kind = {kind: "ReplicaSet"}, new():: apiVersion + kind, mixin:: { // If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) withMinReadySeconds(minReadySeconds):: self + __specMixin({minReadySeconds: minReadySeconds}), // Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller withReplicas(replicas):: self + __specMixin({replicas: replicas}), // Selector is a label query over pods that should match the replica count. If the selector is empty, it is defaulted to the labels present on the pod template. Label keys and values that must match in order to be controlled by this replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors selector:: { local __selectorMixin(selector) = __specMixin({selector+: selector}), mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template template:: { local __templateMixin(template) = __specMixin({template+: template}), mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, }, specType:: hidden.apps.v1beta2.replicaSetSpec, }, }, // ReplicaSetList is a collection of ReplicaSets. replicaSetList:: { local kind = {kind: "ReplicaSetList"}, new(items):: apiVersion + kind + self.withItems(items), // List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.apps.v1beta2.replicaSet, mixin:: { }, }, // Scale represents a scaling request for a resource. scale:: { local kind = {kind: "Scale"}, new(replicas):: apiVersion + kind + self.mixin.spec.withReplicas(replicas), mixin:: { // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // desired number of instances for the scaled object. withReplicas(replicas):: self + __specMixin({replicas: replicas}), }, specType:: hidden.apps.v1beta2.scaleSpec, }, }, // StatefulSet represents a set of pods with consistent identities. Identities are defined as: // - Network: A single stable DNS and hostname. // - Storage: As many VolumeClaims as requested. // The StatefulSet guarantees that a given network identity will always map to the same storage identity. statefulSet:: { local kind = {kind: "StatefulSet"}, new(name, replicas, containers, volumeClaims, podLabels={app: name}):: apiVersion + kind + self.mixin.metadata.withName(name) + self.mixin.spec.withReplicas(replicas) + self.mixin.spec.template.spec.withContainers(containers) + self.mixin.spec.withVolumeClaimTemplates(volumeClaims) + self.mixin.spec.template.metadata.withLabels(podLabels), mixin:: { // metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Spec defines the desired identities of pods in this set. spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once. withPodManagementPolicy(podManagementPolicy):: self + __specMixin({podManagementPolicy: podManagementPolicy}), // replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1. withReplicas(replicas):: self + __specMixin({replicas: replicas}), // revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10. withRevisionHistoryLimit(revisionHistoryLimit):: self + __specMixin({revisionHistoryLimit: revisionHistoryLimit}), // selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors selector:: { local __selectorMixin(selector) = __specMixin({selector+: selector}), mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where "pod-specific-string" is managed by the StatefulSet controller. withServiceName(serviceName):: self + __specMixin({serviceName: serviceName}), // template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet. template:: { local __templateMixin(template) = __specMixin({template+: template}), mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, // updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. updateStrategy:: { local __updateStrategyMixin(updateStrategy) = __specMixin({updateStrategy+: updateStrategy}), mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. rollingUpdate:: { local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({rollingUpdate+: rollingUpdate}), mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), // Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0. withPartition(partition):: self + __rollingUpdateMixin({partition: partition}), }, rollingUpdateType:: hidden.apps.v1beta2.rollingUpdateStatefulSetStrategy, // Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate. withType(type):: self + __updateStrategyMixin({type: type}), }, updateStrategyType:: hidden.apps.v1beta2.statefulSetUpdateStrategy, // volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name. withVolumeClaimTemplates(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == "array" then __specMixin({volumeClaimTemplates: volumeClaimTemplates}) else __specMixin({volumeClaimTemplates: [volumeClaimTemplates]}), // volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name. withVolumeClaimTemplatesMixin(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == "array" then __specMixin({volumeClaimTemplates+: volumeClaimTemplates}) else __specMixin({volumeClaimTemplates+: [volumeClaimTemplates]}), volumeClaimTemplatesType:: hidden.core.v1.persistentVolumeClaim, }, specType:: hidden.apps.v1beta2.statefulSetSpec, }, }, // StatefulSetList is a collection of StatefulSets. statefulSetList:: { local kind = {kind: "StatefulSetList"}, new(items):: apiVersion + kind + self.withItems(items), // withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.apps.v1beta2.statefulSet, mixin:: { }, }, }, }, authentication:: { v1:: { local apiVersion = {apiVersion: "authentication.k8s.io/v1"}, // TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver. tokenReview:: { local kind = {kind: "TokenReview"}, new(token):: apiVersion + kind + self.mixin.spec.withToken(token), mixin:: { // metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Spec holds information about the request being evaluated spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // Token is the opaque bearer token. withToken(token):: self + __specMixin({token: token}), }, specType:: hidden.authentication.v1.tokenReviewSpec, }, }, }, v1beta1:: { local apiVersion = {apiVersion: "authentication.k8s.io/v1beta1"}, // TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver. tokenReview:: { local kind = {kind: "TokenReview"}, new(token):: apiVersion + kind + self.mixin.spec.withToken(token), mixin:: { // metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Spec holds information about the request being evaluated spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // Token is the opaque bearer token. withToken(token):: self + __specMixin({token: token}), }, specType:: hidden.authentication.v1beta1.tokenReviewSpec, }, }, }, }, authorization:: { v1:: { local apiVersion = {apiVersion: "authorization.k8s.io/v1"}, // LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking. localSubjectAccessReview:: { local kind = {kind: "LocalSubjectAccessReview"}, new():: apiVersion + kind, mixin:: { // metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted. spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. withExtra(extra):: self + __specMixin({extra: extra}), // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. withExtraMixin(extra):: self + __specMixin({extra+: extra}), // Groups is the groups you're testing for. withGroups(groups):: self + if std.type(groups) == "array" then __specMixin({groups: groups}) else __specMixin({groups: [groups]}), // Groups is the groups you're testing for. withGroupsMixin(groups):: self + if std.type(groups) == "array" then __specMixin({groups+: groups}) else __specMixin({groups+: [groups]}), // NonResourceAttributes describes information for a non-resource access request nonResourceAttributes:: { local __nonResourceAttributesMixin(nonResourceAttributes) = __specMixin({nonResourceAttributes+: nonResourceAttributes}), mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), // Path is the URL path of the request withPath(path):: self + __nonResourceAttributesMixin({path: path}), // Verb is the standard HTTP verb withVerb(verb):: self + __nonResourceAttributesMixin({verb: verb}), }, nonResourceAttributesType:: hidden.authorization.v1.nonResourceAttributes, // ResourceAuthorizationAttributes describes information for a resource access request resourceAttributes:: { local __resourceAttributesMixin(resourceAttributes) = __specMixin({resourceAttributes+: resourceAttributes}), mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), // Group is the API Group of the Resource. "*" means all. withGroup(group):: self + __resourceAttributesMixin({group: group}), // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. withName(name):: self + __resourceAttributesMixin({name: name}), // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces "" (empty) is defaulted for LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped resources "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview withNamespace(namespace):: self + __resourceAttributesMixin({namespace: namespace}), // Resource is one of the existing resource types. "*" means all. withResource(resource):: self + __resourceAttributesMixin({resource: resource}), // Subresource is one of the existing resource types. "" means none. withSubresource(subresource):: self + __resourceAttributesMixin({subresource: subresource}), // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. withVerb(verb):: self + __resourceAttributesMixin({verb: verb}), // Version is the API Version of the Resource. "*" means all. withVersion(version):: self + __resourceAttributesMixin({version: version}), }, resourceAttributesType:: hidden.authorization.v1.resourceAttributes, // UID information about the requesting user. withUid(uid):: self + __specMixin({uid: uid}), // User is the user you're testing for. If you specify "User" but not "Groups", then is it interpreted as "What if User were not a member of any groups withUser(user):: self + __specMixin({user: user}), }, specType:: hidden.authorization.v1.subjectAccessReviewSpec, }, }, // SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means "in all namespaces". Self is a special case, because users should always be able to check whether they can perform an action selfSubjectAccessReview:: { local kind = {kind: "SelfSubjectAccessReview"}, new():: apiVersion + kind, mixin:: { // metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Spec holds information about the request being evaluated. user and groups must be empty spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // NonResourceAttributes describes information for a non-resource access request nonResourceAttributes:: { local __nonResourceAttributesMixin(nonResourceAttributes) = __specMixin({nonResourceAttributes+: nonResourceAttributes}), mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), // Path is the URL path of the request withPath(path):: self + __nonResourceAttributesMixin({path: path}), // Verb is the standard HTTP verb withVerb(verb):: self + __nonResourceAttributesMixin({verb: verb}), }, nonResourceAttributesType:: hidden.authorization.v1.nonResourceAttributes, // ResourceAuthorizationAttributes describes information for a resource access request resourceAttributes:: { local __resourceAttributesMixin(resourceAttributes) = __specMixin({resourceAttributes+: resourceAttributes}), mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), // Group is the API Group of the Resource. "*" means all. withGroup(group):: self + __resourceAttributesMixin({group: group}), // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. withName(name):: self + __resourceAttributesMixin({name: name}), // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces "" (empty) is defaulted for LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped resources "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview withNamespace(namespace):: self + __resourceAttributesMixin({namespace: namespace}), // Resource is one of the existing resource types. "*" means all. withResource(resource):: self + __resourceAttributesMixin({resource: resource}), // Subresource is one of the existing resource types. "" means none. withSubresource(subresource):: self + __resourceAttributesMixin({subresource: subresource}), // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. withVerb(verb):: self + __resourceAttributesMixin({verb: verb}), // Version is the API Version of the Resource. "*" means all. withVersion(version):: self + __resourceAttributesMixin({version: version}), }, resourceAttributesType:: hidden.authorization.v1.resourceAttributes, }, specType:: hidden.authorization.v1.selfSubjectAccessReviewSpec, }, }, // SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. The returned list of actions may be incomplete depending on the server's authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server. selfSubjectRulesReview:: { local kind = {kind: "SelfSubjectRulesReview"}, new():: apiVersion + kind, mixin:: { // metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Spec holds information about the request being evaluated. spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // Namespace to evaluate rules for. Required. withNamespace(namespace):: self + __specMixin({namespace: namespace}), }, specType:: hidden.authorization.v1.selfSubjectRulesReviewSpec, }, }, // SubjectAccessReview checks whether or not a user or group can perform an action. subjectAccessReview:: { local kind = {kind: "SubjectAccessReview"}, new():: apiVersion + kind, mixin:: { // metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Spec holds information about the request being evaluated spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. withExtra(extra):: self + __specMixin({extra: extra}), // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. withExtraMixin(extra):: self + __specMixin({extra+: extra}), // Groups is the groups you're testing for. withGroups(groups):: self + if std.type(groups) == "array" then __specMixin({groups: groups}) else __specMixin({groups: [groups]}), // Groups is the groups you're testing for. withGroupsMixin(groups):: self + if std.type(groups) == "array" then __specMixin({groups+: groups}) else __specMixin({groups+: [groups]}), // NonResourceAttributes describes information for a non-resource access request nonResourceAttributes:: { local __nonResourceAttributesMixin(nonResourceAttributes) = __specMixin({nonResourceAttributes+: nonResourceAttributes}), mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), // Path is the URL path of the request withPath(path):: self + __nonResourceAttributesMixin({path: path}), // Verb is the standard HTTP verb withVerb(verb):: self + __nonResourceAttributesMixin({verb: verb}), }, nonResourceAttributesType:: hidden.authorization.v1.nonResourceAttributes, // ResourceAuthorizationAttributes describes information for a resource access request resourceAttributes:: { local __resourceAttributesMixin(resourceAttributes) = __specMixin({resourceAttributes+: resourceAttributes}), mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), // Group is the API Group of the Resource. "*" means all. withGroup(group):: self + __resourceAttributesMixin({group: group}), // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. withName(name):: self + __resourceAttributesMixin({name: name}), // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces "" (empty) is defaulted for LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped resources "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview withNamespace(namespace):: self + __resourceAttributesMixin({namespace: namespace}), // Resource is one of the existing resource types. "*" means all. withResource(resource):: self + __resourceAttributesMixin({resource: resource}), // Subresource is one of the existing resource types. "" means none. withSubresource(subresource):: self + __resourceAttributesMixin({subresource: subresource}), // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. withVerb(verb):: self + __resourceAttributesMixin({verb: verb}), // Version is the API Version of the Resource. "*" means all. withVersion(version):: self + __resourceAttributesMixin({version: version}), }, resourceAttributesType:: hidden.authorization.v1.resourceAttributes, // UID information about the requesting user. withUid(uid):: self + __specMixin({uid: uid}), // User is the user you're testing for. If you specify "User" but not "Groups", then is it interpreted as "What if User were not a member of any groups withUser(user):: self + __specMixin({user: user}), }, specType:: hidden.authorization.v1.subjectAccessReviewSpec, }, }, }, v1beta1:: { local apiVersion = {apiVersion: "authorization.k8s.io/v1beta1"}, // LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking. localSubjectAccessReview:: { local kind = {kind: "LocalSubjectAccessReview"}, new():: apiVersion + kind, mixin:: { // metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted. spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. withExtra(extra):: self + __specMixin({extra: extra}), // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. withExtraMixin(extra):: self + __specMixin({extra+: extra}), // Groups is the groups you're testing for. withGroup(group):: self + if std.type(group) == "array" then __specMixin({group: group}) else __specMixin({group: [group]}), // Groups is the groups you're testing for. withGroupMixin(group):: self + if std.type(group) == "array" then __specMixin({group+: group}) else __specMixin({group+: [group]}), // NonResourceAttributes describes information for a non-resource access request nonResourceAttributes:: { local __nonResourceAttributesMixin(nonResourceAttributes) = __specMixin({nonResourceAttributes+: nonResourceAttributes}), mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), // Path is the URL path of the request withPath(path):: self + __nonResourceAttributesMixin({path: path}), // Verb is the standard HTTP verb withVerb(verb):: self + __nonResourceAttributesMixin({verb: verb}), }, nonResourceAttributesType:: hidden.authorization.v1beta1.nonResourceAttributes, // ResourceAuthorizationAttributes describes information for a resource access request resourceAttributes:: { local __resourceAttributesMixin(resourceAttributes) = __specMixin({resourceAttributes+: resourceAttributes}), mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), // Group is the API Group of the Resource. "*" means all. withGroup(group):: self + __resourceAttributesMixin({group: group}), // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. withName(name):: self + __resourceAttributesMixin({name: name}), // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces "" (empty) is defaulted for LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped resources "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview withNamespace(namespace):: self + __resourceAttributesMixin({namespace: namespace}), // Resource is one of the existing resource types. "*" means all. withResource(resource):: self + __resourceAttributesMixin({resource: resource}), // Subresource is one of the existing resource types. "" means none. withSubresource(subresource):: self + __resourceAttributesMixin({subresource: subresource}), // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. withVerb(verb):: self + __resourceAttributesMixin({verb: verb}), // Version is the API Version of the Resource. "*" means all. withVersion(version):: self + __resourceAttributesMixin({version: version}), }, resourceAttributesType:: hidden.authorization.v1beta1.resourceAttributes, // UID information about the requesting user. withUid(uid):: self + __specMixin({uid: uid}), // User is the user you're testing for. If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups withUser(user):: self + __specMixin({user: user}), }, specType:: hidden.authorization.v1beta1.subjectAccessReviewSpec, }, }, // SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means "in all namespaces". Self is a special case, because users should always be able to check whether they can perform an action selfSubjectAccessReview:: { local kind = {kind: "SelfSubjectAccessReview"}, new():: apiVersion + kind, mixin:: { // metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Spec holds information about the request being evaluated. user and groups must be empty spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // NonResourceAttributes describes information for a non-resource access request nonResourceAttributes:: { local __nonResourceAttributesMixin(nonResourceAttributes) = __specMixin({nonResourceAttributes+: nonResourceAttributes}), mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), // Path is the URL path of the request withPath(path):: self + __nonResourceAttributesMixin({path: path}), // Verb is the standard HTTP verb withVerb(verb):: self + __nonResourceAttributesMixin({verb: verb}), }, nonResourceAttributesType:: hidden.authorization.v1beta1.nonResourceAttributes, // ResourceAuthorizationAttributes describes information for a resource access request resourceAttributes:: { local __resourceAttributesMixin(resourceAttributes) = __specMixin({resourceAttributes+: resourceAttributes}), mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), // Group is the API Group of the Resource. "*" means all. withGroup(group):: self + __resourceAttributesMixin({group: group}), // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. withName(name):: self + __resourceAttributesMixin({name: name}), // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces "" (empty) is defaulted for LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped resources "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview withNamespace(namespace):: self + __resourceAttributesMixin({namespace: namespace}), // Resource is one of the existing resource types. "*" means all. withResource(resource):: self + __resourceAttributesMixin({resource: resource}), // Subresource is one of the existing resource types. "" means none. withSubresource(subresource):: self + __resourceAttributesMixin({subresource: subresource}), // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. withVerb(verb):: self + __resourceAttributesMixin({verb: verb}), // Version is the API Version of the Resource. "*" means all. withVersion(version):: self + __resourceAttributesMixin({version: version}), }, resourceAttributesType:: hidden.authorization.v1beta1.resourceAttributes, }, specType:: hidden.authorization.v1beta1.selfSubjectAccessReviewSpec, }, }, // SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. The returned list of actions may be incomplete depending on the server's authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server. selfSubjectRulesReview:: { local kind = {kind: "SelfSubjectRulesReview"}, new():: apiVersion + kind, mixin:: { // metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Spec holds information about the request being evaluated. spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // Namespace to evaluate rules for. Required. withNamespace(namespace):: self + __specMixin({namespace: namespace}), }, specType:: hidden.authorization.v1beta1.selfSubjectRulesReviewSpec, }, }, // SubjectAccessReview checks whether or not a user or group can perform an action. subjectAccessReview:: { local kind = {kind: "SubjectAccessReview"}, new():: apiVersion + kind, mixin:: { // metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Spec holds information about the request being evaluated spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. withExtra(extra):: self + __specMixin({extra: extra}), // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. withExtraMixin(extra):: self + __specMixin({extra+: extra}), // Groups is the groups you're testing for. withGroup(group):: self + if std.type(group) == "array" then __specMixin({group: group}) else __specMixin({group: [group]}), // Groups is the groups you're testing for. withGroupMixin(group):: self + if std.type(group) == "array" then __specMixin({group+: group}) else __specMixin({group+: [group]}), // NonResourceAttributes describes information for a non-resource access request nonResourceAttributes:: { local __nonResourceAttributesMixin(nonResourceAttributes) = __specMixin({nonResourceAttributes+: nonResourceAttributes}), mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), // Path is the URL path of the request withPath(path):: self + __nonResourceAttributesMixin({path: path}), // Verb is the standard HTTP verb withVerb(verb):: self + __nonResourceAttributesMixin({verb: verb}), }, nonResourceAttributesType:: hidden.authorization.v1beta1.nonResourceAttributes, // ResourceAuthorizationAttributes describes information for a resource access request resourceAttributes:: { local __resourceAttributesMixin(resourceAttributes) = __specMixin({resourceAttributes+: resourceAttributes}), mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), // Group is the API Group of the Resource. "*" means all. withGroup(group):: self + __resourceAttributesMixin({group: group}), // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. withName(name):: self + __resourceAttributesMixin({name: name}), // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces "" (empty) is defaulted for LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped resources "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview withNamespace(namespace):: self + __resourceAttributesMixin({namespace: namespace}), // Resource is one of the existing resource types. "*" means all. withResource(resource):: self + __resourceAttributesMixin({resource: resource}), // Subresource is one of the existing resource types. "" means none. withSubresource(subresource):: self + __resourceAttributesMixin({subresource: subresource}), // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. withVerb(verb):: self + __resourceAttributesMixin({verb: verb}), // Version is the API Version of the Resource. "*" means all. withVersion(version):: self + __resourceAttributesMixin({version: version}), }, resourceAttributesType:: hidden.authorization.v1beta1.resourceAttributes, // UID information about the requesting user. withUid(uid):: self + __specMixin({uid: uid}), // User is the user you're testing for. If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups withUser(user):: self + __specMixin({user: user}), }, specType:: hidden.authorization.v1beta1.subjectAccessReviewSpec, }, }, }, }, autoscaling:: { v1:: { local apiVersion = {apiVersion: "autoscaling/v1"}, // configuration of a horizontal pod autoscaler. horizontalPodAutoscaler:: { local kind = {kind: "HorizontalPodAutoscaler"}, new():: apiVersion + kind, mixin:: { // Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas. withMaxReplicas(maxReplicas):: self + __specMixin({maxReplicas: maxReplicas}), // lower limit for the number of pods that can be set by the autoscaler, default 1. withMinReplicas(minReplicas):: self + __specMixin({minReplicas: minReplicas}), // reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource. scaleTargetRef:: { local __scaleTargetRefMixin(scaleTargetRef) = __specMixin({scaleTargetRef+: scaleTargetRef}), mixinInstance(scaleTargetRef):: __scaleTargetRefMixin(scaleTargetRef), // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names withName(name):: self + __scaleTargetRefMixin({name: name}), }, scaleTargetRefType:: hidden.autoscaling.v1.crossVersionObjectReference, // target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used. withTargetCpuUtilizationPercentage(targetCpuUtilizationPercentage):: self + __specMixin({targetCPUUtilizationPercentage: targetCpuUtilizationPercentage}), }, specType:: hidden.autoscaling.v1.horizontalPodAutoscalerSpec, }, }, // list of horizontal pod autoscaler objects. horizontalPodAutoscalerList:: { local kind = {kind: "HorizontalPodAutoscalerList"}, new(items):: apiVersion + kind + self.withItems(items), // list of horizontal pod autoscaler objects. withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // list of horizontal pod autoscaler objects. withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.autoscaling.v1.horizontalPodAutoscaler, mixin:: { }, }, // Scale represents a scaling request for a resource. scale:: { local kind = {kind: "Scale"}, new(replicas):: apiVersion + kind + self.mixin.spec.withReplicas(replicas), mixin:: { // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // desired number of instances for the scaled object. withReplicas(replicas):: self + __specMixin({replicas: replicas}), }, specType:: hidden.autoscaling.v1.scaleSpec, }, }, }, v2beta1:: { local apiVersion = {apiVersion: "autoscaling/v2beta1"}, // HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified. horizontalPodAutoscaler:: { local kind = {kind: "HorizontalPodAutoscaler"}, new():: apiVersion + kind, mixin:: { // metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas. withMaxReplicas(maxReplicas):: self + __specMixin({maxReplicas: maxReplicas}), // metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. withMetrics(metrics):: self + if std.type(metrics) == "array" then __specMixin({metrics: metrics}) else __specMixin({metrics: [metrics]}), // metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. withMetricsMixin(metrics):: self + if std.type(metrics) == "array" then __specMixin({metrics+: metrics}) else __specMixin({metrics+: [metrics]}), metricsType:: hidden.autoscaling.v2beta1.metricSpec, // minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. withMinReplicas(minReplicas):: self + __specMixin({minReplicas: minReplicas}), // scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count. scaleTargetRef:: { local __scaleTargetRefMixin(scaleTargetRef) = __specMixin({scaleTargetRef+: scaleTargetRef}), mixinInstance(scaleTargetRef):: __scaleTargetRefMixin(scaleTargetRef), // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names withName(name):: self + __scaleTargetRefMixin({name: name}), }, scaleTargetRefType:: hidden.autoscaling.v2beta1.crossVersionObjectReference, }, specType:: hidden.autoscaling.v2beta1.horizontalPodAutoscalerSpec, }, }, // HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects. horizontalPodAutoscalerList:: { local kind = {kind: "HorizontalPodAutoscalerList"}, new(items):: apiVersion + kind + self.withItems(items), // items is the list of horizontal pod autoscaler objects. withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // items is the list of horizontal pod autoscaler objects. withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.autoscaling.v2beta1.horizontalPodAutoscaler, mixin:: { }, }, }, }, batch:: { v1:: { local apiVersion = {apiVersion: "batch/v1"}, // Job represents the configuration of a single job. job:: { local kind = {kind: "Job"}, new():: apiVersion + kind, mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of a job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // Specifies the number of retries before marking this job failed. Defaults to 6 withBackoffLimit(backoffLimit):: self + __specMixin({backoffLimit: backoffLimit}), // Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ withCompletions(completions):: self + __specMixin({completions: completions}), // manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://git.k8s.io/community/contributors/design-proposals/selector-generation.md withManualSelector(manualSelector):: self + __specMixin({manualSelector: manualSelector}), // Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ withParallelism(parallelism):: self + __specMixin({parallelism: parallelism}), // A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors selector:: { local __selectorMixin(selector) = __specMixin({selector+: selector}), mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ template:: { local __templateMixin(template) = __specMixin({template+: template}), mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, }, specType:: hidden.batch.v1.jobSpec, }, }, // JobList is a collection of jobs. jobList:: { local kind = {kind: "JobList"}, new(items):: apiVersion + kind + self.withItems(items), // items is the list of Jobs. withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // items is the list of Jobs. withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.batch.v1.job, mixin:: { }, }, }, v1beta1:: { local apiVersion = {apiVersion: "batch/v1beta1"}, // CronJob represents the configuration of a single cron job. cronJob:: { local kind = {kind: "CronJob"}, new():: apiVersion + kind, mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // Specifies how to treat concurrent executions of a Job. Defaults to Allow. withConcurrencyPolicy(concurrencyPolicy):: self + __specMixin({concurrencyPolicy: concurrencyPolicy}), // The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. withFailedJobsHistoryLimit(failedJobsHistoryLimit):: self + __specMixin({failedJobsHistoryLimit: failedJobsHistoryLimit}), // Specifies the job that will be created when executing a CronJob. jobTemplate:: { local __jobTemplateMixin(jobTemplate) = __specMixin({jobTemplate+: jobTemplate}), mixinInstance(jobTemplate):: __jobTemplateMixin(jobTemplate), // Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __jobTemplateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __jobTemplateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // Specifies the number of retries before marking this job failed. Defaults to 6 withBackoffLimit(backoffLimit):: self + __specMixin({backoffLimit: backoffLimit}), // Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ withCompletions(completions):: self + __specMixin({completions: completions}), // manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://git.k8s.io/community/contributors/design-proposals/selector-generation.md withManualSelector(manualSelector):: self + __specMixin({manualSelector: manualSelector}), // Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ withParallelism(parallelism):: self + __specMixin({parallelism: parallelism}), // A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors selector:: { local __selectorMixin(selector) = __specMixin({selector+: selector}), mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ template:: { local __templateMixin(template) = __specMixin({template+: template}), mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, }, specType:: hidden.batch.v1.jobSpec, }, jobTemplateType:: hidden.batch.v1beta1.jobTemplateSpec, // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. withSchedule(schedule):: self + __specMixin({schedule: schedule}), // Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones. withStartingDeadlineSeconds(startingDeadlineSeconds):: self + __specMixin({startingDeadlineSeconds: startingDeadlineSeconds}), // The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 3. withSuccessfulJobsHistoryLimit(successfulJobsHistoryLimit):: self + __specMixin({successfulJobsHistoryLimit: successfulJobsHistoryLimit}), // This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. withSuspend(suspend):: self + __specMixin({suspend: suspend}), }, specType:: hidden.batch.v1beta1.cronJobSpec, }, }, // CronJobList is a collection of cron jobs. cronJobList:: { local kind = {kind: "CronJobList"}, new(items):: apiVersion + kind + self.withItems(items), // items is the list of CronJobs. withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // items is the list of CronJobs. withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.batch.v1beta1.cronJob, mixin:: { }, }, }, v2alpha1:: { local apiVersion = {apiVersion: "batch/v2alpha1"}, // CronJob represents the configuration of a single cron job. cronJob:: { local kind = {kind: "CronJob"}, new():: apiVersion + kind, mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // Specifies how to treat concurrent executions of a Job. Defaults to Allow. withConcurrencyPolicy(concurrencyPolicy):: self + __specMixin({concurrencyPolicy: concurrencyPolicy}), // The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. withFailedJobsHistoryLimit(failedJobsHistoryLimit):: self + __specMixin({failedJobsHistoryLimit: failedJobsHistoryLimit}), // Specifies the job that will be created when executing a CronJob. jobTemplate:: { local __jobTemplateMixin(jobTemplate) = __specMixin({jobTemplate+: jobTemplate}), mixinInstance(jobTemplate):: __jobTemplateMixin(jobTemplate), // Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __jobTemplateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __jobTemplateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // Specifies the number of retries before marking this job failed. Defaults to 6 withBackoffLimit(backoffLimit):: self + __specMixin({backoffLimit: backoffLimit}), // Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ withCompletions(completions):: self + __specMixin({completions: completions}), // manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://git.k8s.io/community/contributors/design-proposals/selector-generation.md withManualSelector(manualSelector):: self + __specMixin({manualSelector: manualSelector}), // Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ withParallelism(parallelism):: self + __specMixin({parallelism: parallelism}), // A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors selector:: { local __selectorMixin(selector) = __specMixin({selector+: selector}), mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ template:: { local __templateMixin(template) = __specMixin({template+: template}), mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, }, specType:: hidden.batch.v1.jobSpec, }, jobTemplateType:: hidden.batch.v2alpha1.jobTemplateSpec, // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. withSchedule(schedule):: self + __specMixin({schedule: schedule}), // Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones. withStartingDeadlineSeconds(startingDeadlineSeconds):: self + __specMixin({startingDeadlineSeconds: startingDeadlineSeconds}), // The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. withSuccessfulJobsHistoryLimit(successfulJobsHistoryLimit):: self + __specMixin({successfulJobsHistoryLimit: successfulJobsHistoryLimit}), // This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. withSuspend(suspend):: self + __specMixin({suspend: suspend}), }, specType:: hidden.batch.v2alpha1.cronJobSpec, }, }, // CronJobList is a collection of cron jobs. cronJobList:: { local kind = {kind: "CronJobList"}, new(items):: apiVersion + kind + self.withItems(items), // items is the list of CronJobs. withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // items is the list of CronJobs. withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.batch.v2alpha1.cronJob, mixin:: { }, }, }, }, certificates:: { v1beta1:: { local apiVersion = {apiVersion: "certificates.k8s.io/v1beta1"}, // Describes a certificate signing request certificateSigningRequest:: { local kind = {kind: "CertificateSigningRequest"}, new():: apiVersion + kind, mixin:: { // metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // The certificate request itself and any additional information. spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // Extra information about the requesting user. See user.Info interface for details. withExtra(extra):: self + __specMixin({extra: extra}), // Extra information about the requesting user. See user.Info interface for details. withExtraMixin(extra):: self + __specMixin({extra+: extra}), // Group information about the requesting user. See user.Info interface for details. withGroups(groups):: self + if std.type(groups) == "array" then __specMixin({groups: groups}) else __specMixin({groups: [groups]}), // Group information about the requesting user. See user.Info interface for details. withGroupsMixin(groups):: self + if std.type(groups) == "array" then __specMixin({groups+: groups}) else __specMixin({groups+: [groups]}), // Base64-encoded PKCS#10 CSR data withRequest(request):: self + __specMixin({request: request}), // UID information about the requesting user. See user.Info interface for details. withUid(uid):: self + __specMixin({uid: uid}), // allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 // https://tools.ietf.org/html/rfc5280#section-4.2.1.12 withUsages(usages):: self + if std.type(usages) == "array" then __specMixin({usages: usages}) else __specMixin({usages: [usages]}), // allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 // https://tools.ietf.org/html/rfc5280#section-4.2.1.12 withUsagesMixin(usages):: self + if std.type(usages) == "array" then __specMixin({usages+: usages}) else __specMixin({usages+: [usages]}), // Information about the requesting user. See user.Info interface for details. withUsername(username):: self + __specMixin({username: username}), }, specType:: hidden.certificates.v1beta1.certificateSigningRequestSpec, }, }, // certificateSigningRequestList:: { local kind = {kind: "CertificateSigningRequestList"}, new(items):: apiVersion + kind + self.withItems(items), // withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.certificates.v1beta1.certificateSigningRequest, mixin:: { }, }, }, }, core:: { v1:: { local apiVersion = {apiVersion: "v1"}, // Binding ties one object to another; for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead. binding:: { local kind = {kind: "Binding"}, new():: apiVersion + kind, mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // The target object that you want to bind to the standard object. target:: { local __targetMixin(target) = {target+: target}, mixinInstance(target):: __targetMixin(target), // If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. withFieldPath(fieldPath):: self + __targetMixin({fieldPath: fieldPath}), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __targetMixin({name: name}), // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ withNamespace(namespace):: self + __targetMixin({namespace: namespace}), // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency withResourceVersion(resourceVersion):: self + __targetMixin({resourceVersion: resourceVersion}), // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids withUid(uid):: self + __targetMixin({uid: uid}), }, targetType:: hidden.core.v1.objectReference, }, }, // ComponentStatus (and ComponentStatusList) holds the cluster validation info. componentStatus:: { local kind = {kind: "ComponentStatus"}, new():: apiVersion + kind, // List of component conditions observed withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, // List of component conditions observed withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, conditionsType:: hidden.core.v1.componentCondition, mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, }, }, // Status of all the conditions for the component as a list of ComponentStatus objects. componentStatusList:: { local kind = {kind: "ComponentStatusList"}, new():: apiVersion + kind, // List of ComponentStatus objects. withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // List of ComponentStatus objects. withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.core.v1.componentStatus, mixin:: { }, }, // ConfigMap holds configuration data for pods to consume. configMap:: { local kind = {kind: "ConfigMap"}, new(name, data):: apiVersion + kind + self.mixin.metadata.withName(name) + self.withData(data), // Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. withData(data):: self + {data: data}, // Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. withDataMixin(data):: self + {data+: data}, mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, }, }, // ConfigMapList is a resource containing a list of ConfigMap objects. configMapList:: { local kind = {kind: "ConfigMapList"}, new(items):: apiVersion + kind + self.withItems(items), // Items is the list of ConfigMaps. withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is the list of ConfigMaps. withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.core.v1.configMap, mixin:: { }, }, // Endpoints is a collection of endpoints that implement the actual service. Example: // Name: "mysvc", // Subsets: [ // { // Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], // Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] // }, // { // Addresses: [{"ip": "10.10.3.3"}], // Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}] // }, // ] endpoints:: { local kind = {kind: "Endpoints"}, new():: apiVersion + kind, // The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service. withSubsets(subsets):: self + if std.type(subsets) == "array" then {subsets: subsets} else {subsets: [subsets]}, // The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service. withSubsetsMixin(subsets):: self + if std.type(subsets) == "array" then {subsets+: subsets} else {subsets+: [subsets]}, subsetsType:: hidden.core.v1.endpointSubset, mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, }, }, // EndpointsList is a list of endpoints. endpointsList:: { local kind = {kind: "EndpointsList"}, new(items):: apiVersion + kind + self.withItems(items), // List of endpoints. withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // List of endpoints. withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.core.v1.endpoints, mixin:: { }, }, // Event is a report of an event somewhere in the cluster. event:: { local kind = {kind: "Event"}, new():: apiVersion + kind, // The number of times this event has occurred. withCount(count):: self + {count: count}, // A human-readable description of the status of this operation. withMessage(message):: self + {message: message}, // This should be a short, machine understandable string that gives the reason for the transition into the object's current status. withReason(reason):: self + {reason: reason}, // Type of this event (Normal, Warning), new types could be added in the future withType(type):: self + {type: type}, mixin:: { // The time at which the event was first recorded. (Time of server receipt is in TypeMeta.) firstTimestamp:: { local __firstTimestampMixin(firstTimestamp) = {firstTimestamp+: firstTimestamp}, mixinInstance(firstTimestamp):: __firstTimestampMixin(firstTimestamp), }, firstTimestampType:: hidden.meta.v1.time, // The object that this event is about. involvedObject:: { local __involvedObjectMixin(involvedObject) = {involvedObject+: involvedObject}, mixinInstance(involvedObject):: __involvedObjectMixin(involvedObject), // If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. withFieldPath(fieldPath):: self + __involvedObjectMixin({fieldPath: fieldPath}), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __involvedObjectMixin({name: name}), // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ withNamespace(namespace):: self + __involvedObjectMixin({namespace: namespace}), // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency withResourceVersion(resourceVersion):: self + __involvedObjectMixin({resourceVersion: resourceVersion}), // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids withUid(uid):: self + __involvedObjectMixin({uid: uid}), }, involvedObjectType:: hidden.core.v1.objectReference, // The time at which the most recent occurrence of this event was recorded. lastTimestamp:: { local __lastTimestampMixin(lastTimestamp) = {lastTimestamp+: lastTimestamp}, mixinInstance(lastTimestamp):: __lastTimestampMixin(lastTimestamp), }, lastTimestampType:: hidden.meta.v1.time, // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // The component reporting this event. Should be a short machine understandable string. source:: { local __sourceMixin(source) = {source+: source}, mixinInstance(source):: __sourceMixin(source), // Component from which the event is generated. withComponent(component):: self + __sourceMixin({component: component}), // Node name on which the event is generated. withHost(host):: self + __sourceMixin({host: host}), }, sourceType:: hidden.core.v1.eventSource, }, }, // EventList is a list of events. eventList:: { local kind = {kind: "EventList"}, new(items):: apiVersion + kind + self.withItems(items), // List of events withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // List of events withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.core.v1.event, mixin:: { }, }, // LimitRange sets resource usage limits for each kind of resource in a Namespace. limitRange:: { local kind = {kind: "LimitRange"}, new():: apiVersion + kind, mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Spec defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // Limits is the list of LimitRangeItem objects that are enforced. withLimits(limits):: self + if std.type(limits) == "array" then __specMixin({limits: limits}) else __specMixin({limits: [limits]}), // Limits is the list of LimitRangeItem objects that are enforced. withLimitsMixin(limits):: self + if std.type(limits) == "array" then __specMixin({limits+: limits}) else __specMixin({limits+: [limits]}), limitsType:: hidden.core.v1.limitRangeItem, }, specType:: hidden.core.v1.limitRangeSpec, }, }, // LimitRangeList is a list of LimitRange items. limitRangeList:: { local kind = {kind: "LimitRangeList"}, new(items):: apiVersion + kind + self.withItems(items), // Items is a list of LimitRange objects. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_limit_range.md withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is a list of LimitRange objects. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_limit_range.md withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.core.v1.limitRange, mixin:: { }, }, // Namespace provides a scope for Names. Use of multiple namespaces is optional. namespace:: { local kind = {kind: "Namespace"}, new(name):: apiVersion + kind + self.mixin.metadata.withName(name), mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Spec defines the behavior of the Namespace. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#finalizers withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __specMixin({finalizers: finalizers}) else __specMixin({finalizers: [finalizers]}), // Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#finalizers withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __specMixin({finalizers+: finalizers}) else __specMixin({finalizers+: [finalizers]}), }, specType:: hidden.core.v1.namespaceSpec, }, }, // NamespaceList is a list of Namespaces. namespaceList:: { local kind = {kind: "NamespaceList"}, new(items):: apiVersion + kind + self.withItems(items), // Items is the list of Namespace objects in the list. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is the list of Namespace objects in the list. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.core.v1.namespace, mixin:: { }, }, // Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd). node:: { local kind = {kind: "Node"}, new():: apiVersion + kind, mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Spec defines the behavior of a node. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // If specified, the source to get node configuration from The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field configSource:: { local __configSourceMixin(configSource) = __specMixin({configSource+: configSource}), mixinInstance(configSource):: __configSourceMixin(configSource), // configMapRef:: { local __configMapRefMixin(configMapRef) = __configSourceMixin({configMapRef+: configMapRef}), mixinInstance(configMapRef):: __configMapRefMixin(configMapRef), // If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. withFieldPath(fieldPath):: self + __configMapRefMixin({fieldPath: fieldPath}), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __configMapRefMixin({name: name}), // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ withNamespace(namespace):: self + __configMapRefMixin({namespace: namespace}), // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency withResourceVersion(resourceVersion):: self + __configMapRefMixin({resourceVersion: resourceVersion}), // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids withUid(uid):: self + __configMapRefMixin({uid: uid}), }, configMapRefType:: hidden.core.v1.objectReference, }, configSourceType:: hidden.core.v1.nodeConfigSource, // External ID of the node assigned by some machine database (e.g. a cloud provider). Deprecated. withExternalId(externalId):: self + __specMixin({externalID: externalId}), // PodCIDR represents the pod IP range assigned to the node. withPodCidr(podCidr):: self + __specMixin({podCIDR: podCidr}), // ID of the node assigned by the cloud provider in the format: :// withProviderId(providerId):: self + __specMixin({providerID: providerId}), // If specified, the node's taints. withTaints(taints):: self + if std.type(taints) == "array" then __specMixin({taints: taints}) else __specMixin({taints: [taints]}), // If specified, the node's taints. withTaintsMixin(taints):: self + if std.type(taints) == "array" then __specMixin({taints+: taints}) else __specMixin({taints+: [taints]}), taintsType:: hidden.core.v1.taint, // Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration withUnschedulable(unschedulable):: self + __specMixin({unschedulable: unschedulable}), }, specType:: hidden.core.v1.nodeSpec, }, }, // NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil. nodeConfigSource:: { local kind = {kind: "NodeConfigSource"}, new():: apiVersion + kind, mixin:: { // configMapRef:: { local __configMapRefMixin(configMapRef) = {configMapRef+: configMapRef}, mixinInstance(configMapRef):: __configMapRefMixin(configMapRef), // If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. withFieldPath(fieldPath):: self + __configMapRefMixin({fieldPath: fieldPath}), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __configMapRefMixin({name: name}), // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ withNamespace(namespace):: self + __configMapRefMixin({namespace: namespace}), // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency withResourceVersion(resourceVersion):: self + __configMapRefMixin({resourceVersion: resourceVersion}), // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids withUid(uid):: self + __configMapRefMixin({uid: uid}), }, configMapRefType:: hidden.core.v1.objectReference, }, }, // NodeList is the whole list of all Nodes which have been registered with master. nodeList:: { local kind = {kind: "NodeList"}, new(items):: apiVersion + kind + self.withItems(items), // List of nodes withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // List of nodes withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.core.v1.node, mixin:: { }, }, // PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous to a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes persistentVolume:: { local kind = {kind: "PersistentVolume"}, new():: apiVersion + kind, mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Spec defines a specification of a persistent volume owned by the cluster. Provisioned by an administrator. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // AccessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes withAccessModes(accessModes):: self + if std.type(accessModes) == "array" then __specMixin({accessModes: accessModes}) else __specMixin({accessModes: [accessModes]}), // AccessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes withAccessModesMixin(accessModes):: self + if std.type(accessModes) == "array" then __specMixin({accessModes+: accessModes}) else __specMixin({accessModes+: [accessModes]}), // AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore awsElasticBlockStore:: { local __awsElasticBlockStoreMixin(awsElasticBlockStore) = __specMixin({awsElasticBlockStore+: awsElasticBlockStore}), mixinInstance(awsElasticBlockStore):: __awsElasticBlockStoreMixin(awsElasticBlockStore), // Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore withFsType(fsType):: self + __awsElasticBlockStoreMixin({fsType: fsType}), // The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). withPartition(partition):: self + __awsElasticBlockStoreMixin({partition: partition}), // Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore withReadOnly(readOnly):: self + __awsElasticBlockStoreMixin({readOnly: readOnly}), // Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore withVolumeId(volumeId):: self + __awsElasticBlockStoreMixin({volumeID: volumeId}), }, awsElasticBlockStoreType:: hidden.core.v1.awsElasticBlockStoreVolumeSource, // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. azureDisk:: { local __azureDiskMixin(azureDisk) = __specMixin({azureDisk+: azureDisk}), mixinInstance(azureDisk):: __azureDiskMixin(azureDisk), // Host Caching mode: None, Read Only, Read Write. withCachingMode(cachingMode):: self + __azureDiskMixin({cachingMode: cachingMode}), // The Name of the data disk in the blob storage withDiskName(diskName):: self + __azureDiskMixin({diskName: diskName}), // The URI the data disk in the blob storage withDiskUri(diskUri):: self + __azureDiskMixin({diskURI: diskUri}), // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + __azureDiskMixin({fsType: fsType}), // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + __azureDiskMixin({readOnly: readOnly}), }, azureDiskType:: hidden.core.v1.azureDiskVolumeSource, // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. azureFile:: { local __azureFileMixin(azureFile) = __specMixin({azureFile+: azureFile}), mixinInstance(azureFile):: __azureFileMixin(azureFile), // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + __azureFileMixin({readOnly: readOnly}), // the name of secret that contains Azure Storage Account Name and Key withSecretName(secretName):: self + __azureFileMixin({secretName: secretName}), // the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod withSecretNamespace(secretNamespace):: self + __azureFileMixin({secretNamespace: secretNamespace}), // Share Name withShareName(shareName):: self + __azureFileMixin({shareName: shareName}), }, azureFileType:: hidden.core.v1.azureFilePersistentVolumeSource, // A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity withCapacity(capacity):: self + __specMixin({capacity: capacity}), // A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity withCapacityMixin(capacity):: self + __specMixin({capacity+: capacity}), // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime cephfs:: { local __cephfsMixin(cephfs) = __specMixin({cephfs+: cephfs}), mixinInstance(cephfs):: __cephfsMixin(cephfs), // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it withMonitors(monitors):: self + if std.type(monitors) == "array" then __cephfsMixin({monitors: monitors}) else __cephfsMixin({monitors: [monitors]}), // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it withMonitorsMixin(monitors):: self + if std.type(monitors) == "array" then __cephfsMixin({monitors+: monitors}) else __cephfsMixin({monitors+: [monitors]}), // Optional: Used as the mounted root, rather than the full Ceph tree, default is / withPath(path):: self + __cephfsMixin({path: path}), // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it withReadOnly(readOnly):: self + __cephfsMixin({readOnly: readOnly}), // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it withSecretFile(secretFile):: self + __cephfsMixin({secretFile: secretFile}), // Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it secretRef:: { local __secretRefMixin(secretRef) = __cephfsMixin({secretRef+: secretRef}), mixinInstance(secretRef):: __secretRefMixin(secretRef), // Name is unique within a namespace to reference a secret resource. withName(name):: self + __secretRefMixin({name: name}), // Namespace defines the space within which the secret name must be unique. withNamespace(namespace):: self + __secretRefMixin({namespace: namespace}), }, secretRefType:: hidden.core.v1.secretReference, // Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it withUser(user):: self + __cephfsMixin({user: user}), }, cephfsType:: hidden.core.v1.cephFSPersistentVolumeSource, // Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md cinder:: { local __cinderMixin(cinder) = __specMixin({cinder+: cinder}), mixinInstance(cinder):: __cinderMixin(cinder), // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md withFsType(fsType):: self + __cinderMixin({fsType: fsType}), // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md withReadOnly(readOnly):: self + __cinderMixin({readOnly: readOnly}), // volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md withVolumeId(volumeId):: self + __cinderMixin({volumeID: volumeId}), }, cinderType:: hidden.core.v1.cinderVolumeSource, // ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding claimRef:: { local __claimRefMixin(claimRef) = __specMixin({claimRef+: claimRef}), mixinInstance(claimRef):: __claimRefMixin(claimRef), // If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. withFieldPath(fieldPath):: self + __claimRefMixin({fieldPath: fieldPath}), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __claimRefMixin({name: name}), // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ withNamespace(namespace):: self + __claimRefMixin({namespace: namespace}), // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency withResourceVersion(resourceVersion):: self + __claimRefMixin({resourceVersion: resourceVersion}), // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids withUid(uid):: self + __claimRefMixin({uid: uid}), }, claimRefType:: hidden.core.v1.objectReference, // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. fc:: { local __fcMixin(fc) = __specMixin({fc+: fc}), mixinInstance(fc):: __fcMixin(fc), // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + __fcMixin({fsType: fsType}), // Optional: FC target lun number withLun(lun):: self + __fcMixin({lun: lun}), // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + __fcMixin({readOnly: readOnly}), // Optional: FC target worldwide names (WWNs) withTargetWwns(targetWwns):: self + if std.type(targetWwns) == "array" then __fcMixin({targetWWNs: targetWwns}) else __fcMixin({targetWWNs: [targetWwns]}), // Optional: FC target worldwide names (WWNs) withTargetWwnsMixin(targetWwns):: self + if std.type(targetWwns) == "array" then __fcMixin({targetWWNs+: targetWwns}) else __fcMixin({targetWWNs+: [targetWwns]}), // Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. withWwids(wwids):: self + if std.type(wwids) == "array" then __fcMixin({wwids: wwids}) else __fcMixin({wwids: [wwids]}), // Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. withWwidsMixin(wwids):: self + if std.type(wwids) == "array" then __fcMixin({wwids+: wwids}) else __fcMixin({wwids+: [wwids]}), }, fcType:: hidden.core.v1.fcVolumeSource, // FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. flexVolume:: { local __flexVolumeMixin(flexVolume) = __specMixin({flexVolume+: flexVolume}), mixinInstance(flexVolume):: __flexVolumeMixin(flexVolume), // Driver is the name of the driver to use for this volume. withDriver(driver):: self + __flexVolumeMixin({driver: driver}), // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. withFsType(fsType):: self + __flexVolumeMixin({fsType: fsType}), // Optional: Extra command options if any. withOptions(options):: self + __flexVolumeMixin({options: options}), // Optional: Extra command options if any. withOptionsMixin(options):: self + __flexVolumeMixin({options+: options}), // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + __flexVolumeMixin({readOnly: readOnly}), // Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts. secretRef:: { local __secretRefMixin(secretRef) = __flexVolumeMixin({secretRef+: secretRef}), mixinInstance(secretRef):: __secretRefMixin(secretRef), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __secretRefMixin({name: name}), }, secretRefType:: hidden.core.v1.localObjectReference, }, flexVolumeType:: hidden.core.v1.flexVolumeSource, // Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running flocker:: { local __flockerMixin(flocker) = __specMixin({flocker+: flocker}), mixinInstance(flocker):: __flockerMixin(flocker), // Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated withDatasetName(datasetName):: self + __flockerMixin({datasetName: datasetName}), // UUID of the dataset. This is unique identifier of a Flocker dataset withDatasetUuid(datasetUuid):: self + __flockerMixin({datasetUUID: datasetUuid}), }, flockerType:: hidden.core.v1.flockerVolumeSource, // GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk gcePersistentDisk:: { local __gcePersistentDiskMixin(gcePersistentDisk) = __specMixin({gcePersistentDisk+: gcePersistentDisk}), mixinInstance(gcePersistentDisk):: __gcePersistentDiskMixin(gcePersistentDisk), // Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk withFsType(fsType):: self + __gcePersistentDiskMixin({fsType: fsType}), // The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk withPartition(partition):: self + __gcePersistentDiskMixin({partition: partition}), // Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk withPdName(pdName):: self + __gcePersistentDiskMixin({pdName: pdName}), // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk withReadOnly(readOnly):: self + __gcePersistentDiskMixin({readOnly: readOnly}), }, gcePersistentDiskType:: hidden.core.v1.gcePersistentDiskVolumeSource, // Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md glusterfs:: { local __glusterfsMixin(glusterfs) = __specMixin({glusterfs+: glusterfs}), mixinInstance(glusterfs):: __glusterfsMixin(glusterfs), // EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod withEndpoints(endpoints):: self + __glusterfsMixin({endpoints: endpoints}), // Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod withPath(path):: self + __glusterfsMixin({path: path}), // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod withReadOnly(readOnly):: self + __glusterfsMixin({readOnly: readOnly}), }, glusterfsType:: hidden.core.v1.glusterfsVolumeSource, // HostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath hostPath:: { local __hostPathMixin(hostPath) = __specMixin({hostPath+: hostPath}), mixinInstance(hostPath):: __hostPathMixin(hostPath), // Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath withPath(path):: self + __hostPathMixin({path: path}), // Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath withType(type):: self + __hostPathMixin({type: type}), }, hostPathType:: hidden.core.v1.hostPathVolumeSource, // ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. iscsi:: { local __iscsiMixin(iscsi) = __specMixin({iscsi+: iscsi}), mixinInstance(iscsi):: __iscsiMixin(iscsi), // whether support iSCSI Discovery CHAP authentication withChapAuthDiscovery(chapAuthDiscovery):: self + __iscsiMixin({chapAuthDiscovery: chapAuthDiscovery}), // whether support iSCSI Session CHAP authentication withChapAuthSession(chapAuthSession):: self + __iscsiMixin({chapAuthSession: chapAuthSession}), // Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi withFsType(fsType):: self + __iscsiMixin({fsType: fsType}), // Custom iSCSI initiator name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. withInitiatorName(initiatorName):: self + __iscsiMixin({initiatorName: initiatorName}), // Target iSCSI Qualified Name. withIqn(iqn):: self + __iscsiMixin({iqn: iqn}), // Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport. withIscsiInterface(iscsiInterface):: self + __iscsiMixin({iscsiInterface: iscsiInterface}), // iSCSI target lun number. withLun(lun):: self + __iscsiMixin({lun: lun}), // iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). withPortals(portals):: self + if std.type(portals) == "array" then __iscsiMixin({portals: portals}) else __iscsiMixin({portals: [portals]}), // iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). withPortalsMixin(portals):: self + if std.type(portals) == "array" then __iscsiMixin({portals+: portals}) else __iscsiMixin({portals+: [portals]}), // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. withReadOnly(readOnly):: self + __iscsiMixin({readOnly: readOnly}), // CHAP secret for iSCSI target and initiator authentication secretRef:: { local __secretRefMixin(secretRef) = __iscsiMixin({secretRef+: secretRef}), mixinInstance(secretRef):: __secretRefMixin(secretRef), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __secretRefMixin({name: name}), }, secretRefType:: hidden.core.v1.localObjectReference, // iSCSI target portal. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). withTargetPortal(targetPortal):: self + __iscsiMixin({targetPortal: targetPortal}), }, iscsiType:: hidden.core.v1.iscsiVolumeSource, // Local represents directly-attached storage with node affinity localStorage:: { local __localStorageMixin(localStorage) = __specMixin({"local"+: localStorage}), mixinInstance(localStorage):: __localStorageMixin(localStorage), // The full path to the volume on the node For alpha, this path must be a directory Once block as a source is supported, then this path can point to a block device withPath(path):: self + __localStorageMixin({path: path}), }, localStorageType:: hidden.core.v1.localVolumeSource, // A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options withMountOptions(mountOptions):: self + if std.type(mountOptions) == "array" then __specMixin({mountOptions: mountOptions}) else __specMixin({mountOptions: [mountOptions]}), // A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options withMountOptionsMixin(mountOptions):: self + if std.type(mountOptions) == "array" then __specMixin({mountOptions+: mountOptions}) else __specMixin({mountOptions+: [mountOptions]}), // NFS represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs nfs:: { local __nfsMixin(nfs) = __specMixin({nfs+: nfs}), mixinInstance(nfs):: __nfsMixin(nfs), // Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs withPath(path):: self + __nfsMixin({path: path}), // ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs withReadOnly(readOnly):: self + __nfsMixin({readOnly: readOnly}), // Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs withServer(server):: self + __nfsMixin({server: server}), }, nfsType:: hidden.core.v1.nfsVolumeSource, // What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming withPersistentVolumeReclaimPolicy(persistentVolumeReclaimPolicy):: self + __specMixin({persistentVolumeReclaimPolicy: persistentVolumeReclaimPolicy}), // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine photonPersistentDisk:: { local __photonPersistentDiskMixin(photonPersistentDisk) = __specMixin({photonPersistentDisk+: photonPersistentDisk}), mixinInstance(photonPersistentDisk):: __photonPersistentDiskMixin(photonPersistentDisk), // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + __photonPersistentDiskMixin({fsType: fsType}), // ID that identifies Photon Controller persistent disk withPdId(pdId):: self + __photonPersistentDiskMixin({pdID: pdId}), }, photonPersistentDiskType:: hidden.core.v1.photonPersistentDiskVolumeSource, // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine portworxVolume:: { local __portworxVolumeMixin(portworxVolume) = __specMixin({portworxVolume+: portworxVolume}), mixinInstance(portworxVolume):: __portworxVolumeMixin(portworxVolume), // FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + __portworxVolumeMixin({fsType: fsType}), // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + __portworxVolumeMixin({readOnly: readOnly}), // VolumeID uniquely identifies a Portworx volume withVolumeId(volumeId):: self + __portworxVolumeMixin({volumeID: volumeId}), }, portworxVolumeType:: hidden.core.v1.portworxVolumeSource, // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime quobyte:: { local __quobyteMixin(quobyte) = __specMixin({quobyte+: quobyte}), mixinInstance(quobyte):: __quobyteMixin(quobyte), // Group to map volume access to Default is no group withGroup(group):: self + __quobyteMixin({group: group}), // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. withReadOnly(readOnly):: self + __quobyteMixin({readOnly: readOnly}), // Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes withRegistry(registry):: self + __quobyteMixin({registry: registry}), // User to map volume access to Defaults to serivceaccount user withUser(user):: self + __quobyteMixin({user: user}), // Volume is a string that references an already created Quobyte volume by name. withVolume(volume):: self + __quobyteMixin({volume: volume}), }, quobyteType:: hidden.core.v1.quobyteVolumeSource, // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md rbd:: { local __rbdMixin(rbd) = __specMixin({rbd+: rbd}), mixinInstance(rbd):: __rbdMixin(rbd), // Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd withFsType(fsType):: self + __rbdMixin({fsType: fsType}), // The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withImage(image):: self + __rbdMixin({image: image}), // Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withKeyring(keyring):: self + __rbdMixin({keyring: keyring}), // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withMonitors(monitors):: self + if std.type(monitors) == "array" then __rbdMixin({monitors: monitors}) else __rbdMixin({monitors: [monitors]}), // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withMonitorsMixin(monitors):: self + if std.type(monitors) == "array" then __rbdMixin({monitors+: monitors}) else __rbdMixin({monitors+: [monitors]}), // The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withPool(pool):: self + __rbdMixin({pool: pool}), // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withReadOnly(readOnly):: self + __rbdMixin({readOnly: readOnly}), // SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it secretRef:: { local __secretRefMixin(secretRef) = __rbdMixin({secretRef+: secretRef}), mixinInstance(secretRef):: __secretRefMixin(secretRef), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __secretRefMixin({name: name}), }, secretRefType:: hidden.core.v1.localObjectReference, // The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withUser(user):: self + __rbdMixin({user: user}), }, rbdType:: hidden.core.v1.rbdVolumeSource, // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. scaleIo:: { local __scaleIoMixin(scaleIo) = __specMixin({scaleIO+: scaleIo}), mixinInstance(scaleIo):: __scaleIoMixin(scaleIo), // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + __scaleIoMixin({fsType: fsType}), // The host address of the ScaleIO API Gateway. withGateway(gateway):: self + __scaleIoMixin({gateway: gateway}), // The name of the Protection Domain for the configured storage (defaults to "default"). withProtectionDomain(protectionDomain):: self + __scaleIoMixin({protectionDomain: protectionDomain}), // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + __scaleIoMixin({readOnly: readOnly}), // SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. secretRef:: { local __secretRefMixin(secretRef) = __scaleIoMixin({secretRef+: secretRef}), mixinInstance(secretRef):: __secretRefMixin(secretRef), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __secretRefMixin({name: name}), }, secretRefType:: hidden.core.v1.localObjectReference, // Flag to enable/disable SSL communication with Gateway, default false withSslEnabled(sslEnabled):: self + __scaleIoMixin({sslEnabled: sslEnabled}), // Indicates whether the storage for a volume should be thick or thin (defaults to "thin"). withStorageMode(storageMode):: self + __scaleIoMixin({storageMode: storageMode}), // The Storage Pool associated with the protection domain (defaults to "default"). withStoragePool(storagePool):: self + __scaleIoMixin({storagePool: storagePool}), // The name of the storage system as configured in ScaleIO. withSystem(system):: self + __scaleIoMixin({system: system}), // The name of a volume already created in the ScaleIO system that is associated with this volume source. withVolumeName(volumeName):: self + __scaleIoMixin({volumeName: volumeName}), }, scaleIoType:: hidden.core.v1.scaleIoVolumeSource, // Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass. withStorageClassName(storageClassName):: self + __specMixin({storageClassName: storageClassName}), // StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md storageos:: { local __storageosMixin(storageos) = __specMixin({storageos+: storageos}), mixinInstance(storageos):: __storageosMixin(storageos), // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + __storageosMixin({fsType: fsType}), // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + __storageosMixin({readOnly: readOnly}), // SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. secretRef:: { local __secretRefMixin(secretRef) = __storageosMixin({secretRef+: secretRef}), mixinInstance(secretRef):: __secretRefMixin(secretRef), // If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. withFieldPath(fieldPath):: self + __secretRefMixin({fieldPath: fieldPath}), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __secretRefMixin({name: name}), // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ withNamespace(namespace):: self + __secretRefMixin({namespace: namespace}), // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency withResourceVersion(resourceVersion):: self + __secretRefMixin({resourceVersion: resourceVersion}), // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids withUid(uid):: self + __secretRefMixin({uid: uid}), }, secretRefType:: hidden.core.v1.objectReference, // VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. withVolumeName(volumeName):: self + __storageosMixin({volumeName: volumeName}), // VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. withVolumeNamespace(volumeNamespace):: self + __storageosMixin({volumeNamespace: volumeNamespace}), }, storageosType:: hidden.core.v1.storageOSPersistentVolumeSource, // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine vsphereVolume:: { local __vsphereVolumeMixin(vsphereVolume) = __specMixin({vsphereVolume+: vsphereVolume}), mixinInstance(vsphereVolume):: __vsphereVolumeMixin(vsphereVolume), // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + __vsphereVolumeMixin({fsType: fsType}), // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. withStoragePolicyId(storagePolicyId):: self + __vsphereVolumeMixin({storagePolicyID: storagePolicyId}), // Storage Policy Based Management (SPBM) profile name. withStoragePolicyName(storagePolicyName):: self + __vsphereVolumeMixin({storagePolicyName: storagePolicyName}), // Path that identifies vSphere volume vmdk withVolumePath(volumePath):: self + __vsphereVolumeMixin({volumePath: volumePath}), }, vsphereVolumeType:: hidden.core.v1.vsphereVirtualDiskVolumeSource, }, specType:: hidden.core.v1.persistentVolumeSpec, }, }, // PersistentVolumeClaim is a user's request for and claim to a persistent volume persistentVolumeClaim:: { local kind = {kind: "PersistentVolumeClaim"}, new():: apiVersion + kind, mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 withAccessModes(accessModes):: self + if std.type(accessModes) == "array" then __specMixin({accessModes: accessModes}) else __specMixin({accessModes: [accessModes]}), // AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 withAccessModesMixin(accessModes):: self + if std.type(accessModes) == "array" then __specMixin({accessModes+: accessModes}) else __specMixin({accessModes+: [accessModes]}), // Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources resources:: { local __resourcesMixin(resources) = __specMixin({resources+: resources}), mixinInstance(resources):: __resourcesMixin(resources), // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ withLimits(limits):: self + __resourcesMixin({limits: limits}), // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ withLimitsMixin(limits):: self + __resourcesMixin({limits+: limits}), // Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ withRequests(requests):: self + __resourcesMixin({requests: requests}), // Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ withRequestsMixin(requests):: self + __resourcesMixin({requests+: requests}), }, resourcesType:: hidden.core.v1.resourceRequirements, // A label query over volumes to consider for binding. selector:: { local __selectorMixin(selector) = __specMixin({selector+: selector}), mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 withStorageClassName(storageClassName):: self + __specMixin({storageClassName: storageClassName}), // VolumeName is the binding reference to the PersistentVolume backing this claim. withVolumeName(volumeName):: self + __specMixin({volumeName: volumeName}), }, specType:: hidden.core.v1.persistentVolumeClaimSpec, }, }, // PersistentVolumeClaimList is a list of PersistentVolumeClaim items. persistentVolumeClaimList:: { local kind = {kind: "PersistentVolumeClaimList"}, new(items):: apiVersion + kind + self.withItems(items), // A list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // A list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.core.v1.persistentVolumeClaim, mixin:: { }, }, // PersistentVolumeList is a list of PersistentVolume items. persistentVolumeList:: { local kind = {kind: "PersistentVolumeList"}, new(items):: apiVersion + kind + self.withItems(items), // List of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // List of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.core.v1.persistentVolume, mixin:: { }, }, // Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts. pod:: { local kind = {kind: "Pod"}, new():: apiVersion + kind, mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, }, // PodList is a list of Pods. podList:: { local kind = {kind: "PodList"}, new(items):: apiVersion + kind + self.withItems(items), // List of pods. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // List of pods. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.core.v1.pod, mixin:: { }, }, // PodTemplate describes a template for creating copies of a predefined pod. podTemplate:: { local kind = {kind: "PodTemplate"}, new():: apiVersion + kind, mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Template defines the pods that will be created from this pod template. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status template:: { local __templateMixin(template) = {template+: template}, mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, }, }, // PodTemplateList is a list of PodTemplates. podTemplateList:: { local kind = {kind: "PodTemplateList"}, new(items):: apiVersion + kind + self.withItems(items), // List of pod templates withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // List of pod templates withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.core.v1.podTemplate, mixin:: { }, }, // ReplicationController represents the configuration of a replication controller. replicationController:: { local kind = {kind: "ReplicationController"}, new():: apiVersion + kind, mixin:: { // If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Spec defines the specification of the desired behavior of the replication controller. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) withMinReadySeconds(minReadySeconds):: self + __specMixin({minReadySeconds: minReadySeconds}), // Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller withReplicas(replicas):: self + __specMixin({replicas: replicas}), // Selector is a label query over pods that should match the Replicas count. If Selector is empty, it is defaulted to the labels present on the Pod template. Label keys and values that must match in order to be controlled by this replication controller, if empty defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors withSelector(selector):: self + __specMixin({selector: selector}), // Selector is a label query over pods that should match the Replicas count. If Selector is empty, it is defaulted to the labels present on the Pod template. Label keys and values that must match in order to be controlled by this replication controller, if empty defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors withSelectorMixin(selector):: self + __specMixin({selector+: selector}), // Template is the object that describes the pod that will be created if insufficient replicas are detected. This takes precedence over a TemplateRef. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template template:: { local __templateMixin(template) = __specMixin({template+: template}), mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, }, specType:: hidden.core.v1.replicationControllerSpec, }, }, // ReplicationControllerList is a collection of replication controllers. replicationControllerList:: { local kind = {kind: "ReplicationControllerList"}, new(items):: apiVersion + kind + self.withItems(items), // List of replication controllers. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // List of replication controllers. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.core.v1.replicationController, mixin:: { }, }, // ResourceQuota sets aggregate quota restrictions enforced per namespace resourceQuota:: { local kind = {kind: "ResourceQuota"}, new():: apiVersion + kind, mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Spec defines the desired quota. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // Hard is the set of desired hard limits for each named resource. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md withHard(hard):: self + __specMixin({hard: hard}), // Hard is the set of desired hard limits for each named resource. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md withHardMixin(hard):: self + __specMixin({hard+: hard}), // A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects. withScopes(scopes):: self + if std.type(scopes) == "array" then __specMixin({scopes: scopes}) else __specMixin({scopes: [scopes]}), // A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects. withScopesMixin(scopes):: self + if std.type(scopes) == "array" then __specMixin({scopes+: scopes}) else __specMixin({scopes+: [scopes]}), }, specType:: hidden.core.v1.resourceQuotaSpec, }, }, // ResourceQuotaList is a list of ResourceQuota items. resourceQuotaList:: { local kind = {kind: "ResourceQuotaList"}, new(items):: apiVersion + kind + self.withItems(items), // Items is a list of ResourceQuota objects. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is a list of ResourceQuota objects. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.core.v1.resourceQuota, mixin:: { }, }, // Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes. secret:: { local kind = {kind: "Secret"}, new(name, data, type="Opaque"):: apiVersion + kind + self.mixin.metadata.withName(name) + self.withData(data) + self.withType(type), fromString(name, stringData, type="Opaque"):: apiVersion + kind + self.mixin.metadata.withName(name) + self.withStringData(stringData) + self.withType(type), // Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4 withData(data):: self + {data: data}, // Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4 withDataMixin(data):: self + {data+: data}, // stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. withStringData(stringData):: self + {stringData: stringData}, // stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. withStringDataMixin(stringData):: self + {stringData+: stringData}, // Used to facilitate programmatic handling of secret data. withType(type):: self + {type: type}, mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, }, }, // SecretList is a list of Secret. secretList:: { local kind = {kind: "SecretList"}, new(items):: apiVersion + kind + self.withItems(items), // Items is a list of secret objects. More info: https://kubernetes.io/docs/concepts/configuration/secret withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is a list of secret objects. More info: https://kubernetes.io/docs/concepts/configuration/secret withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.core.v1.secret, mixin:: { }, }, // Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy. service:: { local kind = {kind: "Service"}, new(name, selector, ports):: apiVersion + kind + self.mixin.metadata.withName(name) + self.mixin.spec.withSelector(selector) + self.mixin.spec.withPorts(ports), mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // clusterIP is the IP address of the service and is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are "None", empty string (""), or a valid IP address. "None" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies withClusterIp(clusterIp):: self + __specMixin({clusterIP: clusterIp}), // externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system. withExternalIps(externalIps):: self + if std.type(externalIps) == "array" then __specMixin({externalIPs: externalIps}) else __specMixin({externalIPs: [externalIps]}), // externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system. withExternalIpsMixin(externalIps):: self + if std.type(externalIps) == "array" then __specMixin({externalIPs+: externalIps}) else __specMixin({externalIPs+: [externalIps]}), // externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid DNS name and requires Type to be ExternalName. withExternalName(externalName):: self + __specMixin({externalName: externalName}), // externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. "Local" preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. "Cluster" obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading. withExternalTrafficPolicy(externalTrafficPolicy):: self + __specMixin({externalTrafficPolicy: externalTrafficPolicy}), // healthCheckNodePort specifies the healthcheck nodePort for the service. If not specified, HealthCheckNodePort is created by the service api backend with the allocated nodePort. Will use user-specified nodePort value if specified by the client. Only effects when Type is set to LoadBalancer and ExternalTrafficPolicy is set to Local. withHealthCheckNodePort(healthCheckNodePort):: self + __specMixin({healthCheckNodePort: healthCheckNodePort}), // Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. withLoadBalancerIp(loadBalancerIp):: self + __specMixin({loadBalancerIP: loadBalancerIp}), // If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature." More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/ withLoadBalancerSourceRanges(loadBalancerSourceRanges):: self + if std.type(loadBalancerSourceRanges) == "array" then __specMixin({loadBalancerSourceRanges: loadBalancerSourceRanges}) else __specMixin({loadBalancerSourceRanges: [loadBalancerSourceRanges]}), // If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature." More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/ withLoadBalancerSourceRangesMixin(loadBalancerSourceRanges):: self + if std.type(loadBalancerSourceRanges) == "array" then __specMixin({loadBalancerSourceRanges+: loadBalancerSourceRanges}) else __specMixin({loadBalancerSourceRanges+: [loadBalancerSourceRanges]}), // The list of ports that are exposed by this service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies withPorts(ports):: self + if std.type(ports) == "array" then __specMixin({ports: ports}) else __specMixin({ports: [ports]}), // The list of ports that are exposed by this service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies withPortsMixin(ports):: self + if std.type(ports) == "array" then __specMixin({ports+: ports}) else __specMixin({ports+: [ports]}), portsType:: hidden.core.v1.servicePort, // publishNotReadyAddresses, when set to true, indicates that DNS implementations must publish the notReadyAddresses of subsets for the Endpoints associated with the Service. The default value is false. The primary use case for setting this field is to use a StatefulSet's Headless Service to propagate SRV records for its Pods without respect to their readiness for purpose of peer discovery. This field will replace the service.alpha.kubernetes.io/tolerate-unready-endpoints when that annotation is deprecated and all clients have been converted to use this field. withPublishNotReadyAddresses(publishNotReadyAddresses):: self + __specMixin({publishNotReadyAddresses: publishNotReadyAddresses}), // Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/ withSelector(selector):: self + __specMixin({selector: selector}), // Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/ withSelectorMixin(selector):: self + __specMixin({selector+: selector}), // Supports "ClientIP" and "None". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies withSessionAffinity(sessionAffinity):: self + __specMixin({sessionAffinity: sessionAffinity}), // sessionAffinityConfig contains the configurations of session affinity. sessionAffinityConfig:: { local __sessionAffinityConfigMixin(sessionAffinityConfig) = __specMixin({sessionAffinityConfig+: sessionAffinityConfig}), mixinInstance(sessionAffinityConfig):: __sessionAffinityConfigMixin(sessionAffinityConfig), // clientIP contains the configurations of Client IP based session affinity. clientIp:: { local __clientIpMixin(clientIp) = __sessionAffinityConfigMixin({clientIP+: clientIp}), mixinInstance(clientIp):: __clientIpMixin(clientIp), // timeoutSeconds specifies the seconds of ClientIP type session sticky time. The value must be >0 && <=86400(for 1 day) if ServiceAffinity == "ClientIP". Default value is 10800(for 3 hours). withTimeoutSeconds(timeoutSeconds):: self + __clientIpMixin({timeoutSeconds: timeoutSeconds}), }, clientIpType:: hidden.core.v1.clientIPConfig, }, sessionAffinityConfigType:: hidden.core.v1.sessionAffinityConfig, // type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. "ExternalName" maps to the specified externalName. "ClusterIP" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object. If clusterIP is "None", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. "NodePort" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. "LoadBalancer" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types withType(type):: self + __specMixin({type: type}), }, specType:: hidden.core.v1.serviceSpec, }, }, // 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 serviceAccount:: { local kind = {kind: "ServiceAccount"}, new(name):: apiVersion + kind + self.mixin.metadata.withName(name), // AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level. withAutomountServiceAccountToken(automountServiceAccountToken):: self + {automountServiceAccountToken: automountServiceAccountToken}, // 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 withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then {imagePullSecrets: imagePullSecrets} else {imagePullSecrets: [imagePullSecrets]}, // 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 withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then {imagePullSecrets+: imagePullSecrets} else {imagePullSecrets+: [imagePullSecrets]}, imagePullSecretsType:: hidden.core.v1.localObjectReference, // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. More info: https://kubernetes.io/docs/concepts/configuration/secret withSecrets(secrets):: self + if std.type(secrets) == "array" then {secrets: secrets} else {secrets: [secrets]}, // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. More info: https://kubernetes.io/docs/concepts/configuration/secret withSecretsMixin(secrets):: self + if std.type(secrets) == "array" then {secrets+: secrets} else {secrets+: [secrets]}, secretsType:: hidden.core.v1.objectReference, mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, }, }, // ServiceAccountList is a list of ServiceAccount objects serviceAccountList:: { local kind = {kind: "ServiceAccountList"}, new(items):: apiVersion + kind + self.withItems(items), // List of ServiceAccounts. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // List of ServiceAccounts. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.core.v1.serviceAccount, mixin:: { }, }, // ServiceList holds a list of services. serviceList:: { local kind = {kind: "ServiceList"}, new(items):: apiVersion + kind + self.withItems(items), // List of services withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // List of services withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.core.v1.service, mixin:: { }, }, }, }, extensions:: { v1beta1:: { local apiVersion = {apiVersion: "extensions/v1beta1"}, // DEPRECATED - This group version of DaemonSet is deprecated by apps/v1beta2/DaemonSet. See the release notes for more information. DaemonSet represents the configuration of a daemon set. daemonSet:: { local kind = {kind: "DaemonSet"}, new():: apiVersion + kind, mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready). withMinReadySeconds(minReadySeconds):: self + __specMixin({minReadySeconds: minReadySeconds}), // The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. withRevisionHistoryLimit(revisionHistoryLimit):: self + __specMixin({revisionHistoryLimit: revisionHistoryLimit}), // A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors selector:: { local __selectorMixin(selector) = __specMixin({selector+: selector}), mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template template:: { local __templateMixin(template) = __specMixin({template+: template}), mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, // An update strategy to replace existing DaemonSet pods with new pods. updateStrategy:: { local __updateStrategyMixin(updateStrategy) = __specMixin({updateStrategy+: updateStrategy}), mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), // Rolling update config params. Present only if type = "RollingUpdate". rollingUpdate:: { local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({rollingUpdate+: rollingUpdate}), mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), // The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), }, rollingUpdateType:: hidden.extensions.v1beta1.rollingUpdateDaemonSet, // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is OnDelete. withType(type):: self + __updateStrategyMixin({type: type}), }, updateStrategyType:: hidden.extensions.v1beta1.daemonSetUpdateStrategy, }, specType:: hidden.extensions.v1beta1.daemonSetSpec, }, }, // DaemonSetList is a collection of daemon sets. daemonSetList:: { local kind = {kind: "DaemonSetList"}, new(items):: apiVersion + kind + self.withItems(items), // A list of daemon sets. withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // A list of daemon sets. withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.extensions.v1beta1.daemonSet, mixin:: { }, }, // DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets. deployment:: { local kind = {kind: "Deployment"}, new(name, replicas, containers, podLabels={app: name}):: apiVersion + kind + self.mixin.metadata.withName(name) + self.mixin.spec.withReplicas(replicas) + self.mixin.spec.template.spec.withContainers(containers) + self.mixin.spec.template.metadata.withLabels(podLabels), mixin:: { // Standard object metadata. metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the Deployment. spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) withMinReadySeconds(minReadySeconds):: self + __specMixin({minReadySeconds: minReadySeconds}), // Indicates that the deployment is paused and will not be processed by the deployment controller. withPaused(paused):: self + __specMixin({paused: paused}), // The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. This is not set by default. withProgressDeadlineSeconds(progressDeadlineSeconds):: self + __specMixin({progressDeadlineSeconds: progressDeadlineSeconds}), // Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. withReplicas(replicas):: self + __specMixin({replicas: replicas}), // The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. withRevisionHistoryLimit(revisionHistoryLimit):: self + __specMixin({revisionHistoryLimit: revisionHistoryLimit}), // DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done. rollbackTo:: { local __rollbackToMixin(rollbackTo) = __specMixin({rollbackTo+: rollbackTo}), mixinInstance(rollbackTo):: __rollbackToMixin(rollbackTo), // The revision to rollback to. If set to 0, rollback to the last revision. withRevision(revision):: self + __rollbackToMixin({revision: revision}), }, rollbackToType:: hidden.extensions.v1beta1.rollbackConfig, // Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. selector:: { local __selectorMixin(selector) = __specMixin({selector+: selector}), mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // The deployment strategy to use to replace existing pods with new ones. strategy:: { local __strategyMixin(strategy) = __specMixin({strategy+: strategy}), mixinInstance(strategy):: __strategyMixin(strategy), // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. rollingUpdate:: { local __rollingUpdateMixin(rollingUpdate) = __strategyMixin({rollingUpdate+: rollingUpdate}), mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), // The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. By default, a value of 1 is used. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. withMaxSurge(maxSurge):: __rollingUpdateMixin({maxSurge: maxSurge}), // The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), }, rollingUpdateType:: hidden.extensions.v1beta1.rollingUpdateDeployment, // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. withType(type):: self + __strategyMixin({type: type}), }, strategyType:: hidden.extensions.v1beta1.deploymentStrategy, // Template describes the pods that will be created. template:: { local __templateMixin(template) = __specMixin({template+: template}), mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, }, specType:: hidden.extensions.v1beta1.deploymentSpec, }, }, // DeploymentList is a list of Deployments. deploymentList:: { local kind = {kind: "DeploymentList"}, new(items):: apiVersion + kind + self.withItems(items), // Items is the list of Deployments. withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is the list of Deployments. withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.extensions.v1beta1.deployment, mixin:: { }, }, // DEPRECATED. DeploymentRollback stores the information required to rollback a deployment. deploymentRollback:: { local kind = {kind: "DeploymentRollback"}, new(name):: apiVersion + kind + self.withName(name), // Required: This must match the Name of a deployment. withName(name):: self + {name: name}, // The annotations to be updated to a deployment withUpdatedAnnotations(updatedAnnotations):: self + {updatedAnnotations: updatedAnnotations}, // The annotations to be updated to a deployment withUpdatedAnnotationsMixin(updatedAnnotations):: self + {updatedAnnotations+: updatedAnnotations}, mixin:: { // The config of this deployment rollback. rollbackTo:: { local __rollbackToMixin(rollbackTo) = {rollbackTo+: rollbackTo}, mixinInstance(rollbackTo):: __rollbackToMixin(rollbackTo), // The revision to rollback to. If set to 0, rollback to the last revision. withRevision(revision):: self + __rollbackToMixin({revision: revision}), }, rollbackToType:: hidden.extensions.v1beta1.rollbackConfig, }, }, // Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc. ingress:: { local kind = {kind: "Ingress"}, new():: apiVersion + kind, mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default. backend:: { local __backendMixin(backend) = __specMixin({backend+: backend}), mixinInstance(backend):: __backendMixin(backend), // Specifies the name of the referenced service. withServiceName(serviceName):: self + __backendMixin({serviceName: serviceName}), // Specifies the port of the referenced service. withServicePort(servicePort):: __backendMixin({servicePort: servicePort}), }, backendType:: hidden.extensions.v1beta1.ingressBackend, // A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend. withRules(rules):: self + if std.type(rules) == "array" then __specMixin({rules: rules}) else __specMixin({rules: [rules]}), // A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend. withRulesMixin(rules):: self + if std.type(rules) == "array" then __specMixin({rules+: rules}) else __specMixin({rules+: [rules]}), rulesType:: hidden.extensions.v1beta1.ingressRule, // TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI. withTls(tls):: self + if std.type(tls) == "array" then __specMixin({tls: tls}) else __specMixin({tls: [tls]}), // TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI. withTlsMixin(tls):: self + if std.type(tls) == "array" then __specMixin({tls+: tls}) else __specMixin({tls+: [tls]}), tlsType:: hidden.extensions.v1beta1.ingressTls, }, specType:: hidden.extensions.v1beta1.ingressSpec, }, }, // IngressList is a collection of Ingress. ingressList:: { local kind = {kind: "IngressList"}, new(items):: apiVersion + kind + self.withItems(items), // Items is the list of Ingress. withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is the list of Ingress. withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.extensions.v1beta1.ingress, mixin:: { }, }, // NetworkPolicy describes what network traffic is allowed for a set of Pods networkPolicy:: { local kind = {kind: "NetworkPolicy"}, new():: apiVersion + kind, mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior for this NetworkPolicy. spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8 withEgress(egress):: self + if std.type(egress) == "array" then __specMixin({egress: egress}) else __specMixin({egress: [egress]}), // List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8 withEgressMixin(egress):: self + if std.type(egress) == "array" then __specMixin({egress+: egress}) else __specMixin({egress+: [egress]}), egressType:: hidden.extensions.v1beta1.networkPolicyEgressRule, // List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default). withIngress(ingress):: self + if std.type(ingress) == "array" then __specMixin({ingress: ingress}) else __specMixin({ingress: [ingress]}), // List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default). withIngressMixin(ingress):: self + if std.type(ingress) == "array" then __specMixin({ingress+: ingress}) else __specMixin({ingress+: [ingress]}), ingressType:: hidden.extensions.v1beta1.networkPolicyIngressRule, // Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace. podSelector:: { local __podSelectorMixin(podSelector) = __specMixin({podSelector+: podSelector}), mixinInstance(podSelector):: __podSelectorMixin(podSelector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions: matchExpressions}) else __podSelectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions+: matchExpressions}) else __podSelectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __podSelectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __podSelectorMixin({matchLabels+: matchLabels}), }, podSelectorType:: hidden.meta.v1.labelSelector, // List of rule types that the NetworkPolicy relates to. Valid options are Ingress, Egress, or Ingress,Egress. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 withPolicyTypes(policyTypes):: self + if std.type(policyTypes) == "array" then __specMixin({policyTypes: policyTypes}) else __specMixin({policyTypes: [policyTypes]}), // List of rule types that the NetworkPolicy relates to. Valid options are Ingress, Egress, or Ingress,Egress. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 withPolicyTypesMixin(policyTypes):: self + if std.type(policyTypes) == "array" then __specMixin({policyTypes+: policyTypes}) else __specMixin({policyTypes+: [policyTypes]}), }, specType:: hidden.extensions.v1beta1.networkPolicySpec, }, }, // Network Policy List is a list of NetworkPolicy objects. networkPolicyList:: { local kind = {kind: "NetworkPolicyList"}, new(items):: apiVersion + kind + self.withItems(items), // Items is a list of schema objects. withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is a list of schema objects. withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.extensions.v1beta1.networkPolicy, mixin:: { }, }, // Pod Security Policy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. podSecurityPolicy:: { local kind = {kind: "PodSecurityPolicy"}, new():: apiVersion + kind, mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // spec defines the policy enforced. spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // AllowPrivilegeEscalation determines if a pod can request to allow privilege escalation. withAllowPrivilegeEscalation(allowPrivilegeEscalation):: self + __specMixin({allowPrivilegeEscalation: allowPrivilegeEscalation}), // AllowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities. withAllowedCapabilities(allowedCapabilities):: self + if std.type(allowedCapabilities) == "array" then __specMixin({allowedCapabilities: allowedCapabilities}) else __specMixin({allowedCapabilities: [allowedCapabilities]}), // AllowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities. withAllowedCapabilitiesMixin(allowedCapabilities):: self + if std.type(allowedCapabilities) == "array" then __specMixin({allowedCapabilities+: allowedCapabilities}) else __specMixin({allowedCapabilities+: [allowedCapabilities]}), // is a white list of allowed host paths. Empty indicates that all host paths may be used. withAllowedHostPaths(allowedHostPaths):: self + if std.type(allowedHostPaths) == "array" then __specMixin({allowedHostPaths: allowedHostPaths}) else __specMixin({allowedHostPaths: [allowedHostPaths]}), // is a white list of allowed host paths. Empty indicates that all host paths may be used. withAllowedHostPathsMixin(allowedHostPaths):: self + if std.type(allowedHostPaths) == "array" then __specMixin({allowedHostPaths+: allowedHostPaths}) else __specMixin({allowedHostPaths+: [allowedHostPaths]}), allowedHostPathsType:: hidden.extensions.v1beta1.allowedHostPath, // DefaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capabiility in both DefaultAddCapabilities and RequiredDropCapabilities. withDefaultAddCapabilities(defaultAddCapabilities):: self + if std.type(defaultAddCapabilities) == "array" then __specMixin({defaultAddCapabilities: defaultAddCapabilities}) else __specMixin({defaultAddCapabilities: [defaultAddCapabilities]}), // DefaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capabiility in both DefaultAddCapabilities and RequiredDropCapabilities. withDefaultAddCapabilitiesMixin(defaultAddCapabilities):: self + if std.type(defaultAddCapabilities) == "array" then __specMixin({defaultAddCapabilities+: defaultAddCapabilities}) else __specMixin({defaultAddCapabilities+: [defaultAddCapabilities]}), // DefaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process. withDefaultAllowPrivilegeEscalation(defaultAllowPrivilegeEscalation):: self + __specMixin({defaultAllowPrivilegeEscalation: defaultAllowPrivilegeEscalation}), // FSGroup is the strategy that will dictate what fs group is used by the SecurityContext. fsGroup:: { local __fsGroupMixin(fsGroup) = __specMixin({fsGroup+: fsGroup}), mixinInstance(fsGroup):: __fsGroupMixin(fsGroup), // Ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end. withRanges(ranges):: self + if std.type(ranges) == "array" then __fsGroupMixin({ranges: ranges}) else __fsGroupMixin({ranges: [ranges]}), // Ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end. withRangesMixin(ranges):: self + if std.type(ranges) == "array" then __fsGroupMixin({ranges+: ranges}) else __fsGroupMixin({ranges+: [ranges]}), rangesType:: hidden.extensions.v1beta1.idRange, // Rule is the strategy that will dictate what FSGroup is used in the SecurityContext. withRule(rule):: self + __fsGroupMixin({rule: rule}), }, fsGroupType:: hidden.extensions.v1beta1.fsGroupStrategyOptions, // hostIPC determines if the policy allows the use of HostIPC in the pod spec. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // hostPID determines if the policy allows the use of HostPID in the pod spec. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // hostPorts determines which host port ranges are allowed to be exposed. withHostPorts(hostPorts):: self + if std.type(hostPorts) == "array" then __specMixin({hostPorts: hostPorts}) else __specMixin({hostPorts: [hostPorts]}), // hostPorts determines which host port ranges are allowed to be exposed. withHostPortsMixin(hostPorts):: self + if std.type(hostPorts) == "array" then __specMixin({hostPorts+: hostPorts}) else __specMixin({hostPorts+: [hostPorts]}), hostPortsType:: hidden.extensions.v1beta1.hostPortRange, // privileged determines if a pod can request to be run as privileged. withPrivileged(privileged):: self + __specMixin({privileged: privileged}), // ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to. withReadOnlyRootFilesystem(readOnlyRootFilesystem):: self + __specMixin({readOnlyRootFilesystem: readOnlyRootFilesystem}), // RequiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added. withRequiredDropCapabilities(requiredDropCapabilities):: self + if std.type(requiredDropCapabilities) == "array" then __specMixin({requiredDropCapabilities: requiredDropCapabilities}) else __specMixin({requiredDropCapabilities: [requiredDropCapabilities]}), // RequiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added. withRequiredDropCapabilitiesMixin(requiredDropCapabilities):: self + if std.type(requiredDropCapabilities) == "array" then __specMixin({requiredDropCapabilities+: requiredDropCapabilities}) else __specMixin({requiredDropCapabilities+: [requiredDropCapabilities]}), // runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set. runAsUser:: { local __runAsUserMixin(runAsUser) = __specMixin({runAsUser+: runAsUser}), mixinInstance(runAsUser):: __runAsUserMixin(runAsUser), // Ranges are the allowed ranges of uids that may be used. withRanges(ranges):: self + if std.type(ranges) == "array" then __runAsUserMixin({ranges: ranges}) else __runAsUserMixin({ranges: [ranges]}), // Ranges are the allowed ranges of uids that may be used. withRangesMixin(ranges):: self + if std.type(ranges) == "array" then __runAsUserMixin({ranges+: ranges}) else __runAsUserMixin({ranges+: [ranges]}), rangesType:: hidden.extensions.v1beta1.idRange, // Rule is the strategy that will dictate the allowable RunAsUser values that may be set. withRule(rule):: self + __runAsUserMixin({rule: rule}), }, runAsUserType:: hidden.extensions.v1beta1.runAsUserStrategyOptions, // seLinux is the strategy that will dictate the allowable labels that may be set. seLinux:: { local __seLinuxMixin(seLinux) = __specMixin({seLinux+: seLinux}), mixinInstance(seLinux):: __seLinuxMixin(seLinux), // type is the strategy that will dictate the allowable labels that may be set. withRule(rule):: self + __seLinuxMixin({rule: rule}), // seLinuxOptions required to run as; required for MustRunAs More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __seLinuxMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, }, seLinuxType:: hidden.extensions.v1beta1.seLinuxStrategyOptions, // SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext. supplementalGroups:: { local __supplementalGroupsMixin(supplementalGroups) = __specMixin({supplementalGroups+: supplementalGroups}), mixinInstance(supplementalGroups):: __supplementalGroupsMixin(supplementalGroups), // Ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end. withRanges(ranges):: self + if std.type(ranges) == "array" then __supplementalGroupsMixin({ranges: ranges}) else __supplementalGroupsMixin({ranges: [ranges]}), // Ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end. withRangesMixin(ranges):: self + if std.type(ranges) == "array" then __supplementalGroupsMixin({ranges+: ranges}) else __supplementalGroupsMixin({ranges+: [ranges]}), rangesType:: hidden.extensions.v1beta1.idRange, // Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. withRule(rule):: self + __supplementalGroupsMixin({rule: rule}), }, supplementalGroupsType:: hidden.extensions.v1beta1.supplementalGroupsStrategyOptions, // volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used. withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used. withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), }, specType:: hidden.extensions.v1beta1.podSecurityPolicySpec, }, }, // Pod Security Policy List is a list of PodSecurityPolicy objects. podSecurityPolicyList:: { local kind = {kind: "PodSecurityPolicyList"}, new(items):: apiVersion + kind + self.withItems(items), // Items is a list of schema objects. withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is a list of schema objects. withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.extensions.v1beta1.podSecurityPolicy, mixin:: { }, }, // DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1beta2/ReplicaSet. See the release notes for more information. ReplicaSet represents the configuration of a ReplicaSet. replicaSet:: { local kind = {kind: "ReplicaSet"}, new():: apiVersion + kind, mixin:: { // If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) withMinReadySeconds(minReadySeconds):: self + __specMixin({minReadySeconds: minReadySeconds}), // Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller withReplicas(replicas):: self + __specMixin({replicas: replicas}), // Selector is a label query over pods that should match the replica count. If the selector is empty, it is defaulted to the labels present on the pod template. Label keys and values that must match in order to be controlled by this replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors selector:: { local __selectorMixin(selector) = __specMixin({selector+: selector}), mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template template:: { local __templateMixin(template) = __specMixin({template+: template}), mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, }, specType:: hidden.extensions.v1beta1.replicaSetSpec, }, }, // ReplicaSetList is a collection of ReplicaSets. replicaSetList:: { local kind = {kind: "ReplicaSetList"}, new(items):: apiVersion + kind + self.withItems(items), // List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.extensions.v1beta1.replicaSet, mixin:: { }, }, // represents a scaling request for a resource. scale:: { local kind = {kind: "Scale"}, new(replicas):: apiVersion + kind + self.mixin.spec.withReplicas(replicas), mixin:: { // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // desired number of instances for the scaled object. withReplicas(replicas):: self + __specMixin({replicas: replicas}), }, specType:: hidden.extensions.v1beta1.scaleSpec, }, }, }, }, meta:: { v1:: { local apiVersion = {apiVersion: "meta/v1"}, // APIGroup contains the name, the supported versions, and the preferred version of a group. apiGroup:: { local kind = {kind: "APIGroup"}, new():: apiVersion + kind, // name is the name of the group. withName(name):: self + {name: name}, // a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. withServerAddressByClientCidrs(serverAddressByClientCidrs):: self + if std.type(serverAddressByClientCidrs) == "array" then {serverAddressByClientCIDRs: serverAddressByClientCidrs} else {serverAddressByClientCIDRs: [serverAddressByClientCidrs]}, // a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. withServerAddressByClientCidrsMixin(serverAddressByClientCidrs):: self + if std.type(serverAddressByClientCidrs) == "array" then {serverAddressByClientCIDRs+: serverAddressByClientCidrs} else {serverAddressByClientCIDRs+: [serverAddressByClientCidrs]}, serverAddressByClientCidrsType:: hidden.meta.v1.serverAddressByClientCidr, // versions are the versions supported in this group. withVersions(versions):: self + if std.type(versions) == "array" then {versions: versions} else {versions: [versions]}, // versions are the versions supported in this group. withVersionsMixin(versions):: self + if std.type(versions) == "array" then {versions+: versions} else {versions+: [versions]}, versionsType:: hidden.meta.v1.groupVersionForDiscovery, mixin:: { // preferredVersion is the version preferred by the API server, which probably is the storage version. preferredVersion:: { local __preferredVersionMixin(preferredVersion) = {preferredVersion+: preferredVersion}, mixinInstance(preferredVersion):: __preferredVersionMixin(preferredVersion), // groupVersion specifies the API group and version in the form "group/version" withGroupVersion(groupVersion):: self + __preferredVersionMixin({groupVersion: groupVersion}), // version specifies the version in the form of "version". This is to save the clients the trouble of splitting the GroupVersion. withVersion(version):: self + __preferredVersionMixin({version: version}), }, preferredVersionType:: hidden.meta.v1.groupVersionForDiscovery, }, }, // APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis. apiGroupList:: { local kind = {kind: "APIGroupList"}, new():: apiVersion + kind, // groups is a list of APIGroup. withGroups(groups):: self + if std.type(groups) == "array" then {groups: groups} else {groups: [groups]}, // groups is a list of APIGroup. withGroupsMixin(groups):: self + if std.type(groups) == "array" then {groups+: groups} else {groups+: [groups]}, groupsType:: hidden.meta.v1.apiGroup, mixin:: { }, }, // APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced. apiResourceList:: { local kind = {kind: "APIResourceList"}, new():: apiVersion + kind, // groupVersion is the group and version this APIResourceList is for. withGroupVersion(groupVersion):: self + {groupVersion: groupVersion}, // resources contains the name of the resources and if they are namespaced. withResources(resources):: self + if std.type(resources) == "array" then {resources: resources} else {resources: [resources]}, // resources contains the name of the resources and if they are namespaced. withResourcesMixin(resources):: self + if std.type(resources) == "array" then {resources+: resources} else {resources+: [resources]}, resourcesType:: hidden.meta.v1.apiResource, mixin:: { }, }, // APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API. apiVersions:: { local kind = {kind: "APIVersions"}, new():: apiVersion + kind, // a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. withServerAddressByClientCidrs(serverAddressByClientCidrs):: self + if std.type(serverAddressByClientCidrs) == "array" then {serverAddressByClientCIDRs: serverAddressByClientCidrs} else {serverAddressByClientCIDRs: [serverAddressByClientCidrs]}, // a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. withServerAddressByClientCidrsMixin(serverAddressByClientCidrs):: self + if std.type(serverAddressByClientCidrs) == "array" then {serverAddressByClientCIDRs+: serverAddressByClientCidrs} else {serverAddressByClientCIDRs+: [serverAddressByClientCidrs]}, serverAddressByClientCidrsType:: hidden.meta.v1.serverAddressByClientCidr, // versions are the api versions that are available. withVersions(versions):: self + if std.type(versions) == "array" then {versions: versions} else {versions: [versions]}, // versions are the api versions that are available. withVersionsMixin(versions):: self + if std.type(versions) == "array" then {versions+: versions} else {versions+: [versions]}, mixin:: { }, }, // DeleteOptions may be provided when deleting an API object. deleteOptions:: { local kind = {kind: "DeleteOptions"}, new():: apiVersion + kind, // The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. withGracePeriodSeconds(gracePeriodSeconds):: self + {gracePeriodSeconds: gracePeriodSeconds}, // Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. withOrphanDependents(orphanDependents):: self + {orphanDependents: orphanDependents}, // Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. withPropagationPolicy(propagationPolicy):: self + {propagationPolicy: propagationPolicy}, mixin:: { // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned. preconditions:: { local __preconditionsMixin(preconditions) = {preconditions+: preconditions}, mixinInstance(preconditions):: __preconditionsMixin(preconditions), // Specifies the target UID. withUid(uid):: self + __preconditionsMixin({uid: uid}), }, preconditionsType:: hidden.meta.v1.preconditions, }, }, // Status is a return value for calls that don't return other objects. status:: { local kind = {kind: "Status"}, new():: apiVersion + kind, // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + {code: code}, // A human-readable description of the status of this operation. withMessage(message):: self + {message: 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. withReason(reason):: self + {reason: reason}, mixin:: { // 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. details:: { local __detailsMixin(details) = {details+: details}, mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, }, }, // Event represents a single event to a watched resource. watchEvent:: { local kind = {kind: "WatchEvent"}, new():: apiVersion + kind, // withType(type):: self + {type: type}, mixin:: { }, }, }, }, networking:: { v1:: { local apiVersion = {apiVersion: "networking.k8s.io/v1"}, // NetworkPolicy describes what network traffic is allowed for a set of Pods networkPolicy:: { local kind = {kind: "NetworkPolicy"}, new():: apiVersion + kind, mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior for this NetworkPolicy. spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8 withEgress(egress):: self + if std.type(egress) == "array" then __specMixin({egress: egress}) else __specMixin({egress: [egress]}), // List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8 withEgressMixin(egress):: self + if std.type(egress) == "array" then __specMixin({egress+: egress}) else __specMixin({egress+: [egress]}), egressType:: hidden.networking.v1.networkPolicyEgressRule, // List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default) withIngress(ingress):: self + if std.type(ingress) == "array" then __specMixin({ingress: ingress}) else __specMixin({ingress: [ingress]}), // List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default) withIngressMixin(ingress):: self + if std.type(ingress) == "array" then __specMixin({ingress+: ingress}) else __specMixin({ingress+: [ingress]}), ingressType:: hidden.networking.v1.networkPolicyIngressRule, // Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace. podSelector:: { local __podSelectorMixin(podSelector) = __specMixin({podSelector+: podSelector}), mixinInstance(podSelector):: __podSelectorMixin(podSelector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions: matchExpressions}) else __podSelectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions+: matchExpressions}) else __podSelectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __podSelectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __podSelectorMixin({matchLabels+: matchLabels}), }, podSelectorType:: hidden.meta.v1.labelSelector, // List of rule types that the NetworkPolicy relates to. Valid options are Ingress, Egress, or Ingress,Egress. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 withPolicyTypes(policyTypes):: self + if std.type(policyTypes) == "array" then __specMixin({policyTypes: policyTypes}) else __specMixin({policyTypes: [policyTypes]}), // List of rule types that the NetworkPolicy relates to. Valid options are Ingress, Egress, or Ingress,Egress. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 withPolicyTypesMixin(policyTypes):: self + if std.type(policyTypes) == "array" then __specMixin({policyTypes+: policyTypes}) else __specMixin({policyTypes+: [policyTypes]}), }, specType:: hidden.networking.v1.networkPolicySpec, }, }, // NetworkPolicyList is a list of NetworkPolicy objects. networkPolicyList:: { local kind = {kind: "NetworkPolicyList"}, new(items):: apiVersion + kind + self.withItems(items), // Items is a list of schema objects. withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is a list of schema objects. withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.networking.v1.networkPolicy, mixin:: { }, }, }, }, policy:: { v1beta1:: { local apiVersion = {apiVersion: "policy/v1beta1"}, // Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods//evictions. eviction:: { local kind = {kind: "Eviction"}, new():: apiVersion + kind, mixin:: { // DeleteOptions may be provided deleteOptions:: { local __deleteOptionsMixin(deleteOptions) = {deleteOptions+: deleteOptions}, mixinInstance(deleteOptions):: __deleteOptionsMixin(deleteOptions), // The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. withGracePeriodSeconds(gracePeriodSeconds):: self + __deleteOptionsMixin({gracePeriodSeconds: gracePeriodSeconds}), // Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. withOrphanDependents(orphanDependents):: self + __deleteOptionsMixin({orphanDependents: orphanDependents}), // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned. preconditions:: { local __preconditionsMixin(preconditions) = __deleteOptionsMixin({preconditions+: preconditions}), mixinInstance(preconditions):: __preconditionsMixin(preconditions), // Specifies the target UID. withUid(uid):: self + __preconditionsMixin({uid: uid}), }, preconditionsType:: hidden.meta.v1.preconditions, // Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. withPropagationPolicy(propagationPolicy):: self + __deleteOptionsMixin({propagationPolicy: propagationPolicy}), }, deleteOptionsType:: hidden.meta.v1.deleteOptions, // ObjectMeta describes the pod that is being evicted. metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, }, }, // PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods podDisruptionBudget:: { local kind = {kind: "PodDisruptionBudget"}, new():: apiVersion + kind, mixin:: { // metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the PodDisruptionBudget. spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with "minAvailable". withMaxUnavailable(maxUnavailable):: __specMixin({maxUnavailable: maxUnavailable}), // An eviction is allowed if at least "minAvailable" pods selected by "selector" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying "100%". withMinAvailable(minAvailable):: __specMixin({minAvailable: minAvailable}), // Label query over pods whose evictions are managed by the disruption budget. selector:: { local __selectorMixin(selector) = __specMixin({selector+: selector}), mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, }, specType:: hidden.policy.v1beta1.podDisruptionBudgetSpec, }, }, // PodDisruptionBudgetList is a collection of PodDisruptionBudgets. podDisruptionBudgetList:: { local kind = {kind: "PodDisruptionBudgetList"}, new(items):: apiVersion + kind + self.withItems(items), // withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.policy.v1beta1.podDisruptionBudget, mixin:: { }, }, }, }, rbac:: { v1:: { local apiVersion = {apiVersion: "rbac.authorization.k8s.io/v1"}, // ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. clusterRole:: { local kind = {kind: "ClusterRole"}, new():: apiVersion + kind, // Rules holds all the PolicyRules for this ClusterRole withRules(rules):: self + if std.type(rules) == "array" then {rules: rules} else {rules: [rules]}, // Rules holds all the PolicyRules for this ClusterRole withRulesMixin(rules):: self + if std.type(rules) == "array" then {rules+: rules} else {rules+: [rules]}, rulesType:: hidden.rbac.v1.policyRule, mixin:: { // Standard object's metadata. metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, }, }, // ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. clusterRoleBinding:: { local kind = {kind: "ClusterRoleBinding"}, new():: apiVersion + kind, // Subjects holds references to the objects the role applies to. withSubjects(subjects):: self + if std.type(subjects) == "array" then {subjects: subjects} else {subjects: [subjects]}, // Subjects holds references to the objects the role applies to. withSubjectsMixin(subjects):: self + if std.type(subjects) == "array" then {subjects+: subjects} else {subjects+: [subjects]}, subjectsType:: hidden.rbac.v1.subject, mixin:: { // Standard object's metadata. metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. roleRef:: { local __roleRefMixin(roleRef) = {roleRef+: roleRef}, mixinInstance(roleRef):: __roleRefMixin(roleRef), // APIGroup is the group for the resource being referenced withApiGroup(apiGroup):: self + __roleRefMixin({apiGroup: apiGroup}), // Name is the name of resource being referenced withName(name):: self + __roleRefMixin({name: name}), }, roleRefType:: hidden.rbac.v1.roleRef, }, }, // ClusterRoleBindingList is a collection of ClusterRoleBindings clusterRoleBindingList:: { local kind = {kind: "ClusterRoleBindingList"}, new(items):: apiVersion + kind + self.withItems(items), // Items is a list of ClusterRoleBindings withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is a list of ClusterRoleBindings withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.rbac.v1.clusterRoleBinding, mixin:: { }, }, // ClusterRoleList is a collection of ClusterRoles clusterRoleList:: { local kind = {kind: "ClusterRoleList"}, new(items):: apiVersion + kind + self.withItems(items), // Items is a list of ClusterRoles withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is a list of ClusterRoles withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.rbac.v1.clusterRole, mixin:: { }, }, // Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. role:: { local kind = {kind: "Role"}, new():: apiVersion + kind, // Rules holds all the PolicyRules for this Role withRules(rules):: self + if std.type(rules) == "array" then {rules: rules} else {rules: [rules]}, // Rules holds all the PolicyRules for this Role withRulesMixin(rules):: self + if std.type(rules) == "array" then {rules+: rules} else {rules+: [rules]}, rulesType:: hidden.rbac.v1.policyRule, mixin:: { // Standard object's metadata. metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, }, }, // RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. roleBinding:: { local kind = {kind: "RoleBinding"}, new():: apiVersion + kind, // Subjects holds references to the objects the role applies to. withSubjects(subjects):: self + if std.type(subjects) == "array" then {subjects: subjects} else {subjects: [subjects]}, // Subjects holds references to the objects the role applies to. withSubjectsMixin(subjects):: self + if std.type(subjects) == "array" then {subjects+: subjects} else {subjects+: [subjects]}, subjectsType:: hidden.rbac.v1.subject, mixin:: { // Standard object's metadata. metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. roleRef:: { local __roleRefMixin(roleRef) = {roleRef+: roleRef}, mixinInstance(roleRef):: __roleRefMixin(roleRef), // APIGroup is the group for the resource being referenced withApiGroup(apiGroup):: self + __roleRefMixin({apiGroup: apiGroup}), // Name is the name of resource being referenced withName(name):: self + __roleRefMixin({name: name}), }, roleRefType:: hidden.rbac.v1.roleRef, }, }, // RoleBindingList is a collection of RoleBindings roleBindingList:: { local kind = {kind: "RoleBindingList"}, new(items):: apiVersion + kind + self.withItems(items), // Items is a list of RoleBindings withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is a list of RoleBindings withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.rbac.v1.roleBinding, mixin:: { }, }, // RoleList is a collection of Roles roleList:: { local kind = {kind: "RoleList"}, new(items):: apiVersion + kind + self.withItems(items), // Items is a list of Roles withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is a list of Roles withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.rbac.v1.role, mixin:: { }, }, }, v1alpha1:: { local apiVersion = {apiVersion: "rbac.authorization.k8s.io/v1alpha1"}, // ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. clusterRole:: { local kind = {kind: "ClusterRole"}, new():: apiVersion + kind, // Rules holds all the PolicyRules for this ClusterRole withRules(rules):: self + if std.type(rules) == "array" then {rules: rules} else {rules: [rules]}, // Rules holds all the PolicyRules for this ClusterRole withRulesMixin(rules):: self + if std.type(rules) == "array" then {rules+: rules} else {rules+: [rules]}, rulesType:: hidden.rbac.v1alpha1.policyRule, mixin:: { // Standard object's metadata. metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, }, }, // ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. clusterRoleBinding:: { local kind = {kind: "ClusterRoleBinding"}, new():: apiVersion + kind, // Subjects holds references to the objects the role applies to. withSubjects(subjects):: self + if std.type(subjects) == "array" then {subjects: subjects} else {subjects: [subjects]}, // Subjects holds references to the objects the role applies to. withSubjectsMixin(subjects):: self + if std.type(subjects) == "array" then {subjects+: subjects} else {subjects+: [subjects]}, subjectsType:: hidden.rbac.v1alpha1.subject, mixin:: { // Standard object's metadata. metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. roleRef:: { local __roleRefMixin(roleRef) = {roleRef+: roleRef}, mixinInstance(roleRef):: __roleRefMixin(roleRef), // APIGroup is the group for the resource being referenced withApiGroup(apiGroup):: self + __roleRefMixin({apiGroup: apiGroup}), // Name is the name of resource being referenced withName(name):: self + __roleRefMixin({name: name}), }, roleRefType:: hidden.rbac.v1alpha1.roleRef, }, }, // ClusterRoleBindingList is a collection of ClusterRoleBindings clusterRoleBindingList:: { local kind = {kind: "ClusterRoleBindingList"}, new():: apiVersion + kind, // Items is a list of ClusterRoleBindings withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is a list of ClusterRoleBindings withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.rbac.v1alpha1.clusterRoleBinding, mixin:: { }, }, // ClusterRoleList is a collection of ClusterRoles clusterRoleList:: { local kind = {kind: "ClusterRoleList"}, new():: apiVersion + kind, // Items is a list of ClusterRoles withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is a list of ClusterRoles withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.rbac.v1alpha1.clusterRole, mixin:: { }, }, // Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. role:: { local kind = {kind: "Role"}, new():: apiVersion + kind, // Rules holds all the PolicyRules for this Role withRules(rules):: self + if std.type(rules) == "array" then {rules: rules} else {rules: [rules]}, // Rules holds all the PolicyRules for this Role withRulesMixin(rules):: self + if std.type(rules) == "array" then {rules+: rules} else {rules+: [rules]}, rulesType:: hidden.rbac.v1alpha1.policyRule, mixin:: { // Standard object's metadata. metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, }, }, // RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. roleBinding:: { local kind = {kind: "RoleBinding"}, new():: apiVersion + kind, // Subjects holds references to the objects the role applies to. withSubjects(subjects):: self + if std.type(subjects) == "array" then {subjects: subjects} else {subjects: [subjects]}, // Subjects holds references to the objects the role applies to. withSubjectsMixin(subjects):: self + if std.type(subjects) == "array" then {subjects+: subjects} else {subjects+: [subjects]}, subjectsType:: hidden.rbac.v1alpha1.subject, mixin:: { // Standard object's metadata. metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. roleRef:: { local __roleRefMixin(roleRef) = {roleRef+: roleRef}, mixinInstance(roleRef):: __roleRefMixin(roleRef), // APIGroup is the group for the resource being referenced withApiGroup(apiGroup):: self + __roleRefMixin({apiGroup: apiGroup}), // Name is the name of resource being referenced withName(name):: self + __roleRefMixin({name: name}), }, roleRefType:: hidden.rbac.v1alpha1.roleRef, }, }, // RoleBindingList is a collection of RoleBindings roleBindingList:: { local kind = {kind: "RoleBindingList"}, new():: apiVersion + kind, // Items is a list of RoleBindings withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is a list of RoleBindings withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.rbac.v1alpha1.roleBinding, mixin:: { }, }, // RoleList is a collection of Roles roleList:: { local kind = {kind: "RoleList"}, new():: apiVersion + kind, // Items is a list of Roles withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is a list of Roles withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.rbac.v1alpha1.role, mixin:: { }, }, }, v1beta1:: { local apiVersion = {apiVersion: "rbac.authorization.k8s.io/v1beta1"}, // ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. clusterRole:: { local kind = {kind: "ClusterRole"}, new():: apiVersion + kind, // Rules holds all the PolicyRules for this ClusterRole withRules(rules):: self + if std.type(rules) == "array" then {rules: rules} else {rules: [rules]}, // Rules holds all the PolicyRules for this ClusterRole withRulesMixin(rules):: self + if std.type(rules) == "array" then {rules+: rules} else {rules+: [rules]}, rulesType:: hidden.rbac.v1beta1.policyRule, mixin:: { // Standard object's metadata. metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, }, }, // ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. clusterRoleBinding:: { local kind = {kind: "ClusterRoleBinding"}, new():: apiVersion + kind, // Subjects holds references to the objects the role applies to. withSubjects(subjects):: self + if std.type(subjects) == "array" then {subjects: subjects} else {subjects: [subjects]}, // Subjects holds references to the objects the role applies to. withSubjectsMixin(subjects):: self + if std.type(subjects) == "array" then {subjects+: subjects} else {subjects+: [subjects]}, subjectsType:: hidden.rbac.v1beta1.subject, mixin:: { // Standard object's metadata. metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. roleRef:: { local __roleRefMixin(roleRef) = {roleRef+: roleRef}, mixinInstance(roleRef):: __roleRefMixin(roleRef), // APIGroup is the group for the resource being referenced withApiGroup(apiGroup):: self + __roleRefMixin({apiGroup: apiGroup}), // Name is the name of resource being referenced withName(name):: self + __roleRefMixin({name: name}), }, roleRefType:: hidden.rbac.v1beta1.roleRef, }, }, // ClusterRoleBindingList is a collection of ClusterRoleBindings clusterRoleBindingList:: { local kind = {kind: "ClusterRoleBindingList"}, new(items):: apiVersion + kind + self.withItems(items), // Items is a list of ClusterRoleBindings withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is a list of ClusterRoleBindings withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.rbac.v1beta1.clusterRoleBinding, mixin:: { }, }, // ClusterRoleList is a collection of ClusterRoles clusterRoleList:: { local kind = {kind: "ClusterRoleList"}, new(items):: apiVersion + kind + self.withItems(items), // Items is a list of ClusterRoles withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is a list of ClusterRoles withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.rbac.v1beta1.clusterRole, mixin:: { }, }, // Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. role:: { local kind = {kind: "Role"}, new():: apiVersion + kind, // Rules holds all the PolicyRules for this Role withRules(rules):: self + if std.type(rules) == "array" then {rules: rules} else {rules: [rules]}, // Rules holds all the PolicyRules for this Role withRulesMixin(rules):: self + if std.type(rules) == "array" then {rules+: rules} else {rules+: [rules]}, rulesType:: hidden.rbac.v1beta1.policyRule, mixin:: { // Standard object's metadata. metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, }, }, // RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. roleBinding:: { local kind = {kind: "RoleBinding"}, new():: apiVersion + kind, // Subjects holds references to the objects the role applies to. withSubjects(subjects):: self + if std.type(subjects) == "array" then {subjects: subjects} else {subjects: [subjects]}, // Subjects holds references to the objects the role applies to. withSubjectsMixin(subjects):: self + if std.type(subjects) == "array" then {subjects+: subjects} else {subjects+: [subjects]}, subjectsType:: hidden.rbac.v1beta1.subject, mixin:: { // Standard object's metadata. metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. roleRef:: { local __roleRefMixin(roleRef) = {roleRef+: roleRef}, mixinInstance(roleRef):: __roleRefMixin(roleRef), // APIGroup is the group for the resource being referenced withApiGroup(apiGroup):: self + __roleRefMixin({apiGroup: apiGroup}), // Name is the name of resource being referenced withName(name):: self + __roleRefMixin({name: name}), }, roleRefType:: hidden.rbac.v1beta1.roleRef, }, }, // RoleBindingList is a collection of RoleBindings roleBindingList:: { local kind = {kind: "RoleBindingList"}, new(items):: apiVersion + kind + self.withItems(items), // Items is a list of RoleBindings withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is a list of RoleBindings withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.rbac.v1beta1.roleBinding, mixin:: { }, }, // RoleList is a collection of Roles roleList:: { local kind = {kind: "RoleList"}, new(items):: apiVersion + kind + self.withItems(items), // Items is a list of Roles withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is a list of Roles withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.rbac.v1beta1.role, mixin:: { }, }, }, }, scheduling:: { v1alpha1:: { local apiVersion = {apiVersion: "scheduling.k8s.io/v1alpha1"}, // PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer. priorityClass:: { local kind = {kind: "PriorityClass"}, new():: apiVersion + kind, // description is an arbitrary string that usually provides guidelines on when this priority class should be used. withDescription(description):: self + {description: description}, // globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. withGlobalDefault(globalDefault):: self + {globalDefault: globalDefault}, // The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec. withValue(value):: self + {value: value}, mixin:: { // Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, }, }, // PriorityClassList is a collection of priority classes. priorityClassList:: { local kind = {kind: "PriorityClassList"}, new(items):: apiVersion + kind + self.withItems(items), // items is the list of PriorityClasses withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // items is the list of PriorityClasses withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.scheduling.v1alpha1.priorityClass, mixin:: { }, }, }, }, settings:: { v1alpha1:: { local apiVersion = {apiVersion: "settings.k8s.io/v1alpha1"}, // PodPreset is a policy resource that defines additional runtime requirements for a Pod. podPreset:: { local kind = {kind: "PodPreset"}, new():: apiVersion + kind, mixin:: { // metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // Env defines the collection of EnvVar to inject into containers. withEnv(env):: self + if std.type(env) == "array" then __specMixin({env: env}) else __specMixin({env: [env]}), // Env defines the collection of EnvVar to inject into containers. withEnvMixin(env):: self + if std.type(env) == "array" then __specMixin({env+: env}) else __specMixin({env+: [env]}), // EnvFrom defines the collection of EnvFromSource to inject into containers. withEnvFrom(envFrom):: self + if std.type(envFrom) == "array" then __specMixin({envFrom: envFrom}) else __specMixin({envFrom: [envFrom]}), // EnvFrom defines the collection of EnvFromSource to inject into containers. withEnvFromMixin(envFrom):: self + if std.type(envFrom) == "array" then __specMixin({envFrom+: envFrom}) else __specMixin({envFrom+: [envFrom]}), envFromType:: hidden.core.v1.envFromSource, envType:: hidden.core.v1.envVar, // Selector is a label query over a set of resources, in this case pods. Required. selector:: { local __selectorMixin(selector) = __specMixin({selector+: selector}), mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // VolumeMounts defines the collection of VolumeMount to inject into containers. withVolumeMounts(volumeMounts):: self + if std.type(volumeMounts) == "array" then __specMixin({volumeMounts: volumeMounts}) else __specMixin({volumeMounts: [volumeMounts]}), // VolumeMounts defines the collection of VolumeMount to inject into containers. withVolumeMountsMixin(volumeMounts):: self + if std.type(volumeMounts) == "array" then __specMixin({volumeMounts+: volumeMounts}) else __specMixin({volumeMounts+: [volumeMounts]}), volumeMountsType:: hidden.core.v1.volumeMount, // Volumes defines the collection of Volume to inject into the pod. withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // Volumes defines the collection of Volume to inject into the pod. withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.settings.v1alpha1.podPresetSpec, }, }, // PodPresetList is a list of PodPreset objects. podPresetList:: { local kind = {kind: "PodPresetList"}, new(items):: apiVersion + kind + self.withItems(items), // Items is a list of schema objects. withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is a list of schema objects. withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.settings.v1alpha1.podPreset, mixin:: { }, }, }, }, storage:: { v1:: { local apiVersion = {apiVersion: "storage.k8s.io/v1"}, // StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned. // // StorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name. storageClass:: { local kind = {kind: "StorageClass"}, new():: apiVersion + kind, // AllowVolumeExpansion shows whether the storage class allow volume expand withAllowVolumeExpansion(allowVolumeExpansion):: self + {allowVolumeExpansion: allowVolumeExpansion}, // Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. ["ro", "soft"]. Not validated - mount of the PVs will simply fail if one is invalid. withMountOptions(mountOptions):: self + if std.type(mountOptions) == "array" then {mountOptions: mountOptions} else {mountOptions: [mountOptions]}, // Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. ["ro", "soft"]. Not validated - mount of the PVs will simply fail if one is invalid. withMountOptionsMixin(mountOptions):: self + if std.type(mountOptions) == "array" then {mountOptions+: mountOptions} else {mountOptions+: [mountOptions]}, // Parameters holds the parameters for the provisioner that should create volumes of this storage class. withParameters(parameters):: self + {parameters: parameters}, // Parameters holds the parameters for the provisioner that should create volumes of this storage class. withParametersMixin(parameters):: self + {parameters+: parameters}, // Provisioner indicates the type of the provisioner. withProvisioner(provisioner):: self + {provisioner: provisioner}, // Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete. withReclaimPolicy(reclaimPolicy):: self + {reclaimPolicy: reclaimPolicy}, mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, }, }, // StorageClassList is a collection of storage classes. storageClassList:: { local kind = {kind: "StorageClassList"}, new(items):: apiVersion + kind + self.withItems(items), // Items is the list of StorageClasses withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is the list of StorageClasses withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.storage.v1.storageClass, mixin:: { }, }, }, v1beta1:: { local apiVersion = {apiVersion: "storage.k8s.io/v1beta1"}, // StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned. // // StorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name. storageClass:: { local kind = {kind: "StorageClass"}, new():: apiVersion + kind, // AllowVolumeExpansion shows whether the storage class allow volume expand withAllowVolumeExpansion(allowVolumeExpansion):: self + {allowVolumeExpansion: allowVolumeExpansion}, // Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. ["ro", "soft"]. Not validated - mount of the PVs will simply fail if one is invalid. withMountOptions(mountOptions):: self + if std.type(mountOptions) == "array" then {mountOptions: mountOptions} else {mountOptions: [mountOptions]}, // Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. ["ro", "soft"]. Not validated - mount of the PVs will simply fail if one is invalid. withMountOptionsMixin(mountOptions):: self + if std.type(mountOptions) == "array" then {mountOptions+: mountOptions} else {mountOptions+: [mountOptions]}, // Parameters holds the parameters for the provisioner that should create volumes of this storage class. withParameters(parameters):: self + {parameters: parameters}, // Parameters holds the parameters for the provisioner that should create volumes of this storage class. withParametersMixin(parameters):: self + {parameters+: parameters}, // Provisioner indicates the type of the provisioner. withProvisioner(provisioner):: self + {provisioner: provisioner}, // Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete. withReclaimPolicy(reclaimPolicy):: self + {reclaimPolicy: reclaimPolicy}, mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, }, }, // StorageClassList is a collection of storage classes. storageClassList:: { local kind = {kind: "StorageClassList"}, new(items):: apiVersion + kind + self.withItems(items), // Items is the list of StorageClasses withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is the list of StorageClasses withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.storage.v1beta1.storageClass, mixin:: { }, }, }, }, local hidden = { admissionregistration:: { v1alpha1:: { local apiVersion = {apiVersion: "admissionregistration/v1alpha1"}, // AdmissionHookClientConfig contains the information to make a TLS connection with the webhook admissionHookClientConfig:: { new():: {}, // CABundle is a PEM encoded CA bundle which will be used to validate webhook's server certificate. Required withCaBundle(caBundle):: self + {caBundle: caBundle}, mixin:: { // Service is a reference to the service for this webhook. If there is only one port open for the service, that port will be used. If there are multiple ports open, port 443 will be used if it is open, otherwise it is an error. Required service:: { local __serviceMixin(service) = {service+: service}, mixinInstance(service):: __serviceMixin(service), // Name is the name of the service Required withName(name):: self + __serviceMixin({name: name}), // Namespace is the namespace of the service Required withNamespace(namespace):: self + __serviceMixin({namespace: namespace}), }, serviceType:: hidden.admissionregistration.v1alpha1.serviceReference, }, }, // ExternalAdmissionHook describes an external admission webhook and the resources and operations it applies to. externalAdmissionHook:: { new():: {}, // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Ignore. withFailurePolicy(failurePolicy):: self + {failurePolicy: failurePolicy}, // The name of the external admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where "imagepolicy" is the name of the webhook, and kubernetes.io is the name of the organization. Required. withName(name):: self + {name: name}, // Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. withRules(rules):: self + if std.type(rules) == "array" then {rules: rules} else {rules: [rules]}, // Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. withRulesMixin(rules):: self + if std.type(rules) == "array" then {rules+: rules} else {rules+: [rules]}, rulesType:: hidden.admissionregistration.v1alpha1.ruleWithOperations, mixin:: { // ClientConfig defines how to communicate with the hook. Required clientConfig:: { local __clientConfigMixin(clientConfig) = {clientConfig+: clientConfig}, mixinInstance(clientConfig):: __clientConfigMixin(clientConfig), // CABundle is a PEM encoded CA bundle which will be used to validate webhook's server certificate. Required withCaBundle(caBundle):: self + __clientConfigMixin({caBundle: caBundle}), // Service is a reference to the service for this webhook. If there is only one port open for the service, that port will be used. If there are multiple ports open, port 443 will be used if it is open, otherwise it is an error. Required service:: { local __serviceMixin(service) = __clientConfigMixin({service+: service}), mixinInstance(service):: __serviceMixin(service), // Name is the name of the service Required withName(name):: self + __serviceMixin({name: name}), // Namespace is the namespace of the service Required withNamespace(namespace):: self + __serviceMixin({namespace: namespace}), }, serviceType:: hidden.admissionregistration.v1alpha1.serviceReference, }, clientConfigType:: hidden.admissionregistration.v1alpha1.admissionHookClientConfig, }, }, // Initializer describes the name and the failure policy of an initializer, and what resources it applies to. initializer:: { new():: {}, // Name is the identifier of the initializer. It will be added to the object that needs to be initialized. Name should be fully qualified, e.g., alwayspullimages.kubernetes.io, where "alwayspullimages" is the name of the webhook, and kubernetes.io is the name of the organization. Required withName(name):: self + {name: name}, // Rules describes what resources/subresources the initializer cares about. The initializer cares about an operation if it matches _any_ Rule. Rule.Resources must not include subresources. withRules(rules):: self + if std.type(rules) == "array" then {rules: rules} else {rules: [rules]}, // Rules describes what resources/subresources the initializer cares about. The initializer cares about an operation if it matches _any_ Rule. Rule.Resources must not include subresources. withRulesMixin(rules):: self + if std.type(rules) == "array" then {rules+: rules} else {rules+: [rules]}, rulesType:: hidden.admissionregistration.v1alpha1.rule, mixin:: { }, }, // Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended to make sure that all the tuple expansions are valid. rule:: { new():: {}, // APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required. withApiGroups(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups: apiGroups} else {apiGroups: [apiGroups]}, // APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required. withApiGroupsMixin(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups+: apiGroups} else {apiGroups+: [apiGroups]}, // APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required. withApiVersions(apiVersions):: self + if std.type(apiVersions) == "array" then {apiVersions: apiVersions} else {apiVersions: [apiVersions]}, // APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required. withApiVersionsMixin(apiVersions):: self + if std.type(apiVersions) == "array" then {apiVersions+: apiVersions} else {apiVersions+: [apiVersions]}, // Resources is a list of resources this rule applies to. // // For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources. // // If wildcard is present, the validation rule will ensure resources do not overlap with each other. // // Depending on the enclosing object, subresources might not be allowed. Required. withResources(resources):: self + if std.type(resources) == "array" then {resources: resources} else {resources: [resources]}, // Resources is a list of resources this rule applies to. // // For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources. // // If wildcard is present, the validation rule will ensure resources do not overlap with each other. // // Depending on the enclosing object, subresources might not be allowed. Required. withResourcesMixin(resources):: self + if std.type(resources) == "array" then {resources+: resources} else {resources+: [resources]}, mixin:: { }, }, // RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid. ruleWithOperations:: { new():: {}, // APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required. withApiGroups(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups: apiGroups} else {apiGroups: [apiGroups]}, // APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required. withApiGroupsMixin(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups+: apiGroups} else {apiGroups+: [apiGroups]}, // APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required. withApiVersions(apiVersions):: self + if std.type(apiVersions) == "array" then {apiVersions: apiVersions} else {apiVersions: [apiVersions]}, // APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required. withApiVersionsMixin(apiVersions):: self + if std.type(apiVersions) == "array" then {apiVersions+: apiVersions} else {apiVersions+: [apiVersions]}, // Operations is the operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '*' is present, the length of the slice must be one. Required. withOperations(operations):: self + if std.type(operations) == "array" then {operations: operations} else {operations: [operations]}, // Operations is the operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '*' is present, the length of the slice must be one. Required. withOperationsMixin(operations):: self + if std.type(operations) == "array" then {operations+: operations} else {operations+: [operations]}, // Resources is a list of resources this rule applies to. // // For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources. // // If wildcard is present, the validation rule will ensure resources do not overlap with each other. // // Depending on the enclosing object, subresources might not be allowed. Required. withResources(resources):: self + if std.type(resources) == "array" then {resources: resources} else {resources: [resources]}, // Resources is a list of resources this rule applies to. // // For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources. // // If wildcard is present, the validation rule will ensure resources do not overlap with each other. // // Depending on the enclosing object, subresources might not be allowed. Required. withResourcesMixin(resources):: self + if std.type(resources) == "array" then {resources+: resources} else {resources+: [resources]}, mixin:: { }, }, // ServiceReference holds a reference to Service.legacy.k8s.io serviceReference:: { new():: {}, // Name is the name of the service Required withName(name):: self + {name: name}, // Namespace is the namespace of the service Required withNamespace(namespace):: self + {namespace: namespace}, mixin:: { }, }, }, }, apiextensions:: { v1beta1:: { local apiVersion = {apiVersion: "apiextensions/v1beta1"}, // CustomResourceDefinitionCondition contains details for the current condition of this pod. customResourceDefinitionCondition:: { new():: {}, // Human-readable message indicating details about last transition. withMessage(message):: self + {message: message}, // Unique, one-word, CamelCase reason for the condition's last transition. withReason(reason):: self + {reason: reason}, // Type is the type of the condition. withType(type):: self + {type: type}, mixin:: { // Last time the condition transitioned from one status to another. lastTransitionTime:: { local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), }, lastTransitionTimeType:: hidden.meta.v1.time, }, }, // CustomResourceDefinitionList is a list of CustomResourceDefinition objects. customResourceDefinitionList:: { new():: {}, // Items individual CustomResourceDefinitions withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items individual CustomResourceDefinitions withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.apiextensions.v1beta1.customResourceDefinition, mixin:: { }, }, // CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition customResourceDefinitionNames:: { new():: {}, // ListKind is the serialized kind of the list for this resource. Defaults to List. withListKind(listKind):: self + {listKind: listKind}, // Plural is the plural name of the resource to serve. It must match the name of the CustomResourceDefinition-registration too: plural.group and it must be all lowercase. withPlural(plural):: self + {plural: plural}, // ShortNames are short names for the resource. It must be all lowercase. withShortNames(shortNames):: self + if std.type(shortNames) == "array" then {shortNames: shortNames} else {shortNames: [shortNames]}, // ShortNames are short names for the resource. It must be all lowercase. withShortNamesMixin(shortNames):: self + if std.type(shortNames) == "array" then {shortNames+: shortNames} else {shortNames+: [shortNames]}, // Singular is the singular name of the resource. It must be all lowercase Defaults to lowercased withSingular(singular):: self + {singular: singular}, mixin:: { }, }, // CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition customResourceDefinitionStatus:: { new():: {}, // Conditions indicate state for particular aspects of a CustomResourceDefinition withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, // Conditions indicate state for particular aspects of a CustomResourceDefinition withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, conditionsType:: hidden.apiextensions.v1beta1.customResourceDefinitionCondition, mixin:: { // AcceptedNames are the names that are actually being used to serve discovery They may be different than the names in spec. acceptedNames:: { local __acceptedNamesMixin(acceptedNames) = {acceptedNames+: acceptedNames}, mixinInstance(acceptedNames):: __acceptedNamesMixin(acceptedNames), // ListKind is the serialized kind of the list for this resource. Defaults to List. withListKind(listKind):: self + __acceptedNamesMixin({listKind: listKind}), // Plural is the plural name of the resource to serve. It must match the name of the CustomResourceDefinition-registration too: plural.group and it must be all lowercase. withPlural(plural):: self + __acceptedNamesMixin({plural: plural}), // ShortNames are short names for the resource. It must be all lowercase. withShortNames(shortNames):: self + if std.type(shortNames) == "array" then __acceptedNamesMixin({shortNames: shortNames}) else __acceptedNamesMixin({shortNames: [shortNames]}), // ShortNames are short names for the resource. It must be all lowercase. withShortNamesMixin(shortNames):: self + if std.type(shortNames) == "array" then __acceptedNamesMixin({shortNames+: shortNames}) else __acceptedNamesMixin({shortNames+: [shortNames]}), // Singular is the singular name of the resource. It must be all lowercase Defaults to lowercased withSingular(singular):: self + __acceptedNamesMixin({singular: singular}), }, acceptedNamesType:: hidden.apiextensions.v1beta1.customResourceDefinitionNames, }, }, // ExternalDocumentation allows referencing an external resource for extended documentation. externalDocumentation:: { new():: {}, // withDescription(description):: self + {description: description}, // withUrl(url):: self + {url: url}, mixin:: { }, }, // JSON represents any valid JSON value. These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil. json:: { new():: {}, // withRaw(raw):: self + {Raw: raw}, mixin:: { }, }, }, }, apiregistration:: { v1beta1:: { local apiVersion = {apiVersion: "apiregistration/v1beta1"}, // APIService represents a server for a particular GroupVersion. Name must be "version.group". apiService:: { new():: {}, mixin:: { // metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Spec contains information for locating and communicating with a server spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. withCaBundle(caBundle):: self + __specMixin({caBundle: caBundle}), // Group is the API group name this server hosts withGroup(group):: self + __specMixin({group: group}), // GroupPriorityMininum is the priority this group should have at least. Higher priority means that the group is prefered by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMininum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s withGroupPriorityMinimum(groupPriorityMinimum):: self + __specMixin({groupPriorityMinimum: groupPriorityMinimum}), // InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead. withInsecureSkipTlsVerify(insecureSkipTlsVerify):: self + __specMixin({insecureSkipTLSVerify: insecureSkipTlsVerify}), // Service is a reference to the service for this API server. It must communicate on port 443 If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled. service:: { local __serviceMixin(service) = __specMixin({service+: service}), mixinInstance(service):: __serviceMixin(service), // Name is the name of the service withName(name):: self + __serviceMixin({name: name}), // Namespace is the namespace of the service withNamespace(namespace):: self + __serviceMixin({namespace: namespace}), }, serviceType:: hidden.apiregistration.v1beta1.serviceReference, // Version is the API version this server hosts. For example, "v1" withVersion(version):: self + __specMixin({version: version}), // VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) Since it's inside of a group, the number can be small, probably in the 10s. withVersionPriority(versionPriority):: self + __specMixin({versionPriority: versionPriority}), }, specType:: hidden.apiregistration.v1beta1.apiServiceSpec, }, }, // apiServiceCondition:: { new():: {}, // Human-readable message indicating details about last transition. withMessage(message):: self + {message: message}, // Unique, one-word, CamelCase reason for the condition's last transition. withReason(reason):: self + {reason: reason}, // Type is the type of the condition. withType(type):: self + {type: type}, mixin:: { // Last time the condition transitioned from one status to another. lastTransitionTime:: { local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), }, lastTransitionTimeType:: hidden.meta.v1.time, }, }, // APIServiceList is a list of APIService objects. apiServiceList:: { new():: {}, // withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.apiregistration.v1beta1.apiService, mixin:: { }, }, // APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification. apiServiceSpec:: { new():: {}, // CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. withCaBundle(caBundle):: self + {caBundle: caBundle}, // Group is the API group name this server hosts withGroup(group):: self + {group: group}, // GroupPriorityMininum is the priority this group should have at least. Higher priority means that the group is prefered by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMininum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s withGroupPriorityMinimum(groupPriorityMinimum):: self + {groupPriorityMinimum: groupPriorityMinimum}, // InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead. withInsecureSkipTlsVerify(insecureSkipTlsVerify):: self + {insecureSkipTLSVerify: insecureSkipTlsVerify}, // Version is the API version this server hosts. For example, "v1" withVersion(version):: self + {version: version}, // VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) Since it's inside of a group, the number can be small, probably in the 10s. withVersionPriority(versionPriority):: self + {versionPriority: versionPriority}, mixin:: { // Service is a reference to the service for this API server. It must communicate on port 443 If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled. service:: { local __serviceMixin(service) = {service+: service}, mixinInstance(service):: __serviceMixin(service), // Name is the name of the service withName(name):: self + __serviceMixin({name: name}), // Namespace is the namespace of the service withNamespace(namespace):: self + __serviceMixin({namespace: namespace}), }, serviceType:: hidden.apiregistration.v1beta1.serviceReference, }, }, // APIServiceStatus contains derived information about an API server apiServiceStatus:: { new():: {}, // Current service state of apiService. withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, // Current service state of apiService. withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, conditionsType:: hidden.apiregistration.v1beta1.apiServiceCondition, mixin:: { }, }, // ServiceReference holds a reference to Service.legacy.k8s.io serviceReference:: { new():: {}, // Name is the name of the service withName(name):: self + {name: name}, // Namespace is the namespace of the service withNamespace(namespace):: self + {namespace: namespace}, mixin:: { }, }, }, }, apps:: { v1beta1:: { local apiVersion = {apiVersion: "apps/v1beta1"}, // DeploymentCondition describes the state of a deployment at a certain point. deploymentCondition:: { new():: {}, // A human readable message indicating details about the transition. withMessage(message):: self + {message: message}, // The reason for the condition's last transition. withReason(reason):: self + {reason: reason}, // Type of deployment condition. withType(type):: self + {type: type}, mixin:: { // Last time the condition transitioned from one status to another. lastTransitionTime:: { local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), }, lastTransitionTimeType:: hidden.meta.v1.time, // The last time this condition was updated. lastUpdateTime:: { local __lastUpdateTimeMixin(lastUpdateTime) = {lastUpdateTime+: lastUpdateTime}, mixinInstance(lastUpdateTime):: __lastUpdateTimeMixin(lastUpdateTime), }, lastUpdateTimeType:: hidden.meta.v1.time, }, }, // DeploymentSpec is the specification of the desired behavior of the Deployment. deploymentSpec:: { new():: {}, // Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) withMinReadySeconds(minReadySeconds):: self + {minReadySeconds: minReadySeconds}, // Indicates that the deployment is paused. withPaused(paused):: self + {paused: paused}, // The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s. withProgressDeadlineSeconds(progressDeadlineSeconds):: self + {progressDeadlineSeconds: progressDeadlineSeconds}, // Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. withReplicas(replicas):: self + {replicas: replicas}, // The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 2. withRevisionHistoryLimit(revisionHistoryLimit):: self + {revisionHistoryLimit: revisionHistoryLimit}, mixin:: { // DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done. rollbackTo:: { local __rollbackToMixin(rollbackTo) = {rollbackTo+: rollbackTo}, mixinInstance(rollbackTo):: __rollbackToMixin(rollbackTo), // The revision to rollback to. If set to 0, rollback to the last revision. withRevision(revision):: self + __rollbackToMixin({revision: revision}), }, rollbackToType:: hidden.apps.v1beta1.rollbackConfig, // Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. selector:: { local __selectorMixin(selector) = {selector+: selector}, mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // The deployment strategy to use to replace existing pods with new ones. strategy:: { local __strategyMixin(strategy) = {strategy+: strategy}, mixinInstance(strategy):: __strategyMixin(strategy), // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. rollingUpdate:: { local __rollingUpdateMixin(rollingUpdate) = __strategyMixin({rollingUpdate+: rollingUpdate}), mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), // The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. withMaxSurge(maxSurge):: __rollingUpdateMixin({maxSurge: maxSurge}), // The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), }, rollingUpdateType:: hidden.apps.v1beta1.rollingUpdateDeployment, // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. withType(type):: self + __strategyMixin({type: type}), }, strategyType:: hidden.apps.v1beta1.deploymentStrategy, // Template describes the pods that will be created. template:: { local __templateMixin(template) = {template+: template}, mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, }, }, // DeploymentStatus is the most recently observed status of the Deployment. deploymentStatus:: { new():: {}, // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. withAvailableReplicas(availableReplicas):: self + {availableReplicas: availableReplicas}, // Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet. withCollisionCount(collisionCount):: self + {collisionCount: collisionCount}, // Represents the latest available observations of a deployment's current state. withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, // Represents the latest available observations of a deployment's current state. withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, conditionsType:: hidden.apps.v1beta1.deploymentCondition, // The generation observed by the deployment controller. withObservedGeneration(observedGeneration):: self + {observedGeneration: observedGeneration}, // Total number of ready pods targeted by this deployment. withReadyReplicas(readyReplicas):: self + {readyReplicas: readyReplicas}, // Total number of non-terminated pods targeted by this deployment (their labels match the selector). withReplicas(replicas):: self + {replicas: replicas}, // Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created. withUnavailableReplicas(unavailableReplicas):: self + {unavailableReplicas: unavailableReplicas}, // Total number of non-terminated pods targeted by this deployment that have the desired template spec. withUpdatedReplicas(updatedReplicas):: self + {updatedReplicas: updatedReplicas}, mixin:: { }, }, // DeploymentStrategy describes how to replace existing pods with new ones. deploymentStrategy:: { new():: {}, // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. withType(type):: self + {type: type}, mixin:: { // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. rollingUpdate:: { local __rollingUpdateMixin(rollingUpdate) = {rollingUpdate+: rollingUpdate}, mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), // The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. withMaxSurge(maxSurge):: __rollingUpdateMixin({maxSurge: maxSurge}), // The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), }, rollingUpdateType:: hidden.apps.v1beta1.rollingUpdateDeployment, }, }, // DEPRECATED. rollbackConfig:: { new():: {}, // The revision to rollback to. If set to 0, rollback to the last revision. withRevision(revision):: self + {revision: revision}, mixin:: { }, }, // Spec to control the desired behavior of rolling update. rollingUpdateDeployment:: { new():: {}, // The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. withMaxSurge(maxSurge):: {maxSurge: maxSurge}, // The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. withMaxUnavailable(maxUnavailable):: {maxUnavailable: maxUnavailable}, mixin:: { }, }, // RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. rollingUpdateStatefulSetStrategy:: { new():: {}, // Partition indicates the ordinal at which the StatefulSet should be partitioned. withPartition(partition):: self + {partition: partition}, mixin:: { }, }, // ScaleSpec describes the attributes of a scale subresource scaleSpec:: { new():: {}, // desired number of instances for the scaled object. withReplicas(replicas):: self + {replicas: replicas}, mixin:: { }, }, // ScaleStatus represents the current status of a scale subresource. scaleStatus:: { new():: {}, // actual number of observed instances of the scaled object. withReplicas(replicas):: self + {replicas: replicas}, // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors withSelector(selector):: self + {selector: selector}, // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors withSelectorMixin(selector):: self + {selector+: selector}, // label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors withTargetSelector(targetSelector):: self + {targetSelector: targetSelector}, mixin:: { }, }, // A StatefulSetSpec is the specification of a StatefulSet. statefulSetSpec:: { new():: {}, // podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once. withPodManagementPolicy(podManagementPolicy):: self + {podManagementPolicy: podManagementPolicy}, // replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1. withReplicas(replicas):: self + {replicas: replicas}, // revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10. withRevisionHistoryLimit(revisionHistoryLimit):: self + {revisionHistoryLimit: revisionHistoryLimit}, // serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where "pod-specific-string" is managed by the StatefulSet controller. withServiceName(serviceName):: self + {serviceName: serviceName}, // volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name. withVolumeClaimTemplates(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == "array" then {volumeClaimTemplates: volumeClaimTemplates} else {volumeClaimTemplates: [volumeClaimTemplates]}, // volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name. withVolumeClaimTemplatesMixin(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == "array" then {volumeClaimTemplates+: volumeClaimTemplates} else {volumeClaimTemplates+: [volumeClaimTemplates]}, volumeClaimTemplatesType:: hidden.core.v1.persistentVolumeClaim, mixin:: { // selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors selector:: { local __selectorMixin(selector) = {selector+: selector}, mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet. template:: { local __templateMixin(template) = {template+: template}, mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, // updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. updateStrategy:: { local __updateStrategyMixin(updateStrategy) = {updateStrategy+: updateStrategy}, mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. rollingUpdate:: { local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({rollingUpdate+: rollingUpdate}), mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), // Partition indicates the ordinal at which the StatefulSet should be partitioned. withPartition(partition):: self + __rollingUpdateMixin({partition: partition}), }, rollingUpdateType:: hidden.apps.v1beta1.rollingUpdateStatefulSetStrategy, // Type indicates the type of the StatefulSetUpdateStrategy. withType(type):: self + __updateStrategyMixin({type: type}), }, updateStrategyType:: hidden.apps.v1beta1.statefulSetUpdateStrategy, }, }, // StatefulSetStatus represents the current state of a StatefulSet. statefulSetStatus:: { new():: {}, // collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision. withCollisionCount(collisionCount):: self + {collisionCount: collisionCount}, // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision. withCurrentReplicas(currentReplicas):: self + {currentReplicas: currentReplicas}, // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas). withCurrentRevision(currentRevision):: self + {currentRevision: currentRevision}, // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server. withObservedGeneration(observedGeneration):: self + {observedGeneration: observedGeneration}, // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition. withReadyReplicas(readyReplicas):: self + {readyReplicas: readyReplicas}, // replicas is the number of Pods created by the StatefulSet controller. withReplicas(replicas):: self + {replicas: replicas}, // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas) withUpdateRevision(updateRevision):: self + {updateRevision: updateRevision}, // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision. withUpdatedReplicas(updatedReplicas):: self + {updatedReplicas: updatedReplicas}, mixin:: { }, }, // StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy. statefulSetUpdateStrategy:: { new():: {}, // Type indicates the type of the StatefulSetUpdateStrategy. withType(type):: self + {type: type}, mixin:: { // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. rollingUpdate:: { local __rollingUpdateMixin(rollingUpdate) = {rollingUpdate+: rollingUpdate}, mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), // Partition indicates the ordinal at which the StatefulSet should be partitioned. withPartition(partition):: self + __rollingUpdateMixin({partition: partition}), }, rollingUpdateType:: hidden.apps.v1beta1.rollingUpdateStatefulSetStrategy, }, }, }, v1beta2:: { local apiVersion = {apiVersion: "apps/v1beta2"}, // DaemonSetSpec is the specification of a daemon set. daemonSetSpec:: { new():: {}, // The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready). withMinReadySeconds(minReadySeconds):: self + {minReadySeconds: minReadySeconds}, // The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. withRevisionHistoryLimit(revisionHistoryLimit):: self + {revisionHistoryLimit: revisionHistoryLimit}, mixin:: { // A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors selector:: { local __selectorMixin(selector) = {selector+: selector}, mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template template:: { local __templateMixin(template) = {template+: template}, mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, // An update strategy to replace existing DaemonSet pods with new pods. updateStrategy:: { local __updateStrategyMixin(updateStrategy) = {updateStrategy+: updateStrategy}, mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), // Rolling update config params. Present only if type = "RollingUpdate". rollingUpdate:: { local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({rollingUpdate+: rollingUpdate}), mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), // The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), }, rollingUpdateType:: hidden.apps.v1beta2.rollingUpdateDaemonSet, // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate. withType(type):: self + __updateStrategyMixin({type: type}), }, updateStrategyType:: hidden.apps.v1beta2.daemonSetUpdateStrategy, }, }, // DaemonSetStatus represents the current status of a daemon set. daemonSetStatus:: { new():: {}, // Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision. withCollisionCount(collisionCount):: self + {collisionCount: collisionCount}, // The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ withCurrentNumberScheduled(currentNumberScheduled):: self + {currentNumberScheduled: currentNumberScheduled}, // The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ withDesiredNumberScheduled(desiredNumberScheduled):: self + {desiredNumberScheduled: desiredNumberScheduled}, // The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds) withNumberAvailable(numberAvailable):: self + {numberAvailable: numberAvailable}, // The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ withNumberMisscheduled(numberMisscheduled):: self + {numberMisscheduled: numberMisscheduled}, // The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready. withNumberReady(numberReady):: self + {numberReady: numberReady}, // The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds) withNumberUnavailable(numberUnavailable):: self + {numberUnavailable: numberUnavailable}, // The most recent generation observed by the daemon set controller. withObservedGeneration(observedGeneration):: self + {observedGeneration: observedGeneration}, // The total number of nodes that are running updated daemon pod withUpdatedNumberScheduled(updatedNumberScheduled):: self + {updatedNumberScheduled: updatedNumberScheduled}, mixin:: { }, }, // DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet. daemonSetUpdateStrategy:: { new():: {}, // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate. withType(type):: self + {type: type}, mixin:: { // Rolling update config params. Present only if type = "RollingUpdate". rollingUpdate:: { local __rollingUpdateMixin(rollingUpdate) = {rollingUpdate+: rollingUpdate}, mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), // The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), }, rollingUpdateType:: hidden.apps.v1beta2.rollingUpdateDaemonSet, }, }, // DeploymentCondition describes the state of a deployment at a certain point. deploymentCondition:: { new():: {}, // A human readable message indicating details about the transition. withMessage(message):: self + {message: message}, // The reason for the condition's last transition. withReason(reason):: self + {reason: reason}, // Type of deployment condition. withType(type):: self + {type: type}, mixin:: { // Last time the condition transitioned from one status to another. lastTransitionTime:: { local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), }, lastTransitionTimeType:: hidden.meta.v1.time, // The last time this condition was updated. lastUpdateTime:: { local __lastUpdateTimeMixin(lastUpdateTime) = {lastUpdateTime+: lastUpdateTime}, mixinInstance(lastUpdateTime):: __lastUpdateTimeMixin(lastUpdateTime), }, lastUpdateTimeType:: hidden.meta.v1.time, }, }, // DeploymentSpec is the specification of the desired behavior of the Deployment. deploymentSpec:: { new():: {}, // Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) withMinReadySeconds(minReadySeconds):: self + {minReadySeconds: minReadySeconds}, // Indicates that the deployment is paused. withPaused(paused):: self + {paused: paused}, // The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s. withProgressDeadlineSeconds(progressDeadlineSeconds):: self + {progressDeadlineSeconds: progressDeadlineSeconds}, // Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. withReplicas(replicas):: self + {replicas: replicas}, // The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. withRevisionHistoryLimit(revisionHistoryLimit):: self + {revisionHistoryLimit: revisionHistoryLimit}, mixin:: { // Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. selector:: { local __selectorMixin(selector) = {selector+: selector}, mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // The deployment strategy to use to replace existing pods with new ones. strategy:: { local __strategyMixin(strategy) = {strategy+: strategy}, mixinInstance(strategy):: __strategyMixin(strategy), // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. rollingUpdate:: { local __rollingUpdateMixin(rollingUpdate) = __strategyMixin({rollingUpdate+: rollingUpdate}), mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), // The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. withMaxSurge(maxSurge):: __rollingUpdateMixin({maxSurge: maxSurge}), // The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), }, rollingUpdateType:: hidden.apps.v1beta2.rollingUpdateDeployment, // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. withType(type):: self + __strategyMixin({type: type}), }, strategyType:: hidden.apps.v1beta2.deploymentStrategy, // Template describes the pods that will be created. template:: { local __templateMixin(template) = {template+: template}, mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, }, }, // DeploymentStatus is the most recently observed status of the Deployment. deploymentStatus:: { new():: {}, // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. withAvailableReplicas(availableReplicas):: self + {availableReplicas: availableReplicas}, // Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet. withCollisionCount(collisionCount):: self + {collisionCount: collisionCount}, // Represents the latest available observations of a deployment's current state. withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, // Represents the latest available observations of a deployment's current state. withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, conditionsType:: hidden.apps.v1beta2.deploymentCondition, // The generation observed by the deployment controller. withObservedGeneration(observedGeneration):: self + {observedGeneration: observedGeneration}, // Total number of ready pods targeted by this deployment. withReadyReplicas(readyReplicas):: self + {readyReplicas: readyReplicas}, // Total number of non-terminated pods targeted by this deployment (their labels match the selector). withReplicas(replicas):: self + {replicas: replicas}, // Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created. withUnavailableReplicas(unavailableReplicas):: self + {unavailableReplicas: unavailableReplicas}, // Total number of non-terminated pods targeted by this deployment that have the desired template spec. withUpdatedReplicas(updatedReplicas):: self + {updatedReplicas: updatedReplicas}, mixin:: { }, }, // DeploymentStrategy describes how to replace existing pods with new ones. deploymentStrategy:: { new():: {}, // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. withType(type):: self + {type: type}, mixin:: { // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. rollingUpdate:: { local __rollingUpdateMixin(rollingUpdate) = {rollingUpdate+: rollingUpdate}, mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), // The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. withMaxSurge(maxSurge):: __rollingUpdateMixin({maxSurge: maxSurge}), // The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), }, rollingUpdateType:: hidden.apps.v1beta2.rollingUpdateDeployment, }, }, // ReplicaSetCondition describes the state of a replica set at a certain point. replicaSetCondition:: { new():: {}, // A human readable message indicating details about the transition. withMessage(message):: self + {message: message}, // The reason for the condition's last transition. withReason(reason):: self + {reason: reason}, // Type of replica set condition. withType(type):: self + {type: type}, mixin:: { // The last time the condition transitioned from one status to another. lastTransitionTime:: { local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), }, lastTransitionTimeType:: hidden.meta.v1.time, }, }, // ReplicaSetSpec is the specification of a ReplicaSet. replicaSetSpec:: { new():: {}, // Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) withMinReadySeconds(minReadySeconds):: self + {minReadySeconds: minReadySeconds}, // Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller withReplicas(replicas):: self + {replicas: replicas}, mixin:: { // Selector is a label query over pods that should match the replica count. If the selector is empty, it is defaulted to the labels present on the pod template. Label keys and values that must match in order to be controlled by this replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors selector:: { local __selectorMixin(selector) = {selector+: selector}, mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template template:: { local __templateMixin(template) = {template+: template}, mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, }, }, // ReplicaSetStatus represents the current status of a ReplicaSet. replicaSetStatus:: { new():: {}, // The number of available replicas (ready for at least minReadySeconds) for this replica set. withAvailableReplicas(availableReplicas):: self + {availableReplicas: availableReplicas}, // Represents the latest available observations of a replica set's current state. withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, // Represents the latest available observations of a replica set's current state. withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, conditionsType:: hidden.apps.v1beta2.replicaSetCondition, // The number of pods that have labels matching the labels of the pod template of the replicaset. withFullyLabeledReplicas(fullyLabeledReplicas):: self + {fullyLabeledReplicas: fullyLabeledReplicas}, // ObservedGeneration reflects the generation of the most recently observed ReplicaSet. withObservedGeneration(observedGeneration):: self + {observedGeneration: observedGeneration}, // The number of ready replicas for this replica set. withReadyReplicas(readyReplicas):: self + {readyReplicas: readyReplicas}, // Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller withReplicas(replicas):: self + {replicas: replicas}, mixin:: { }, }, // Spec to control the desired behavior of daemon set rolling update. rollingUpdateDaemonSet:: { new():: {}, // The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. withMaxUnavailable(maxUnavailable):: {maxUnavailable: maxUnavailable}, mixin:: { }, }, // Spec to control the desired behavior of rolling update. rollingUpdateDeployment:: { new():: {}, // The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. withMaxSurge(maxSurge):: {maxSurge: maxSurge}, // The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. withMaxUnavailable(maxUnavailable):: {maxUnavailable: maxUnavailable}, mixin:: { }, }, // RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. rollingUpdateStatefulSetStrategy:: { new():: {}, // Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0. withPartition(partition):: self + {partition: partition}, mixin:: { }, }, // ScaleSpec describes the attributes of a scale subresource scaleSpec:: { new():: {}, // desired number of instances for the scaled object. withReplicas(replicas):: self + {replicas: replicas}, mixin:: { }, }, // ScaleStatus represents the current status of a scale subresource. scaleStatus:: { new():: {}, // actual number of observed instances of the scaled object. withReplicas(replicas):: self + {replicas: replicas}, // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors withSelector(selector):: self + {selector: selector}, // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors withSelectorMixin(selector):: self + {selector+: selector}, // label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors withTargetSelector(targetSelector):: self + {targetSelector: targetSelector}, mixin:: { }, }, // A StatefulSetSpec is the specification of a StatefulSet. statefulSetSpec:: { new():: {}, // podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once. withPodManagementPolicy(podManagementPolicy):: self + {podManagementPolicy: podManagementPolicy}, // replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1. withReplicas(replicas):: self + {replicas: replicas}, // revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10. withRevisionHistoryLimit(revisionHistoryLimit):: self + {revisionHistoryLimit: revisionHistoryLimit}, // serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where "pod-specific-string" is managed by the StatefulSet controller. withServiceName(serviceName):: self + {serviceName: serviceName}, // volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name. withVolumeClaimTemplates(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == "array" then {volumeClaimTemplates: volumeClaimTemplates} else {volumeClaimTemplates: [volumeClaimTemplates]}, // volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name. withVolumeClaimTemplatesMixin(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == "array" then {volumeClaimTemplates+: volumeClaimTemplates} else {volumeClaimTemplates+: [volumeClaimTemplates]}, volumeClaimTemplatesType:: hidden.core.v1.persistentVolumeClaim, mixin:: { // selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors selector:: { local __selectorMixin(selector) = {selector+: selector}, mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet. template:: { local __templateMixin(template) = {template+: template}, mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, // updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. updateStrategy:: { local __updateStrategyMixin(updateStrategy) = {updateStrategy+: updateStrategy}, mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. rollingUpdate:: { local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({rollingUpdate+: rollingUpdate}), mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), // Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0. withPartition(partition):: self + __rollingUpdateMixin({partition: partition}), }, rollingUpdateType:: hidden.apps.v1beta2.rollingUpdateStatefulSetStrategy, // Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate. withType(type):: self + __updateStrategyMixin({type: type}), }, updateStrategyType:: hidden.apps.v1beta2.statefulSetUpdateStrategy, }, }, // StatefulSetStatus represents the current state of a StatefulSet. statefulSetStatus:: { new():: {}, // collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision. withCollisionCount(collisionCount):: self + {collisionCount: collisionCount}, // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision. withCurrentReplicas(currentReplicas):: self + {currentReplicas: currentReplicas}, // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas). withCurrentRevision(currentRevision):: self + {currentRevision: currentRevision}, // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server. withObservedGeneration(observedGeneration):: self + {observedGeneration: observedGeneration}, // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition. withReadyReplicas(readyReplicas):: self + {readyReplicas: readyReplicas}, // replicas is the number of Pods created by the StatefulSet controller. withReplicas(replicas):: self + {replicas: replicas}, // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas) withUpdateRevision(updateRevision):: self + {updateRevision: updateRevision}, // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision. withUpdatedReplicas(updatedReplicas):: self + {updatedReplicas: updatedReplicas}, mixin:: { }, }, // StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy. statefulSetUpdateStrategy:: { new():: {}, // Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate. withType(type):: self + {type: type}, mixin:: { // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. rollingUpdate:: { local __rollingUpdateMixin(rollingUpdate) = {rollingUpdate+: rollingUpdate}, mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), // Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0. withPartition(partition):: self + __rollingUpdateMixin({partition: partition}), }, rollingUpdateType:: hidden.apps.v1beta2.rollingUpdateStatefulSetStrategy, }, }, }, }, authentication:: { v1:: { local apiVersion = {apiVersion: "authentication/v1"}, // TokenReviewSpec is a description of the token authentication request. tokenReviewSpec:: { new():: {}, // Token is the opaque bearer token. withToken(token):: self + {token: token}, mixin:: { }, }, // TokenReviewStatus is the result of the token authentication request. tokenReviewStatus:: { new():: {}, // Authenticated indicates that the token was associated with a known user. withAuthenticated(authenticated):: self + {authenticated: authenticated}, // Error indicates that the token couldn't be checked withError(errorParam):: self + {"error": errorParam}, mixin:: { // User is the UserInfo associated with the provided token. user:: { local __userMixin(user) = {user+: user}, mixinInstance(user):: __userMixin(user), // Any additional information provided by the authenticator. withExtra(extra):: self + __userMixin({extra: extra}), // Any additional information provided by the authenticator. withExtraMixin(extra):: self + __userMixin({extra+: extra}), // The names of groups this user is a part of. withGroups(groups):: self + if std.type(groups) == "array" then __userMixin({groups: groups}) else __userMixin({groups: [groups]}), // The names of groups this user is a part of. withGroupsMixin(groups):: self + if std.type(groups) == "array" then __userMixin({groups+: groups}) else __userMixin({groups+: [groups]}), // A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs. withUid(uid):: self + __userMixin({uid: uid}), // The name that uniquely identifies this user among all active users. withUsername(username):: self + __userMixin({username: username}), }, userType:: hidden.authentication.v1.userInfo, }, }, // UserInfo holds the information about the user needed to implement the user.Info interface. userInfo:: { new():: {}, // Any additional information provided by the authenticator. withExtra(extra):: self + {extra: extra}, // Any additional information provided by the authenticator. withExtraMixin(extra):: self + {extra+: extra}, // The names of groups this user is a part of. withGroups(groups):: self + if std.type(groups) == "array" then {groups: groups} else {groups: [groups]}, // The names of groups this user is a part of. withGroupsMixin(groups):: self + if std.type(groups) == "array" then {groups+: groups} else {groups+: [groups]}, // A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs. withUid(uid):: self + {uid: uid}, // The name that uniquely identifies this user among all active users. withUsername(username):: self + {username: username}, mixin:: { }, }, }, v1beta1:: { local apiVersion = {apiVersion: "authentication/v1beta1"}, // TokenReviewSpec is a description of the token authentication request. tokenReviewSpec:: { new():: {}, // Token is the opaque bearer token. withToken(token):: self + {token: token}, mixin:: { }, }, // TokenReviewStatus is the result of the token authentication request. tokenReviewStatus:: { new():: {}, // Authenticated indicates that the token was associated with a known user. withAuthenticated(authenticated):: self + {authenticated: authenticated}, // Error indicates that the token couldn't be checked withError(errorParam):: self + {"error": errorParam}, mixin:: { // User is the UserInfo associated with the provided token. user:: { local __userMixin(user) = {user+: user}, mixinInstance(user):: __userMixin(user), // Any additional information provided by the authenticator. withExtra(extra):: self + __userMixin({extra: extra}), // Any additional information provided by the authenticator. withExtraMixin(extra):: self + __userMixin({extra+: extra}), // The names of groups this user is a part of. withGroups(groups):: self + if std.type(groups) == "array" then __userMixin({groups: groups}) else __userMixin({groups: [groups]}), // The names of groups this user is a part of. withGroupsMixin(groups):: self + if std.type(groups) == "array" then __userMixin({groups+: groups}) else __userMixin({groups+: [groups]}), // A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs. withUid(uid):: self + __userMixin({uid: uid}), // The name that uniquely identifies this user among all active users. withUsername(username):: self + __userMixin({username: username}), }, userType:: hidden.authentication.v1beta1.userInfo, }, }, // UserInfo holds the information about the user needed to implement the user.Info interface. userInfo:: { new():: {}, // Any additional information provided by the authenticator. withExtra(extra):: self + {extra: extra}, // Any additional information provided by the authenticator. withExtraMixin(extra):: self + {extra+: extra}, // The names of groups this user is a part of. withGroups(groups):: self + if std.type(groups) == "array" then {groups: groups} else {groups: [groups]}, // The names of groups this user is a part of. withGroupsMixin(groups):: self + if std.type(groups) == "array" then {groups+: groups} else {groups+: [groups]}, // A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs. withUid(uid):: self + {uid: uid}, // The name that uniquely identifies this user among all active users. withUsername(username):: self + {username: username}, mixin:: { }, }, }, }, authorization:: { v1:: { local apiVersion = {apiVersion: "authorization/v1"}, // NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface nonResourceAttributes:: { new():: {}, // Path is the URL path of the request withPath(path):: self + {path: path}, // Verb is the standard HTTP verb withVerb(verb):: self + {verb: verb}, mixin:: { }, }, // NonResourceRule holds information that describes a rule for the non-resource nonResourceRule:: { new():: {}, // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path. "*" means all. withNonResourceUrls(nonResourceUrls):: self + if std.type(nonResourceUrls) == "array" then {nonResourceURLs: nonResourceUrls} else {nonResourceURLs: [nonResourceUrls]}, // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path. "*" means all. withNonResourceUrlsMixin(nonResourceUrls):: self + if std.type(nonResourceUrls) == "array" then {nonResourceURLs+: nonResourceUrls} else {nonResourceURLs+: [nonResourceUrls]}, // Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. "*" means all. withVerbs(verbs):: self + if std.type(verbs) == "array" then {verbs: verbs} else {verbs: [verbs]}, // Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. "*" means all. withVerbsMixin(verbs):: self + if std.type(verbs) == "array" then {verbs+: verbs} else {verbs+: [verbs]}, mixin:: { }, }, // ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface resourceAttributes:: { new():: {}, // Group is the API Group of the Resource. "*" means all. withGroup(group):: self + {group: group}, // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. withName(name):: self + {name: name}, // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces "" (empty) is defaulted for LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped resources "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview withNamespace(namespace):: self + {namespace: namespace}, // Resource is one of the existing resource types. "*" means all. withResource(resource):: self + {resource: resource}, // Subresource is one of the existing resource types. "" means none. withSubresource(subresource):: self + {subresource: subresource}, // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. withVerb(verb):: self + {verb: verb}, // Version is the API Version of the Resource. "*" means all. withVersion(version):: self + {version: version}, mixin:: { }, }, // ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. resourceRule:: { new():: {}, // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. "*" means all. withApiGroups(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups: apiGroups} else {apiGroups: [apiGroups]}, // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. "*" means all. withApiGroupsMixin(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups+: apiGroups} else {apiGroups+: [apiGroups]}, // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. "*" means all. withResourceNames(resourceNames):: self + if std.type(resourceNames) == "array" then {resourceNames: resourceNames} else {resourceNames: [resourceNames]}, // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. "*" means all. withResourceNamesMixin(resourceNames):: self + if std.type(resourceNames) == "array" then {resourceNames+: resourceNames} else {resourceNames+: [resourceNames]}, // Resources is a list of resources this rule applies to. ResourceAll represents all resources. "*" means all. withResources(resources):: self + if std.type(resources) == "array" then {resources: resources} else {resources: [resources]}, // Resources is a list of resources this rule applies to. ResourceAll represents all resources. "*" means all. withResourcesMixin(resources):: self + if std.type(resources) == "array" then {resources+: resources} else {resources+: [resources]}, // Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. "*" means all. withVerbs(verbs):: self + if std.type(verbs) == "array" then {verbs: verbs} else {verbs: [verbs]}, // Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. "*" means all. withVerbsMixin(verbs):: self + if std.type(verbs) == "array" then {verbs+: verbs} else {verbs+: [verbs]}, mixin:: { }, }, // SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set selfSubjectAccessReviewSpec:: { new():: {}, mixin:: { // NonResourceAttributes describes information for a non-resource access request nonResourceAttributes:: { local __nonResourceAttributesMixin(nonResourceAttributes) = {nonResourceAttributes+: nonResourceAttributes}, mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), // Path is the URL path of the request withPath(path):: self + __nonResourceAttributesMixin({path: path}), // Verb is the standard HTTP verb withVerb(verb):: self + __nonResourceAttributesMixin({verb: verb}), }, nonResourceAttributesType:: hidden.authorization.v1.nonResourceAttributes, // ResourceAuthorizationAttributes describes information for a resource access request resourceAttributes:: { local __resourceAttributesMixin(resourceAttributes) = {resourceAttributes+: resourceAttributes}, mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), // Group is the API Group of the Resource. "*" means all. withGroup(group):: self + __resourceAttributesMixin({group: group}), // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. withName(name):: self + __resourceAttributesMixin({name: name}), // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces "" (empty) is defaulted for LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped resources "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview withNamespace(namespace):: self + __resourceAttributesMixin({namespace: namespace}), // Resource is one of the existing resource types. "*" means all. withResource(resource):: self + __resourceAttributesMixin({resource: resource}), // Subresource is one of the existing resource types. "" means none. withSubresource(subresource):: self + __resourceAttributesMixin({subresource: subresource}), // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. withVerb(verb):: self + __resourceAttributesMixin({verb: verb}), // Version is the API Version of the Resource. "*" means all. withVersion(version):: self + __resourceAttributesMixin({version: version}), }, resourceAttributesType:: hidden.authorization.v1.resourceAttributes, }, }, // selfSubjectRulesReviewSpec:: { new():: {}, // Namespace to evaluate rules for. Required. withNamespace(namespace):: self + {namespace: namespace}, mixin:: { }, }, // SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set subjectAccessReviewSpec:: { new():: {}, // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. withExtra(extra):: self + {extra: extra}, // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. withExtraMixin(extra):: self + {extra+: extra}, // Groups is the groups you're testing for. withGroups(groups):: self + if std.type(groups) == "array" then {groups: groups} else {groups: [groups]}, // Groups is the groups you're testing for. withGroupsMixin(groups):: self + if std.type(groups) == "array" then {groups+: groups} else {groups+: [groups]}, // UID information about the requesting user. withUid(uid):: self + {uid: uid}, // User is the user you're testing for. If you specify "User" but not "Groups", then is it interpreted as "What if User were not a member of any groups withUser(user):: self + {user: user}, mixin:: { // NonResourceAttributes describes information for a non-resource access request nonResourceAttributes:: { local __nonResourceAttributesMixin(nonResourceAttributes) = {nonResourceAttributes+: nonResourceAttributes}, mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), // Path is the URL path of the request withPath(path):: self + __nonResourceAttributesMixin({path: path}), // Verb is the standard HTTP verb withVerb(verb):: self + __nonResourceAttributesMixin({verb: verb}), }, nonResourceAttributesType:: hidden.authorization.v1.nonResourceAttributes, // ResourceAuthorizationAttributes describes information for a resource access request resourceAttributes:: { local __resourceAttributesMixin(resourceAttributes) = {resourceAttributes+: resourceAttributes}, mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), // Group is the API Group of the Resource. "*" means all. withGroup(group):: self + __resourceAttributesMixin({group: group}), // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. withName(name):: self + __resourceAttributesMixin({name: name}), // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces "" (empty) is defaulted for LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped resources "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview withNamespace(namespace):: self + __resourceAttributesMixin({namespace: namespace}), // Resource is one of the existing resource types. "*" means all. withResource(resource):: self + __resourceAttributesMixin({resource: resource}), // Subresource is one of the existing resource types. "" means none. withSubresource(subresource):: self + __resourceAttributesMixin({subresource: subresource}), // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. withVerb(verb):: self + __resourceAttributesMixin({verb: verb}), // Version is the API Version of the Resource. "*" means all. withVersion(version):: self + __resourceAttributesMixin({version: version}), }, resourceAttributesType:: hidden.authorization.v1.resourceAttributes, }, }, // SubjectAccessReviewStatus subjectAccessReviewStatus:: { new():: {}, // Allowed is required. True if the action would be allowed, false otherwise. withAllowed(allowed):: self + {allowed: allowed}, // EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request. withEvaluationError(evaluationError):: self + {evaluationError: evaluationError}, // Reason is optional. It indicates why a request was allowed or denied. withReason(reason):: self + {reason: reason}, mixin:: { }, }, // SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission, even if that list is incomplete. subjectRulesReviewStatus:: { new():: {}, // EvaluationError can appear in combination with Rules. It indicates an error occurred during rule evaluation, such as an authorizer that doesn't support rule evaluation, and that ResourceRules and/or NonResourceRules may be incomplete. withEvaluationError(evaluationError):: self + {evaluationError: evaluationError}, // Incomplete is true when the rules returned by this call are incomplete. This is most commonly encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation. withIncomplete(incomplete):: self + {incomplete: incomplete}, // NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. withNonResourceRules(nonResourceRules):: self + if std.type(nonResourceRules) == "array" then {nonResourceRules: nonResourceRules} else {nonResourceRules: [nonResourceRules]}, // NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. withNonResourceRulesMixin(nonResourceRules):: self + if std.type(nonResourceRules) == "array" then {nonResourceRules+: nonResourceRules} else {nonResourceRules+: [nonResourceRules]}, nonResourceRulesType:: hidden.authorization.v1.nonResourceRule, // ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. withResourceRules(resourceRules):: self + if std.type(resourceRules) == "array" then {resourceRules: resourceRules} else {resourceRules: [resourceRules]}, // ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. withResourceRulesMixin(resourceRules):: self + if std.type(resourceRules) == "array" then {resourceRules+: resourceRules} else {resourceRules+: [resourceRules]}, resourceRulesType:: hidden.authorization.v1.resourceRule, mixin:: { }, }, }, v1beta1:: { local apiVersion = {apiVersion: "authorization/v1beta1"}, // NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface nonResourceAttributes:: { new():: {}, // Path is the URL path of the request withPath(path):: self + {path: path}, // Verb is the standard HTTP verb withVerb(verb):: self + {verb: verb}, mixin:: { }, }, // NonResourceRule holds information that describes a rule for the non-resource nonResourceRule:: { new():: {}, // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path. "*" means all. withNonResourceUrls(nonResourceUrls):: self + if std.type(nonResourceUrls) == "array" then {nonResourceURLs: nonResourceUrls} else {nonResourceURLs: [nonResourceUrls]}, // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path. "*" means all. withNonResourceUrlsMixin(nonResourceUrls):: self + if std.type(nonResourceUrls) == "array" then {nonResourceURLs+: nonResourceUrls} else {nonResourceURLs+: [nonResourceUrls]}, // Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. "*" means all. withVerbs(verbs):: self + if std.type(verbs) == "array" then {verbs: verbs} else {verbs: [verbs]}, // Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. "*" means all. withVerbsMixin(verbs):: self + if std.type(verbs) == "array" then {verbs+: verbs} else {verbs+: [verbs]}, mixin:: { }, }, // ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface resourceAttributes:: { new():: {}, // Group is the API Group of the Resource. "*" means all. withGroup(group):: self + {group: group}, // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. withName(name):: self + {name: name}, // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces "" (empty) is defaulted for LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped resources "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview withNamespace(namespace):: self + {namespace: namespace}, // Resource is one of the existing resource types. "*" means all. withResource(resource):: self + {resource: resource}, // Subresource is one of the existing resource types. "" means none. withSubresource(subresource):: self + {subresource: subresource}, // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. withVerb(verb):: self + {verb: verb}, // Version is the API Version of the Resource. "*" means all. withVersion(version):: self + {version: version}, mixin:: { }, }, // ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. resourceRule:: { new():: {}, // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. "*" means all. withApiGroups(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups: apiGroups} else {apiGroups: [apiGroups]}, // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. "*" means all. withApiGroupsMixin(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups+: apiGroups} else {apiGroups+: [apiGroups]}, // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. "*" means all. withResourceNames(resourceNames):: self + if std.type(resourceNames) == "array" then {resourceNames: resourceNames} else {resourceNames: [resourceNames]}, // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. "*" means all. withResourceNamesMixin(resourceNames):: self + if std.type(resourceNames) == "array" then {resourceNames+: resourceNames} else {resourceNames+: [resourceNames]}, // Resources is a list of resources this rule applies to. ResourceAll represents all resources. "*" means all. withResources(resources):: self + if std.type(resources) == "array" then {resources: resources} else {resources: [resources]}, // Resources is a list of resources this rule applies to. ResourceAll represents all resources. "*" means all. withResourcesMixin(resources):: self + if std.type(resources) == "array" then {resources+: resources} else {resources+: [resources]}, // Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. "*" means all. withVerbs(verbs):: self + if std.type(verbs) == "array" then {verbs: verbs} else {verbs: [verbs]}, // Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. "*" means all. withVerbsMixin(verbs):: self + if std.type(verbs) == "array" then {verbs+: verbs} else {verbs+: [verbs]}, mixin:: { }, }, // SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set selfSubjectAccessReviewSpec:: { new():: {}, mixin:: { // NonResourceAttributes describes information for a non-resource access request nonResourceAttributes:: { local __nonResourceAttributesMixin(nonResourceAttributes) = {nonResourceAttributes+: nonResourceAttributes}, mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), // Path is the URL path of the request withPath(path):: self + __nonResourceAttributesMixin({path: path}), // Verb is the standard HTTP verb withVerb(verb):: self + __nonResourceAttributesMixin({verb: verb}), }, nonResourceAttributesType:: hidden.authorization.v1beta1.nonResourceAttributes, // ResourceAuthorizationAttributes describes information for a resource access request resourceAttributes:: { local __resourceAttributesMixin(resourceAttributes) = {resourceAttributes+: resourceAttributes}, mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), // Group is the API Group of the Resource. "*" means all. withGroup(group):: self + __resourceAttributesMixin({group: group}), // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. withName(name):: self + __resourceAttributesMixin({name: name}), // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces "" (empty) is defaulted for LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped resources "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview withNamespace(namespace):: self + __resourceAttributesMixin({namespace: namespace}), // Resource is one of the existing resource types. "*" means all. withResource(resource):: self + __resourceAttributesMixin({resource: resource}), // Subresource is one of the existing resource types. "" means none. withSubresource(subresource):: self + __resourceAttributesMixin({subresource: subresource}), // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. withVerb(verb):: self + __resourceAttributesMixin({verb: verb}), // Version is the API Version of the Resource. "*" means all. withVersion(version):: self + __resourceAttributesMixin({version: version}), }, resourceAttributesType:: hidden.authorization.v1beta1.resourceAttributes, }, }, // selfSubjectRulesReviewSpec:: { new():: {}, // Namespace to evaluate rules for. Required. withNamespace(namespace):: self + {namespace: namespace}, mixin:: { }, }, // SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set subjectAccessReviewSpec:: { new():: {}, // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. withExtra(extra):: self + {extra: extra}, // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. withExtraMixin(extra):: self + {extra+: extra}, // Groups is the groups you're testing for. withGroup(group):: self + if std.type(group) == "array" then {group: group} else {group: [group]}, // Groups is the groups you're testing for. withGroupMixin(group):: self + if std.type(group) == "array" then {group+: group} else {group+: [group]}, // UID information about the requesting user. withUid(uid):: self + {uid: uid}, // User is the user you're testing for. If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups withUser(user):: self + {user: user}, mixin:: { // NonResourceAttributes describes information for a non-resource access request nonResourceAttributes:: { local __nonResourceAttributesMixin(nonResourceAttributes) = {nonResourceAttributes+: nonResourceAttributes}, mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), // Path is the URL path of the request withPath(path):: self + __nonResourceAttributesMixin({path: path}), // Verb is the standard HTTP verb withVerb(verb):: self + __nonResourceAttributesMixin({verb: verb}), }, nonResourceAttributesType:: hidden.authorization.v1beta1.nonResourceAttributes, // ResourceAuthorizationAttributes describes information for a resource access request resourceAttributes:: { local __resourceAttributesMixin(resourceAttributes) = {resourceAttributes+: resourceAttributes}, mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), // Group is the API Group of the Resource. "*" means all. withGroup(group):: self + __resourceAttributesMixin({group: group}), // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. withName(name):: self + __resourceAttributesMixin({name: name}), // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces "" (empty) is defaulted for LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped resources "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview withNamespace(namespace):: self + __resourceAttributesMixin({namespace: namespace}), // Resource is one of the existing resource types. "*" means all. withResource(resource):: self + __resourceAttributesMixin({resource: resource}), // Subresource is one of the existing resource types. "" means none. withSubresource(subresource):: self + __resourceAttributesMixin({subresource: subresource}), // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. withVerb(verb):: self + __resourceAttributesMixin({verb: verb}), // Version is the API Version of the Resource. "*" means all. withVersion(version):: self + __resourceAttributesMixin({version: version}), }, resourceAttributesType:: hidden.authorization.v1beta1.resourceAttributes, }, }, // SubjectAccessReviewStatus subjectAccessReviewStatus:: { new():: {}, // Allowed is required. True if the action would be allowed, false otherwise. withAllowed(allowed):: self + {allowed: allowed}, // EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request. withEvaluationError(evaluationError):: self + {evaluationError: evaluationError}, // Reason is optional. It indicates why a request was allowed or denied. withReason(reason):: self + {reason: reason}, mixin:: { }, }, // SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission, even if that list is incomplete. subjectRulesReviewStatus:: { new():: {}, // EvaluationError can appear in combination with Rules. It indicates an error occurred during rule evaluation, such as an authorizer that doesn't support rule evaluation, and that ResourceRules and/or NonResourceRules may be incomplete. withEvaluationError(evaluationError):: self + {evaluationError: evaluationError}, // Incomplete is true when the rules returned by this call are incomplete. This is most commonly encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation. withIncomplete(incomplete):: self + {incomplete: incomplete}, // NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. withNonResourceRules(nonResourceRules):: self + if std.type(nonResourceRules) == "array" then {nonResourceRules: nonResourceRules} else {nonResourceRules: [nonResourceRules]}, // NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. withNonResourceRulesMixin(nonResourceRules):: self + if std.type(nonResourceRules) == "array" then {nonResourceRules+: nonResourceRules} else {nonResourceRules+: [nonResourceRules]}, nonResourceRulesType:: hidden.authorization.v1beta1.nonResourceRule, // ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. withResourceRules(resourceRules):: self + if std.type(resourceRules) == "array" then {resourceRules: resourceRules} else {resourceRules: [resourceRules]}, // ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. withResourceRulesMixin(resourceRules):: self + if std.type(resourceRules) == "array" then {resourceRules+: resourceRules} else {resourceRules+: [resourceRules]}, resourceRulesType:: hidden.authorization.v1beta1.resourceRule, mixin:: { }, }, }, }, autoscaling:: { v1:: { local apiVersion = {apiVersion: "autoscaling/v1"}, // CrossVersionObjectReference contains enough information to let you identify the referred resource. crossVersionObjectReference:: { new():: {}, // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names withName(name):: self + {name: name}, mixin:: { }, }, // specification of a horizontal pod autoscaler. horizontalPodAutoscalerSpec:: { new():: {}, // upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas. withMaxReplicas(maxReplicas):: self + {maxReplicas: maxReplicas}, // lower limit for the number of pods that can be set by the autoscaler, default 1. withMinReplicas(minReplicas):: self + {minReplicas: minReplicas}, // target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used. withTargetCpuUtilizationPercentage(targetCpuUtilizationPercentage):: self + {targetCPUUtilizationPercentage: targetCpuUtilizationPercentage}, mixin:: { // reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource. scaleTargetRef:: { local __scaleTargetRefMixin(scaleTargetRef) = {scaleTargetRef+: scaleTargetRef}, mixinInstance(scaleTargetRef):: __scaleTargetRefMixin(scaleTargetRef), // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names withName(name):: self + __scaleTargetRefMixin({name: name}), }, scaleTargetRefType:: hidden.autoscaling.v1.crossVersionObjectReference, }, }, // current status of a horizontal pod autoscaler horizontalPodAutoscalerStatus:: { new():: {}, // current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU. withCurrentCpuUtilizationPercentage(currentCpuUtilizationPercentage):: self + {currentCPUUtilizationPercentage: currentCpuUtilizationPercentage}, // current number of replicas of pods managed by this autoscaler. withCurrentReplicas(currentReplicas):: self + {currentReplicas: currentReplicas}, // desired number of replicas of pods managed by this autoscaler. withDesiredReplicas(desiredReplicas):: self + {desiredReplicas: desiredReplicas}, // most recent generation observed by this autoscaler. withObservedGeneration(observedGeneration):: self + {observedGeneration: observedGeneration}, mixin:: { // last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed. lastScaleTime:: { local __lastScaleTimeMixin(lastScaleTime) = {lastScaleTime+: lastScaleTime}, mixinInstance(lastScaleTime):: __lastScaleTimeMixin(lastScaleTime), }, lastScaleTimeType:: hidden.meta.v1.time, }, }, // ScaleSpec describes the attributes of a scale subresource. scaleSpec:: { new():: {}, // desired number of instances for the scaled object. withReplicas(replicas):: self + {replicas: replicas}, mixin:: { }, }, // ScaleStatus represents the current status of a scale subresource. scaleStatus:: { new():: {}, // actual number of observed instances of the scaled object. withReplicas(replicas):: self + {replicas: replicas}, // label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors withSelector(selector):: self + {selector: selector}, mixin:: { }, }, }, v2beta1:: { local apiVersion = {apiVersion: "autoscaling/v2beta1"}, // CrossVersionObjectReference contains enough information to let you identify the referred resource. crossVersionObjectReference:: { new():: {}, // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names withName(name):: self + {name: name}, mixin:: { }, }, // HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point. horizontalPodAutoscalerCondition:: { new():: {}, // message is a human-readable explanation containing details about the transition withMessage(message):: self + {message: message}, // reason is the reason for the condition's last transition. withReason(reason):: self + {reason: reason}, // type describes the current condition withType(type):: self + {type: type}, mixin:: { // lastTransitionTime is the last time the condition transitioned from one status to another lastTransitionTime:: { local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), }, lastTransitionTimeType:: hidden.meta.v1.time, }, }, // HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler. horizontalPodAutoscalerSpec:: { new():: {}, // maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas. withMaxReplicas(maxReplicas):: self + {maxReplicas: maxReplicas}, // metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. withMetrics(metrics):: self + if std.type(metrics) == "array" then {metrics: metrics} else {metrics: [metrics]}, // metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. withMetricsMixin(metrics):: self + if std.type(metrics) == "array" then {metrics+: metrics} else {metrics+: [metrics]}, metricsType:: hidden.autoscaling.v2beta1.metricSpec, // minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. withMinReplicas(minReplicas):: self + {minReplicas: minReplicas}, mixin:: { // scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count. scaleTargetRef:: { local __scaleTargetRefMixin(scaleTargetRef) = {scaleTargetRef+: scaleTargetRef}, mixinInstance(scaleTargetRef):: __scaleTargetRefMixin(scaleTargetRef), // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names withName(name):: self + __scaleTargetRefMixin({name: name}), }, scaleTargetRefType:: hidden.autoscaling.v2beta1.crossVersionObjectReference, }, }, // HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler. horizontalPodAutoscalerStatus:: { new():: {}, // conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met. withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, // conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met. withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, conditionsType:: hidden.autoscaling.v2beta1.horizontalPodAutoscalerCondition, // currentMetrics is the last read state of the metrics used by this autoscaler. withCurrentMetrics(currentMetrics):: self + if std.type(currentMetrics) == "array" then {currentMetrics: currentMetrics} else {currentMetrics: [currentMetrics]}, // currentMetrics is the last read state of the metrics used by this autoscaler. withCurrentMetricsMixin(currentMetrics):: self + if std.type(currentMetrics) == "array" then {currentMetrics+: currentMetrics} else {currentMetrics+: [currentMetrics]}, currentMetricsType:: hidden.autoscaling.v2beta1.metricStatus, // currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler. withCurrentReplicas(currentReplicas):: self + {currentReplicas: currentReplicas}, // desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler. withDesiredReplicas(desiredReplicas):: self + {desiredReplicas: desiredReplicas}, // observedGeneration is the most recent generation observed by this autoscaler. withObservedGeneration(observedGeneration):: self + {observedGeneration: observedGeneration}, mixin:: { // lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed. lastScaleTime:: { local __lastScaleTimeMixin(lastScaleTime) = {lastScaleTime+: lastScaleTime}, mixinInstance(lastScaleTime):: __lastScaleTimeMixin(lastScaleTime), }, lastScaleTimeType:: hidden.meta.v1.time, }, }, // MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once). metricSpec:: { new():: {}, // type is the type of metric source. It should match one of the fields below. withType(type):: self + {type: type}, mixin:: { // object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object). object:: { local __objectMixin(object) = {object+: object}, mixinInstance(object):: __objectMixin(object), // metricName is the name of the metric in question. withMetricName(metricName):: self + __objectMixin({metricName: metricName}), // target is the described Kubernetes object. target:: { local __targetMixin(target) = __objectMixin({target+: target}), mixinInstance(target):: __targetMixin(target), // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names withName(name):: self + __targetMixin({name: name}), }, targetType:: hidden.autoscaling.v2beta1.crossVersionObjectReference, // targetValue is the target value of the metric (as a quantity). targetValue:: { local __targetValueMixin(targetValue) = __objectMixin({targetValue+: targetValue}), mixinInstance(targetValue):: __targetValueMixin(targetValue), }, targetValueType:: hidden.core.resource.quantity, }, objectType:: hidden.autoscaling.v2beta1.objectMetricSource, // pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value. pods:: { local __podsMixin(pods) = {pods+: pods}, mixinInstance(pods):: __podsMixin(pods), // metricName is the name of the metric in question withMetricName(metricName):: self + __podsMixin({metricName: metricName}), // targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity) targetAverageValue:: { local __targetAverageValueMixin(targetAverageValue) = __podsMixin({targetAverageValue+: targetAverageValue}), mixinInstance(targetAverageValue):: __targetAverageValueMixin(targetAverageValue), }, targetAverageValueType:: hidden.core.resource.quantity, }, podsType:: hidden.autoscaling.v2beta1.podsMetricSource, // resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source. resource:: { local __resourceMixin(resource) = {resource+: resource}, mixinInstance(resource):: __resourceMixin(resource), // name is the name of the resource in question. withName(name):: self + __resourceMixin({name: name}), // targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. withTargetAverageUtilization(targetAverageUtilization):: self + __resourceMixin({targetAverageUtilization: targetAverageUtilization}), // targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the "pods" metric source type. targetAverageValue:: { local __targetAverageValueMixin(targetAverageValue) = __resourceMixin({targetAverageValue+: targetAverageValue}), mixinInstance(targetAverageValue):: __targetAverageValueMixin(targetAverageValue), }, targetAverageValueType:: hidden.core.resource.quantity, }, resourceType:: hidden.autoscaling.v2beta1.resourceMetricSource, }, }, // MetricStatus describes the last-read state of a single metric. metricStatus:: { new():: {}, // type is the type of metric source. It will match one of the fields below. withType(type):: self + {type: type}, mixin:: { // object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object). object:: { local __objectMixin(object) = {object+: object}, mixinInstance(object):: __objectMixin(object), // currentValue is the current value of the metric (as a quantity). currentValue:: { local __currentValueMixin(currentValue) = __objectMixin({currentValue+: currentValue}), mixinInstance(currentValue):: __currentValueMixin(currentValue), }, currentValueType:: hidden.core.resource.quantity, // metricName is the name of the metric in question. withMetricName(metricName):: self + __objectMixin({metricName: metricName}), // target is the described Kubernetes object. target:: { local __targetMixin(target) = __objectMixin({target+: target}), mixinInstance(target):: __targetMixin(target), // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names withName(name):: self + __targetMixin({name: name}), }, targetType:: hidden.autoscaling.v2beta1.crossVersionObjectReference, }, objectType:: hidden.autoscaling.v2beta1.objectMetricStatus, // pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value. pods:: { local __podsMixin(pods) = {pods+: pods}, mixinInstance(pods):: __podsMixin(pods), // currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity) currentAverageValue:: { local __currentAverageValueMixin(currentAverageValue) = __podsMixin({currentAverageValue+: currentAverageValue}), mixinInstance(currentAverageValue):: __currentAverageValueMixin(currentAverageValue), }, currentAverageValueType:: hidden.core.resource.quantity, // metricName is the name of the metric in question withMetricName(metricName):: self + __podsMixin({metricName: metricName}), }, podsType:: hidden.autoscaling.v2beta1.podsMetricStatus, // resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source. resource:: { local __resourceMixin(resource) = {resource+: resource}, mixinInstance(resource):: __resourceMixin(resource), // currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification. withCurrentAverageUtilization(currentAverageUtilization):: self + __resourceMixin({currentAverageUtilization: currentAverageUtilization}), // currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the "pods" metric source type. It will always be set, regardless of the corresponding metric specification. currentAverageValue:: { local __currentAverageValueMixin(currentAverageValue) = __resourceMixin({currentAverageValue+: currentAverageValue}), mixinInstance(currentAverageValue):: __currentAverageValueMixin(currentAverageValue), }, currentAverageValueType:: hidden.core.resource.quantity, // name is the name of the resource in question. withName(name):: self + __resourceMixin({name: name}), }, resourceType:: hidden.autoscaling.v2beta1.resourceMetricStatus, }, }, // ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object). objectMetricSource:: { new():: {}, // metricName is the name of the metric in question. withMetricName(metricName):: self + {metricName: metricName}, mixin:: { // target is the described Kubernetes object. target:: { local __targetMixin(target) = {target+: target}, mixinInstance(target):: __targetMixin(target), // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names withName(name):: self + __targetMixin({name: name}), }, targetType:: hidden.autoscaling.v2beta1.crossVersionObjectReference, // targetValue is the target value of the metric (as a quantity). targetValue:: { local __targetValueMixin(targetValue) = {targetValue+: targetValue}, mixinInstance(targetValue):: __targetValueMixin(targetValue), }, targetValueType:: hidden.core.resource.quantity, }, }, // ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object). objectMetricStatus:: { new():: {}, // metricName is the name of the metric in question. withMetricName(metricName):: self + {metricName: metricName}, mixin:: { // currentValue is the current value of the metric (as a quantity). currentValue:: { local __currentValueMixin(currentValue) = {currentValue+: currentValue}, mixinInstance(currentValue):: __currentValueMixin(currentValue), }, currentValueType:: hidden.core.resource.quantity, // target is the described Kubernetes object. target:: { local __targetMixin(target) = {target+: target}, mixinInstance(target):: __targetMixin(target), // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names withName(name):: self + __targetMixin({name: name}), }, targetType:: hidden.autoscaling.v2beta1.crossVersionObjectReference, }, }, // PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value. podsMetricSource:: { new():: {}, // metricName is the name of the metric in question withMetricName(metricName):: self + {metricName: metricName}, mixin:: { // targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity) targetAverageValue:: { local __targetAverageValueMixin(targetAverageValue) = {targetAverageValue+: targetAverageValue}, mixinInstance(targetAverageValue):: __targetAverageValueMixin(targetAverageValue), }, targetAverageValueType:: hidden.core.resource.quantity, }, }, // PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second). podsMetricStatus:: { new():: {}, // metricName is the name of the metric in question withMetricName(metricName):: self + {metricName: metricName}, mixin:: { // currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity) currentAverageValue:: { local __currentAverageValueMixin(currentAverageValue) = {currentAverageValue+: currentAverageValue}, mixinInstance(currentAverageValue):: __currentAverageValueMixin(currentAverageValue), }, currentAverageValueType:: hidden.core.resource.quantity, }, }, // ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source. Only one "target" type should be set. resourceMetricSource:: { new():: {}, // name is the name of the resource in question. withName(name):: self + {name: name}, // targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. withTargetAverageUtilization(targetAverageUtilization):: self + {targetAverageUtilization: targetAverageUtilization}, mixin:: { // targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the "pods" metric source type. targetAverageValue:: { local __targetAverageValueMixin(targetAverageValue) = {targetAverageValue+: targetAverageValue}, mixinInstance(targetAverageValue):: __targetAverageValueMixin(targetAverageValue), }, targetAverageValueType:: hidden.core.resource.quantity, }, }, // ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source. resourceMetricStatus:: { new():: {}, // currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification. withCurrentAverageUtilization(currentAverageUtilization):: self + {currentAverageUtilization: currentAverageUtilization}, // name is the name of the resource in question. withName(name):: self + {name: name}, mixin:: { // currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the "pods" metric source type. It will always be set, regardless of the corresponding metric specification. currentAverageValue:: { local __currentAverageValueMixin(currentAverageValue) = {currentAverageValue+: currentAverageValue}, mixinInstance(currentAverageValue):: __currentAverageValueMixin(currentAverageValue), }, currentAverageValueType:: hidden.core.resource.quantity, }, }, }, }, batch:: { v1:: { local apiVersion = {apiVersion: "batch/v1"}, // JobCondition describes current state of a job. jobCondition:: { new():: {}, // Human readable message indicating details about last transition. withMessage(message):: self + {message: message}, // (brief) reason for the condition's last transition. withReason(reason):: self + {reason: reason}, // Type of job condition, Complete or Failed. withType(type):: self + {type: type}, mixin:: { // Last time the condition was checked. lastProbeTime:: { local __lastProbeTimeMixin(lastProbeTime) = {lastProbeTime+: lastProbeTime}, mixinInstance(lastProbeTime):: __lastProbeTimeMixin(lastProbeTime), }, lastProbeTimeType:: hidden.meta.v1.time, // Last time the condition transit from one status to another. lastTransitionTime:: { local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), }, lastTransitionTimeType:: hidden.meta.v1.time, }, }, // JobSpec describes how the job execution will look like. jobSpec:: { new():: {}, // Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer withActiveDeadlineSeconds(activeDeadlineSeconds):: self + {activeDeadlineSeconds: activeDeadlineSeconds}, // Specifies the number of retries before marking this job failed. Defaults to 6 withBackoffLimit(backoffLimit):: self + {backoffLimit: backoffLimit}, // Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ withCompletions(completions):: self + {completions: completions}, // manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://git.k8s.io/community/contributors/design-proposals/selector-generation.md withManualSelector(manualSelector):: self + {manualSelector: manualSelector}, // Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ withParallelism(parallelism):: self + {parallelism: parallelism}, mixin:: { // A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors selector:: { local __selectorMixin(selector) = {selector+: selector}, mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ template:: { local __templateMixin(template) = {template+: template}, mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, }, }, // JobStatus represents the current state of a Job. jobStatus:: { new():: {}, // The number of actively running pods. withActive(active):: self + {active: active}, // The latest available observations of an object's current state. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, // The latest available observations of an object's current state. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, conditionsType:: hidden.batch.v1.jobCondition, // The number of pods which reached phase Failed. withFailed(failed):: self + {failed: failed}, // The number of pods which reached phase Succeeded. withSucceeded(succeeded):: self + {succeeded: succeeded}, mixin:: { // Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. completionTime:: { local __completionTimeMixin(completionTime) = {completionTime+: completionTime}, mixinInstance(completionTime):: __completionTimeMixin(completionTime), }, completionTimeType:: hidden.meta.v1.time, // Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. startTime:: { local __startTimeMixin(startTime) = {startTime+: startTime}, mixinInstance(startTime):: __startTimeMixin(startTime), }, startTimeType:: hidden.meta.v1.time, }, }, }, v1beta1:: { local apiVersion = {apiVersion: "batch/v1beta1"}, // CronJobSpec describes how the job execution will look like and when it will actually run. cronJobSpec:: { new():: {}, // Specifies how to treat concurrent executions of a Job. Defaults to Allow. withConcurrencyPolicy(concurrencyPolicy):: self + {concurrencyPolicy: concurrencyPolicy}, // The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. withFailedJobsHistoryLimit(failedJobsHistoryLimit):: self + {failedJobsHistoryLimit: failedJobsHistoryLimit}, // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. withSchedule(schedule):: self + {schedule: schedule}, // Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones. withStartingDeadlineSeconds(startingDeadlineSeconds):: self + {startingDeadlineSeconds: startingDeadlineSeconds}, // The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 3. withSuccessfulJobsHistoryLimit(successfulJobsHistoryLimit):: self + {successfulJobsHistoryLimit: successfulJobsHistoryLimit}, // This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. withSuspend(suspend):: self + {suspend: suspend}, mixin:: { // Specifies the job that will be created when executing a CronJob. jobTemplate:: { local __jobTemplateMixin(jobTemplate) = {jobTemplate+: jobTemplate}, mixinInstance(jobTemplate):: __jobTemplateMixin(jobTemplate), // Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __jobTemplateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __jobTemplateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // Specifies the number of retries before marking this job failed. Defaults to 6 withBackoffLimit(backoffLimit):: self + __specMixin({backoffLimit: backoffLimit}), // Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ withCompletions(completions):: self + __specMixin({completions: completions}), // manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://git.k8s.io/community/contributors/design-proposals/selector-generation.md withManualSelector(manualSelector):: self + __specMixin({manualSelector: manualSelector}), // Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ withParallelism(parallelism):: self + __specMixin({parallelism: parallelism}), // A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors selector:: { local __selectorMixin(selector) = __specMixin({selector+: selector}), mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ template:: { local __templateMixin(template) = __specMixin({template+: template}), mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, }, specType:: hidden.batch.v1.jobSpec, }, jobTemplateType:: hidden.batch.v1beta1.jobTemplateSpec, }, }, // CronJobStatus represents the current state of a cron job. cronJobStatus:: { new():: {}, // A list of pointers to currently running jobs. withActive(active):: self + if std.type(active) == "array" then {active: active} else {active: [active]}, // A list of pointers to currently running jobs. withActiveMixin(active):: self + if std.type(active) == "array" then {active+: active} else {active+: [active]}, activeType:: hidden.core.v1.objectReference, mixin:: { // Information when was the last time the job was successfully scheduled. lastScheduleTime:: { local __lastScheduleTimeMixin(lastScheduleTime) = {lastScheduleTime+: lastScheduleTime}, mixinInstance(lastScheduleTime):: __lastScheduleTimeMixin(lastScheduleTime), }, lastScheduleTimeType:: hidden.meta.v1.time, }, }, // JobTemplateSpec describes the data a Job should have when created from a template jobTemplateSpec:: { new():: {}, mixin:: { // Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // Specifies the number of retries before marking this job failed. Defaults to 6 withBackoffLimit(backoffLimit):: self + __specMixin({backoffLimit: backoffLimit}), // Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ withCompletions(completions):: self + __specMixin({completions: completions}), // manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://git.k8s.io/community/contributors/design-proposals/selector-generation.md withManualSelector(manualSelector):: self + __specMixin({manualSelector: manualSelector}), // Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ withParallelism(parallelism):: self + __specMixin({parallelism: parallelism}), // A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors selector:: { local __selectorMixin(selector) = __specMixin({selector+: selector}), mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ template:: { local __templateMixin(template) = __specMixin({template+: template}), mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, }, specType:: hidden.batch.v1.jobSpec, }, }, }, v2alpha1:: { local apiVersion = {apiVersion: "batch/v2alpha1"}, // CronJobSpec describes how the job execution will look like and when it will actually run. cronJobSpec:: { new():: {}, // Specifies how to treat concurrent executions of a Job. Defaults to Allow. withConcurrencyPolicy(concurrencyPolicy):: self + {concurrencyPolicy: concurrencyPolicy}, // The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. withFailedJobsHistoryLimit(failedJobsHistoryLimit):: self + {failedJobsHistoryLimit: failedJobsHistoryLimit}, // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. withSchedule(schedule):: self + {schedule: schedule}, // Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones. withStartingDeadlineSeconds(startingDeadlineSeconds):: self + {startingDeadlineSeconds: startingDeadlineSeconds}, // The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. withSuccessfulJobsHistoryLimit(successfulJobsHistoryLimit):: self + {successfulJobsHistoryLimit: successfulJobsHistoryLimit}, // This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. withSuspend(suspend):: self + {suspend: suspend}, mixin:: { // Specifies the job that will be created when executing a CronJob. jobTemplate:: { local __jobTemplateMixin(jobTemplate) = {jobTemplate+: jobTemplate}, mixinInstance(jobTemplate):: __jobTemplateMixin(jobTemplate), // Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __jobTemplateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __jobTemplateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // Specifies the number of retries before marking this job failed. Defaults to 6 withBackoffLimit(backoffLimit):: self + __specMixin({backoffLimit: backoffLimit}), // Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ withCompletions(completions):: self + __specMixin({completions: completions}), // manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://git.k8s.io/community/contributors/design-proposals/selector-generation.md withManualSelector(manualSelector):: self + __specMixin({manualSelector: manualSelector}), // Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ withParallelism(parallelism):: self + __specMixin({parallelism: parallelism}), // A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors selector:: { local __selectorMixin(selector) = __specMixin({selector+: selector}), mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ template:: { local __templateMixin(template) = __specMixin({template+: template}), mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, }, specType:: hidden.batch.v1.jobSpec, }, jobTemplateType:: hidden.batch.v2alpha1.jobTemplateSpec, }, }, // CronJobStatus represents the current state of a cron job. cronJobStatus:: { new():: {}, // A list of pointers to currently running jobs. withActive(active):: self + if std.type(active) == "array" then {active: active} else {active: [active]}, // A list of pointers to currently running jobs. withActiveMixin(active):: self + if std.type(active) == "array" then {active+: active} else {active+: [active]}, activeType:: hidden.core.v1.objectReference, mixin:: { // Information when was the last time the job was successfully scheduled. lastScheduleTime:: { local __lastScheduleTimeMixin(lastScheduleTime) = {lastScheduleTime+: lastScheduleTime}, mixinInstance(lastScheduleTime):: __lastScheduleTimeMixin(lastScheduleTime), }, lastScheduleTimeType:: hidden.meta.v1.time, }, }, // JobTemplateSpec describes the data a Job should have when created from a template jobTemplateSpec:: { new():: {}, mixin:: { // Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // Specifies the number of retries before marking this job failed. Defaults to 6 withBackoffLimit(backoffLimit):: self + __specMixin({backoffLimit: backoffLimit}), // Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ withCompletions(completions):: self + __specMixin({completions: completions}), // manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://git.k8s.io/community/contributors/design-proposals/selector-generation.md withManualSelector(manualSelector):: self + __specMixin({manualSelector: manualSelector}), // Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ withParallelism(parallelism):: self + __specMixin({parallelism: parallelism}), // A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors selector:: { local __selectorMixin(selector) = __specMixin({selector+: selector}), mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ template:: { local __templateMixin(template) = __specMixin({template+: template}), mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, }, specType:: hidden.batch.v1.jobSpec, }, }, }, }, certificates:: { v1beta1:: { local apiVersion = {apiVersion: "certificates/v1beta1"}, // certificateSigningRequestCondition:: { new():: {}, // human readable message with details about the request state withMessage(message):: self + {message: message}, // brief reason for the request state withReason(reason):: self + {reason: reason}, // request approval state, currently Approved or Denied. withType(type):: self + {type: type}, mixin:: { // timestamp for the last update to this condition lastUpdateTime:: { local __lastUpdateTimeMixin(lastUpdateTime) = {lastUpdateTime+: lastUpdateTime}, mixinInstance(lastUpdateTime):: __lastUpdateTimeMixin(lastUpdateTime), }, lastUpdateTimeType:: hidden.meta.v1.time, }, }, // This information is immutable after the request is created. Only the Request and Usages fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users. certificateSigningRequestSpec:: { new():: {}, // Extra information about the requesting user. See user.Info interface for details. withExtra(extra):: self + {extra: extra}, // Extra information about the requesting user. See user.Info interface for details. withExtraMixin(extra):: self + {extra+: extra}, // Group information about the requesting user. See user.Info interface for details. withGroups(groups):: self + if std.type(groups) == "array" then {groups: groups} else {groups: [groups]}, // Group information about the requesting user. See user.Info interface for details. withGroupsMixin(groups):: self + if std.type(groups) == "array" then {groups+: groups} else {groups+: [groups]}, // Base64-encoded PKCS#10 CSR data withRequest(request):: self + {request: request}, // UID information about the requesting user. See user.Info interface for details. withUid(uid):: self + {uid: uid}, // allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 // https://tools.ietf.org/html/rfc5280#section-4.2.1.12 withUsages(usages):: self + if std.type(usages) == "array" then {usages: usages} else {usages: [usages]}, // allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 // https://tools.ietf.org/html/rfc5280#section-4.2.1.12 withUsagesMixin(usages):: self + if std.type(usages) == "array" then {usages+: usages} else {usages+: [usages]}, // Information about the requesting user. See user.Info interface for details. withUsername(username):: self + {username: username}, mixin:: { }, }, // certificateSigningRequestStatus:: { new():: {}, // If request was approved, the controller will place the issued certificate here. withCertificate(certificate):: self + {certificate: certificate}, // Conditions applied to the request, such as approval or denial. withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, // Conditions applied to the request, such as approval or denial. withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, conditionsType:: hidden.certificates.v1beta1.certificateSigningRequestCondition, mixin:: { }, }, }, }, core:: { intstr:: { local apiVersion = {apiVersion: "intstr"}, // intOrString:: { new():: {}, mixin:: { }, }, }, resource:: { local apiVersion = {apiVersion: "resource"}, // quantity:: { new():: {}, mixin:: { }, }, }, v1:: { local apiVersion = {apiVersion: "v1"}, // Represents a Persistent Disk resource in AWS. // // An AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling. awsElasticBlockStoreVolumeSource:: { new():: {}, // Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore withFsType(fsType):: self + {fsType: fsType}, // The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). withPartition(partition):: self + {partition: partition}, // Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore withReadOnly(readOnly):: self + {readOnly: readOnly}, // Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore withVolumeId(volumeId):: self + {volumeID: volumeId}, mixin:: { }, }, // Affinity is a group of affinity scheduling rules. affinity:: { new():: {}, mixin:: { // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = {nodeAffinity+: nodeAffinity}, mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = {podAffinity+: podAffinity}, mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = {podAntiAffinity+: podAntiAffinity}, mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, }, // AttachedVolume describes a volume attached to a node attachedVolume:: { new():: {}, // DevicePath represents the device path where the volume should be available withDevicePath(devicePath):: self + {devicePath: devicePath}, // Name of the attached volume withName(name):: self + {name: name}, mixin:: { }, }, // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. azureDiskVolumeSource:: { new():: {}, // Host Caching mode: None, Read Only, Read Write. withCachingMode(cachingMode):: self + {cachingMode: cachingMode}, // The Name of the data disk in the blob storage withDiskName(diskName):: self + {diskName: diskName}, // The URI the data disk in the blob storage withDiskUri(diskUri):: self + {diskURI: diskUri}, // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + {fsType: fsType}, // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + {readOnly: readOnly}, mixin:: { }, }, // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. azureFilePersistentVolumeSource:: { new():: {}, // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + {readOnly: readOnly}, // the name of secret that contains Azure Storage Account Name and Key withSecretName(secretName):: self + {secretName: secretName}, // the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod withSecretNamespace(secretNamespace):: self + {secretNamespace: secretNamespace}, // Share Name withShareName(shareName):: self + {shareName: shareName}, mixin:: { }, }, // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. azureFileVolumeSource:: { new():: {}, // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + {readOnly: readOnly}, // the name of secret that contains Azure Storage Account Name and Key withSecretName(secretName):: self + {secretName: secretName}, // Share Name withShareName(shareName):: self + {shareName: shareName}, mixin:: { }, }, // Adds and removes POSIX capabilities from running containers. capabilities:: { new():: {}, // Added capabilities withAdd(add):: self + if std.type(add) == "array" then {add: add} else {add: [add]}, // Added capabilities withAddMixin(add):: self + if std.type(add) == "array" then {add+: add} else {add+: [add]}, // Removed capabilities withDrop(drop):: self + if std.type(drop) == "array" then {drop: drop} else {drop: [drop]}, // Removed capabilities withDropMixin(drop):: self + if std.type(drop) == "array" then {drop+: drop} else {drop+: [drop]}, mixin:: { }, }, // Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling. cephFSPersistentVolumeSource:: { new():: {}, // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it withMonitors(monitors):: self + if std.type(monitors) == "array" then {monitors: monitors} else {monitors: [monitors]}, // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it withMonitorsMixin(monitors):: self + if std.type(monitors) == "array" then {monitors+: monitors} else {monitors+: [monitors]}, // Optional: Used as the mounted root, rather than the full Ceph tree, default is / withPath(path):: self + {path: path}, // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it withReadOnly(readOnly):: self + {readOnly: readOnly}, // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it withSecretFile(secretFile):: self + {secretFile: secretFile}, // Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it withUser(user):: self + {user: user}, mixin:: { // Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it secretRef:: { local __secretRefMixin(secretRef) = {secretRef+: secretRef}, mixinInstance(secretRef):: __secretRefMixin(secretRef), // Name is unique within a namespace to reference a secret resource. withName(name):: self + __secretRefMixin({name: name}), // Namespace defines the space within which the secret name must be unique. withNamespace(namespace):: self + __secretRefMixin({namespace: namespace}), }, secretRefType:: hidden.core.v1.secretReference, }, }, // Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling. cephFsVolumeSource:: { new():: {}, // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it withMonitors(monitors):: self + if std.type(monitors) == "array" then {monitors: monitors} else {monitors: [monitors]}, // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it withMonitorsMixin(monitors):: self + if std.type(monitors) == "array" then {monitors+: monitors} else {monitors+: [monitors]}, // Optional: Used as the mounted root, rather than the full Ceph tree, default is / withPath(path):: self + {path: path}, // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it withReadOnly(readOnly):: self + {readOnly: readOnly}, // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it withSecretFile(secretFile):: self + {secretFile: secretFile}, // Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it withUser(user):: self + {user: user}, mixin:: { // Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it secretRef:: { local __secretRefMixin(secretRef) = {secretRef+: secretRef}, mixinInstance(secretRef):: __secretRefMixin(secretRef), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __secretRefMixin({name: name}), }, secretRefType:: hidden.core.v1.localObjectReference, }, }, // Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling. cinderVolumeSource:: { new():: {}, // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md withFsType(fsType):: self + {fsType: fsType}, // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md withReadOnly(readOnly):: self + {readOnly: readOnly}, // volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md withVolumeId(volumeId):: self + {volumeID: volumeId}, mixin:: { }, }, // ClientIPConfig represents the configurations of Client IP based session affinity. clientIPConfig:: { new():: {}, // timeoutSeconds specifies the seconds of ClientIP type session sticky time. The value must be >0 && <=86400(for 1 day) if ServiceAffinity == "ClientIP". Default value is 10800(for 3 hours). withTimeoutSeconds(timeoutSeconds):: self + {timeoutSeconds: timeoutSeconds}, mixin:: { }, }, // Information about the condition of a component. componentCondition:: { new():: {}, // Condition error code for a component. For example, a health check error code. withError(errorParam):: self + {"error": errorParam}, // Message about the condition for a component. For example, information about a health check. withMessage(message):: self + {message: message}, // Type of condition for a component. Valid value: "Healthy" withType(type):: self + {type: type}, mixin:: { }, }, // ConfigMapEnvSource selects a ConfigMap to populate the environment variables with. // // The contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables. configMapEnvSource:: { new():: {}, // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + {name: name}, // Specify whether the ConfigMap must be defined withOptional(optional):: self + {optional: optional}, mixin:: { }, }, // Selects a key from a ConfigMap. configMapKeySelector:: { new():: {}, // The key to select. withKey(key):: self + {key: key}, // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + {name: name}, // Specify whether the ConfigMap or it's key must be defined withOptional(optional):: self + {optional: optional}, mixin:: { }, }, // Adapts a ConfigMap into a projected volume. // // The contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode. configMapProjection:: { new():: {}, // If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.core.v1.keyToPath, // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + {name: name}, // Specify whether the ConfigMap or it's keys must be defined withOptional(optional):: self + {optional: optional}, mixin:: { }, }, // Adapts a ConfigMap into a volume. // // The contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling. configMapVolumeSource:: { new():: {}, // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. withDefaultMode(defaultMode):: self + {defaultMode: defaultMode}, // If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.core.v1.keyToPath, // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + {name: name}, // Specify whether the ConfigMap or it's keys must be defined withOptional(optional):: self + {optional: optional}, mixin:: { }, }, // A single application container that you want to run within a pod. container:: { new(name, image):: {} + self.withName(name) + self.withImage(image), // Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell withArgs(args):: self + if std.type(args) == "array" then {args: args} else {args: [args]}, // Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell withArgsMixin(args):: self + if std.type(args) == "array" then {args+: args} else {args+: [args]}, // Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell withCommand(command):: self + if std.type(command) == "array" then {command: command} else {command: [command]}, // Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell withCommandMixin(command):: self + if std.type(command) == "array" then {command+: command} else {command+: [command]}, // List of environment variables to set in the container. Cannot be updated. withEnv(env):: self + if std.type(env) == "array" then {env: env} else {env: [env]}, // List of environment variables to set in the container. Cannot be updated. withEnvMixin(env):: self + if std.type(env) == "array" then {env+: env} else {env+: [env]}, // List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. withEnvFrom(envFrom):: self + if std.type(envFrom) == "array" then {envFrom: envFrom} else {envFrom: [envFrom]}, // List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. withEnvFromMixin(envFrom):: self + if std.type(envFrom) == "array" then {envFrom+: envFrom} else {envFrom+: [envFrom]}, envFromType:: hidden.core.v1.envFromSource, envType:: hidden.core.v1.envVar, // Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets. withImage(image):: self + {image: image}, // Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images withImagePullPolicy(imagePullPolicy):: self + {imagePullPolicy: imagePullPolicy}, // Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. withName(name):: self + {name: name}, // List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. withPorts(ports):: self + if std.type(ports) == "array" then {ports: ports} else {ports: [ports]}, // List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. withPortsMixin(ports):: self + if std.type(ports) == "array" then {ports+: ports} else {ports+: [ports]}, portsType:: hidden.core.v1.containerPort, // Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false. withStdin(stdin):: self + {stdin: stdin}, // Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false withStdinOnce(stdinOnce):: self + {stdinOnce: stdinOnce}, // Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated. withTerminationMessagePath(terminationMessagePath):: self + {terminationMessagePath: terminationMessagePath}, // Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. withTerminationMessagePolicy(terminationMessagePolicy):: self + {terminationMessagePolicy: terminationMessagePolicy}, // Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. withTty(tty):: self + {tty: tty}, // Pod volumes to mount into the container's filesystem. Cannot be updated. withVolumeMounts(volumeMounts):: self + if std.type(volumeMounts) == "array" then {volumeMounts: volumeMounts} else {volumeMounts: [volumeMounts]}, // Pod volumes to mount into the container's filesystem. Cannot be updated. withVolumeMountsMixin(volumeMounts):: self + if std.type(volumeMounts) == "array" then {volumeMounts+: volumeMounts} else {volumeMounts+: [volumeMounts]}, volumeMountsType:: hidden.core.v1.volumeMount, // Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. withWorkingDir(workingDir):: self + {workingDir: workingDir}, mixin:: { // Actions that the management system should take in response to container lifecycle events. Cannot be updated. lifecycle:: { local __lifecycleMixin(lifecycle) = {lifecycle+: lifecycle}, mixinInstance(lifecycle):: __lifecycleMixin(lifecycle), // PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks postStart:: { local __postStartMixin(postStart) = __lifecycleMixin({postStart+: postStart}), mixinInstance(postStart):: __postStartMixin(postStart), // One and only one of the following should be specified. Exec specifies the action to take. exec:: { local __execMixin(exec) = __postStartMixin({exec+: exec}), mixinInstance(exec):: __execMixin(exec), // Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. withCommand(command):: self + if std.type(command) == "array" then __execMixin({command: command}) else __execMixin({command: [command]}), // Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. withCommandMixin(command):: self + if std.type(command) == "array" then __execMixin({command+: command}) else __execMixin({command+: [command]}), }, execType:: hidden.core.v1.execAction, // HTTPGet specifies the http request to perform. httpGet:: { local __httpGetMixin(httpGet) = __postStartMixin({httpGet+: httpGet}), mixinInstance(httpGet):: __httpGetMixin(httpGet), // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. withHost(host):: self + __httpGetMixin({host: host}), // Custom headers to set in the request. HTTP allows repeated headers. withHttpHeaders(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders: httpHeaders}) else __httpGetMixin({httpHeaders: [httpHeaders]}), // Custom headers to set in the request. HTTP allows repeated headers. withHttpHeadersMixin(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders+: httpHeaders}) else __httpGetMixin({httpHeaders+: [httpHeaders]}), httpHeadersType:: hidden.core.v1.httpHeader, // Path to access on the HTTP server. withPath(path):: self + __httpGetMixin({path: path}), // Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. withPort(port):: __httpGetMixin({port: port}), // Scheme to use for connecting to the host. Defaults to HTTP. withScheme(scheme):: self + __httpGetMixin({scheme: scheme}), }, httpGetType:: hidden.core.v1.httpGetAction, // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported tcpSocket:: { local __tcpSocketMixin(tcpSocket) = __postStartMixin({tcpSocket+: tcpSocket}), mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), // Optional: Host name to connect to, defaults to the pod IP. withHost(host):: self + __tcpSocketMixin({host: host}), // Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. withPort(port):: __tcpSocketMixin({port: port}), }, tcpSocketType:: hidden.core.v1.tcpSocketAction, }, postStartType:: hidden.core.v1.handler, // PreStop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks preStop:: { local __preStopMixin(preStop) = __lifecycleMixin({preStop+: preStop}), mixinInstance(preStop):: __preStopMixin(preStop), // One and only one of the following should be specified. Exec specifies the action to take. exec:: { local __execMixin(exec) = __preStopMixin({exec+: exec}), mixinInstance(exec):: __execMixin(exec), // Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. withCommand(command):: self + if std.type(command) == "array" then __execMixin({command: command}) else __execMixin({command: [command]}), // Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. withCommandMixin(command):: self + if std.type(command) == "array" then __execMixin({command+: command}) else __execMixin({command+: [command]}), }, execType:: hidden.core.v1.execAction, // HTTPGet specifies the http request to perform. httpGet:: { local __httpGetMixin(httpGet) = __preStopMixin({httpGet+: httpGet}), mixinInstance(httpGet):: __httpGetMixin(httpGet), // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. withHost(host):: self + __httpGetMixin({host: host}), // Custom headers to set in the request. HTTP allows repeated headers. withHttpHeaders(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders: httpHeaders}) else __httpGetMixin({httpHeaders: [httpHeaders]}), // Custom headers to set in the request. HTTP allows repeated headers. withHttpHeadersMixin(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders+: httpHeaders}) else __httpGetMixin({httpHeaders+: [httpHeaders]}), httpHeadersType:: hidden.core.v1.httpHeader, // Path to access on the HTTP server. withPath(path):: self + __httpGetMixin({path: path}), // Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. withPort(port):: __httpGetMixin({port: port}), // Scheme to use for connecting to the host. Defaults to HTTP. withScheme(scheme):: self + __httpGetMixin({scheme: scheme}), }, httpGetType:: hidden.core.v1.httpGetAction, // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported tcpSocket:: { local __tcpSocketMixin(tcpSocket) = __preStopMixin({tcpSocket+: tcpSocket}), mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), // Optional: Host name to connect to, defaults to the pod IP. withHost(host):: self + __tcpSocketMixin({host: host}), // Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. withPort(port):: __tcpSocketMixin({port: port}), }, tcpSocketType:: hidden.core.v1.tcpSocketAction, }, preStopType:: hidden.core.v1.handler, }, lifecycleType:: hidden.core.v1.lifecycle, // Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes livenessProbe:: { local __livenessProbeMixin(livenessProbe) = {livenessProbe+: livenessProbe}, mixinInstance(livenessProbe):: __livenessProbeMixin(livenessProbe), // One and only one of the following should be specified. Exec specifies the action to take. exec:: { local __execMixin(exec) = __livenessProbeMixin({exec+: exec}), mixinInstance(exec):: __execMixin(exec), // Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. withCommand(command):: self + if std.type(command) == "array" then __execMixin({command: command}) else __execMixin({command: [command]}), // Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. withCommandMixin(command):: self + if std.type(command) == "array" then __execMixin({command+: command}) else __execMixin({command+: [command]}), }, execType:: hidden.core.v1.execAction, // Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. withFailureThreshold(failureThreshold):: self + __livenessProbeMixin({failureThreshold: failureThreshold}), // HTTPGet specifies the http request to perform. httpGet:: { local __httpGetMixin(httpGet) = __livenessProbeMixin({httpGet+: httpGet}), mixinInstance(httpGet):: __httpGetMixin(httpGet), // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. withHost(host):: self + __httpGetMixin({host: host}), // Custom headers to set in the request. HTTP allows repeated headers. withHttpHeaders(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders: httpHeaders}) else __httpGetMixin({httpHeaders: [httpHeaders]}), // Custom headers to set in the request. HTTP allows repeated headers. withHttpHeadersMixin(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders+: httpHeaders}) else __httpGetMixin({httpHeaders+: [httpHeaders]}), httpHeadersType:: hidden.core.v1.httpHeader, // Path to access on the HTTP server. withPath(path):: self + __httpGetMixin({path: path}), // Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. withPort(port):: __httpGetMixin({port: port}), // Scheme to use for connecting to the host. Defaults to HTTP. withScheme(scheme):: self + __httpGetMixin({scheme: scheme}), }, httpGetType:: hidden.core.v1.httpGetAction, // Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes withInitialDelaySeconds(initialDelaySeconds):: self + __livenessProbeMixin({initialDelaySeconds: initialDelaySeconds}), // How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. withPeriodSeconds(periodSeconds):: self + __livenessProbeMixin({periodSeconds: periodSeconds}), // Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1. withSuccessThreshold(successThreshold):: self + __livenessProbeMixin({successThreshold: successThreshold}), // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported tcpSocket:: { local __tcpSocketMixin(tcpSocket) = __livenessProbeMixin({tcpSocket+: tcpSocket}), mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), // Optional: Host name to connect to, defaults to the pod IP. withHost(host):: self + __tcpSocketMixin({host: host}), // Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. withPort(port):: __tcpSocketMixin({port: port}), }, tcpSocketType:: hidden.core.v1.tcpSocketAction, // Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes withTimeoutSeconds(timeoutSeconds):: self + __livenessProbeMixin({timeoutSeconds: timeoutSeconds}), }, livenessProbeType:: hidden.core.v1.probe, // Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes readinessProbe:: { local __readinessProbeMixin(readinessProbe) = {readinessProbe+: readinessProbe}, mixinInstance(readinessProbe):: __readinessProbeMixin(readinessProbe), // One and only one of the following should be specified. Exec specifies the action to take. exec:: { local __execMixin(exec) = __readinessProbeMixin({exec+: exec}), mixinInstance(exec):: __execMixin(exec), // Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. withCommand(command):: self + if std.type(command) == "array" then __execMixin({command: command}) else __execMixin({command: [command]}), // Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. withCommandMixin(command):: self + if std.type(command) == "array" then __execMixin({command+: command}) else __execMixin({command+: [command]}), }, execType:: hidden.core.v1.execAction, // Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. withFailureThreshold(failureThreshold):: self + __readinessProbeMixin({failureThreshold: failureThreshold}), // HTTPGet specifies the http request to perform. httpGet:: { local __httpGetMixin(httpGet) = __readinessProbeMixin({httpGet+: httpGet}), mixinInstance(httpGet):: __httpGetMixin(httpGet), // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. withHost(host):: self + __httpGetMixin({host: host}), // Custom headers to set in the request. HTTP allows repeated headers. withHttpHeaders(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders: httpHeaders}) else __httpGetMixin({httpHeaders: [httpHeaders]}), // Custom headers to set in the request. HTTP allows repeated headers. withHttpHeadersMixin(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders+: httpHeaders}) else __httpGetMixin({httpHeaders+: [httpHeaders]}), httpHeadersType:: hidden.core.v1.httpHeader, // Path to access on the HTTP server. withPath(path):: self + __httpGetMixin({path: path}), // Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. withPort(port):: __httpGetMixin({port: port}), // Scheme to use for connecting to the host. Defaults to HTTP. withScheme(scheme):: self + __httpGetMixin({scheme: scheme}), }, httpGetType:: hidden.core.v1.httpGetAction, // Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes withInitialDelaySeconds(initialDelaySeconds):: self + __readinessProbeMixin({initialDelaySeconds: initialDelaySeconds}), // How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. withPeriodSeconds(periodSeconds):: self + __readinessProbeMixin({periodSeconds: periodSeconds}), // Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1. withSuccessThreshold(successThreshold):: self + __readinessProbeMixin({successThreshold: successThreshold}), // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported tcpSocket:: { local __tcpSocketMixin(tcpSocket) = __readinessProbeMixin({tcpSocket+: tcpSocket}), mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), // Optional: Host name to connect to, defaults to the pod IP. withHost(host):: self + __tcpSocketMixin({host: host}), // Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. withPort(port):: __tcpSocketMixin({port: port}), }, tcpSocketType:: hidden.core.v1.tcpSocketAction, // Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes withTimeoutSeconds(timeoutSeconds):: self + __readinessProbeMixin({timeoutSeconds: timeoutSeconds}), }, readinessProbeType:: hidden.core.v1.probe, // Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources resources:: { local __resourcesMixin(resources) = {resources+: resources}, mixinInstance(resources):: __resourcesMixin(resources), // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ withLimits(limits):: self + __resourcesMixin({limits: limits}), // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ withLimitsMixin(limits):: self + __resourcesMixin({limits+: limits}), // Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ withRequests(requests):: self + __resourcesMixin({requests: requests}), // Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ withRequestsMixin(requests):: self + __resourcesMixin({requests+: requests}), }, resourcesType:: hidden.core.v1.resourceRequirements, // Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md securityContext:: { local __securityContextMixin(securityContext) = {securityContext+: securityContext}, mixinInstance(securityContext):: __securityContextMixin(securityContext), // AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN withAllowPrivilegeEscalation(allowPrivilegeEscalation):: self + __securityContextMixin({allowPrivilegeEscalation: allowPrivilegeEscalation}), // The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. capabilities:: { local __capabilitiesMixin(capabilities) = __securityContextMixin({capabilities+: capabilities}), mixinInstance(capabilities):: __capabilitiesMixin(capabilities), // Added capabilities withAdd(add):: self + if std.type(add) == "array" then __capabilitiesMixin({add: add}) else __capabilitiesMixin({add: [add]}), // Added capabilities withAddMixin(add):: self + if std.type(add) == "array" then __capabilitiesMixin({add+: add}) else __capabilitiesMixin({add+: [add]}), // Removed capabilities withDrop(drop):: self + if std.type(drop) == "array" then __capabilitiesMixin({drop: drop}) else __capabilitiesMixin({drop: [drop]}), // Removed capabilities withDropMixin(drop):: self + if std.type(drop) == "array" then __capabilitiesMixin({drop+: drop}) else __capabilitiesMixin({drop+: [drop]}), }, capabilitiesType:: hidden.core.v1.capabilities, // Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. withPrivileged(privileged):: self + __securityContextMixin({privileged: privileged}), // Whether this container has a read-only root filesystem. Default is false. withReadOnlyRootFilesystem(readOnlyRootFilesystem):: self + __securityContextMixin({readOnlyRootFilesystem: readOnlyRootFilesystem}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, }, securityContextType:: hidden.core.v1.securityContext, }, }, // Describe a container image containerImage:: { new():: {}, // Names by which this image is known. e.g. ["gcr.io/google_containers/hyperkube:v1.0.7", "dockerhub.io/google_containers/hyperkube:v1.0.7"] withNames(names):: self + if std.type(names) == "array" then {names: names} else {names: [names]}, // Names by which this image is known. e.g. ["gcr.io/google_containers/hyperkube:v1.0.7", "dockerhub.io/google_containers/hyperkube:v1.0.7"] withNamesMixin(names):: self + if std.type(names) == "array" then {names+: names} else {names+: [names]}, // The size of the image in bytes. withSizeBytes(sizeBytes):: self + {sizeBytes: sizeBytes}, mixin:: { }, }, // ContainerPort represents a network port in a single container. containerPort:: { new(containerPort):: {} + self.withContainerPort(containerPort), newNamed(name, containerPort):: {} + self.withName(name) + self.withContainerPort(containerPort), // Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. withContainerPort(containerPort):: self + {containerPort: containerPort}, // What host IP to bind the external port to. withHostIp(hostIp):: self + {hostIP: hostIp}, // Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. withHostPort(hostPort):: self + {hostPort: hostPort}, // If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services. withName(name):: self + {name: name}, // Protocol for port. Must be UDP or TCP. Defaults to "TCP". withProtocol(protocol):: self + {protocol: protocol}, mixin:: { }, }, // ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting. containerState:: { new():: {}, mixin:: { // Details about a running container running:: { local __runningMixin(running) = {running+: running}, mixinInstance(running):: __runningMixin(running), // Time at which the container was last (re-)started startedAt:: { local __startedAtMixin(startedAt) = __runningMixin({startedAt+: startedAt}), mixinInstance(startedAt):: __startedAtMixin(startedAt), }, startedAtType:: hidden.meta.v1.time, }, runningType:: hidden.core.v1.containerStateRunning, // Details about a terminated container terminated:: { local __terminatedMixin(terminated) = {terminated+: terminated}, mixinInstance(terminated):: __terminatedMixin(terminated), // Container's ID in the format 'docker://' withContainerId(containerId):: self + __terminatedMixin({containerID: containerId}), // Exit status from the last termination of the container withExitCode(exitCode):: self + __terminatedMixin({exitCode: exitCode}), // Time at which the container last terminated finishedAt:: { local __finishedAtMixin(finishedAt) = __terminatedMixin({finishedAt+: finishedAt}), mixinInstance(finishedAt):: __finishedAtMixin(finishedAt), }, finishedAtType:: hidden.meta.v1.time, // Message regarding the last termination of the container withMessage(message):: self + __terminatedMixin({message: message}), // (brief) reason from the last termination of the container withReason(reason):: self + __terminatedMixin({reason: reason}), // Signal from the last termination of the container withSignal(signal):: self + __terminatedMixin({signal: signal}), // Time at which previous execution of the container started startedAt:: { local __startedAtMixin(startedAt) = __terminatedMixin({startedAt+: startedAt}), mixinInstance(startedAt):: __startedAtMixin(startedAt), }, startedAtType:: hidden.meta.v1.time, }, terminatedType:: hidden.core.v1.containerStateTerminated, // Details about a waiting container waiting:: { local __waitingMixin(waiting) = {waiting+: waiting}, mixinInstance(waiting):: __waitingMixin(waiting), // Message regarding why the container is not yet running. withMessage(message):: self + __waitingMixin({message: message}), // (brief) reason the container is not yet running. withReason(reason):: self + __waitingMixin({reason: reason}), }, waitingType:: hidden.core.v1.containerStateWaiting, }, }, // ContainerStateRunning is a running state of a container. containerStateRunning:: { new():: {}, mixin:: { // Time at which the container was last (re-)started startedAt:: { local __startedAtMixin(startedAt) = {startedAt+: startedAt}, mixinInstance(startedAt):: __startedAtMixin(startedAt), }, startedAtType:: hidden.meta.v1.time, }, }, // ContainerStateTerminated is a terminated state of a container. containerStateTerminated:: { new():: {}, // Container's ID in the format 'docker://' withContainerId(containerId):: self + {containerID: containerId}, // Exit status from the last termination of the container withExitCode(exitCode):: self + {exitCode: exitCode}, // Message regarding the last termination of the container withMessage(message):: self + {message: message}, // (brief) reason from the last termination of the container withReason(reason):: self + {reason: reason}, // Signal from the last termination of the container withSignal(signal):: self + {signal: signal}, mixin:: { // Time at which the container last terminated finishedAt:: { local __finishedAtMixin(finishedAt) = {finishedAt+: finishedAt}, mixinInstance(finishedAt):: __finishedAtMixin(finishedAt), }, finishedAtType:: hidden.meta.v1.time, // Time at which previous execution of the container started startedAt:: { local __startedAtMixin(startedAt) = {startedAt+: startedAt}, mixinInstance(startedAt):: __startedAtMixin(startedAt), }, startedAtType:: hidden.meta.v1.time, }, }, // ContainerStateWaiting is a waiting state of a container. containerStateWaiting:: { new():: {}, // Message regarding why the container is not yet running. withMessage(message):: self + {message: message}, // (brief) reason the container is not yet running. withReason(reason):: self + {reason: reason}, mixin:: { }, }, // ContainerStatus contains details for the current status of this container. containerStatus:: { new():: {}, // Container's ID in the format 'docker://'. withContainerId(containerId):: self + {containerID: containerId}, // The image the container is running. More info: https://kubernetes.io/docs/concepts/containers/images withImage(image):: self + {image: image}, // ImageID of the container's image. withImageId(imageId):: self + {imageID: imageId}, // This must be a DNS_LABEL. Each container in a pod must have a unique name. Cannot be updated. withName(name):: self + {name: name}, // Specifies whether the container has passed its readiness probe. withReady(ready):: self + {ready: ready}, // The number of times the container has been restarted, currently based on the number of dead containers that have not yet been removed. Note that this is calculated from dead containers. But those containers are subject to garbage collection. This value will get capped at 5 by GC. withRestartCount(restartCount):: self + {restartCount: restartCount}, mixin:: { // Details about the container's last termination condition. lastState:: { local __lastStateMixin(lastState) = {lastState+: lastState}, mixinInstance(lastState):: __lastStateMixin(lastState), // Details about a running container running:: { local __runningMixin(running) = __lastStateMixin({running+: running}), mixinInstance(running):: __runningMixin(running), // Time at which the container was last (re-)started startedAt:: { local __startedAtMixin(startedAt) = __runningMixin({startedAt+: startedAt}), mixinInstance(startedAt):: __startedAtMixin(startedAt), }, startedAtType:: hidden.meta.v1.time, }, runningType:: hidden.core.v1.containerStateRunning, // Details about a terminated container terminated:: { local __terminatedMixin(terminated) = __lastStateMixin({terminated+: terminated}), mixinInstance(terminated):: __terminatedMixin(terminated), // Container's ID in the format 'docker://' withContainerId(containerId):: self + __terminatedMixin({containerID: containerId}), // Exit status from the last termination of the container withExitCode(exitCode):: self + __terminatedMixin({exitCode: exitCode}), // Time at which the container last terminated finishedAt:: { local __finishedAtMixin(finishedAt) = __terminatedMixin({finishedAt+: finishedAt}), mixinInstance(finishedAt):: __finishedAtMixin(finishedAt), }, finishedAtType:: hidden.meta.v1.time, // Message regarding the last termination of the container withMessage(message):: self + __terminatedMixin({message: message}), // (brief) reason from the last termination of the container withReason(reason):: self + __terminatedMixin({reason: reason}), // Signal from the last termination of the container withSignal(signal):: self + __terminatedMixin({signal: signal}), // Time at which previous execution of the container started startedAt:: { local __startedAtMixin(startedAt) = __terminatedMixin({startedAt+: startedAt}), mixinInstance(startedAt):: __startedAtMixin(startedAt), }, startedAtType:: hidden.meta.v1.time, }, terminatedType:: hidden.core.v1.containerStateTerminated, // Details about a waiting container waiting:: { local __waitingMixin(waiting) = __lastStateMixin({waiting+: waiting}), mixinInstance(waiting):: __waitingMixin(waiting), // Message regarding why the container is not yet running. withMessage(message):: self + __waitingMixin({message: message}), // (brief) reason the container is not yet running. withReason(reason):: self + __waitingMixin({reason: reason}), }, waitingType:: hidden.core.v1.containerStateWaiting, }, lastStateType:: hidden.core.v1.containerState, // Details about the container's current condition. state:: { local __stateMixin(state) = {state+: state}, mixinInstance(state):: __stateMixin(state), // Details about a running container running:: { local __runningMixin(running) = __stateMixin({running+: running}), mixinInstance(running):: __runningMixin(running), // Time at which the container was last (re-)started startedAt:: { local __startedAtMixin(startedAt) = __runningMixin({startedAt+: startedAt}), mixinInstance(startedAt):: __startedAtMixin(startedAt), }, startedAtType:: hidden.meta.v1.time, }, runningType:: hidden.core.v1.containerStateRunning, // Details about a terminated container terminated:: { local __terminatedMixin(terminated) = __stateMixin({terminated+: terminated}), mixinInstance(terminated):: __terminatedMixin(terminated), // Container's ID in the format 'docker://' withContainerId(containerId):: self + __terminatedMixin({containerID: containerId}), // Exit status from the last termination of the container withExitCode(exitCode):: self + __terminatedMixin({exitCode: exitCode}), // Time at which the container last terminated finishedAt:: { local __finishedAtMixin(finishedAt) = __terminatedMixin({finishedAt+: finishedAt}), mixinInstance(finishedAt):: __finishedAtMixin(finishedAt), }, finishedAtType:: hidden.meta.v1.time, // Message regarding the last termination of the container withMessage(message):: self + __terminatedMixin({message: message}), // (brief) reason from the last termination of the container withReason(reason):: self + __terminatedMixin({reason: reason}), // Signal from the last termination of the container withSignal(signal):: self + __terminatedMixin({signal: signal}), // Time at which previous execution of the container started startedAt:: { local __startedAtMixin(startedAt) = __terminatedMixin({startedAt+: startedAt}), mixinInstance(startedAt):: __startedAtMixin(startedAt), }, startedAtType:: hidden.meta.v1.time, }, terminatedType:: hidden.core.v1.containerStateTerminated, // Details about a waiting container waiting:: { local __waitingMixin(waiting) = __stateMixin({waiting+: waiting}), mixinInstance(waiting):: __waitingMixin(waiting), // Message regarding why the container is not yet running. withMessage(message):: self + __waitingMixin({message: message}), // (brief) reason the container is not yet running. withReason(reason):: self + __waitingMixin({reason: reason}), }, waitingType:: hidden.core.v1.containerStateWaiting, }, stateType:: hidden.core.v1.containerState, }, }, // DaemonEndpoint contains information about a single Daemon endpoint. daemonEndpoint:: { new():: {}, // Port number of the given endpoint. withPort(port):: self + {Port: port}, mixin:: { }, }, // Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode. downwardApiProjection:: { new():: {}, // Items is a list of DownwardAPIVolume file withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is a list of DownwardAPIVolume file withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.core.v1.downwardApiVolumeFile, mixin:: { }, }, // DownwardAPIVolumeFile represents information to create the file containing the pod field downwardApiVolumeFile:: { new():: {}, // Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. withMode(mode):: self + {mode: mode}, // Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..' withPath(path):: self + {path: path}, mixin:: { // Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. fieldRef:: { local __fieldRefMixin(fieldRef) = {fieldRef+: fieldRef}, mixinInstance(fieldRef):: __fieldRefMixin(fieldRef), // Path of the field to select in the specified API version. withFieldPath(fieldPath):: self + __fieldRefMixin({fieldPath: fieldPath}), }, fieldRefType:: hidden.core.v1.objectFieldSelector, // Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. resourceFieldRef:: { local __resourceFieldRefMixin(resourceFieldRef) = {resourceFieldRef+: resourceFieldRef}, mixinInstance(resourceFieldRef):: __resourceFieldRefMixin(resourceFieldRef), // Container name: required for volumes, optional for env vars withContainerName(containerName):: self + __resourceFieldRefMixin({containerName: containerName}), // Specifies the output format of the exposed resources, defaults to "1" divisor:: { local __divisorMixin(divisor) = __resourceFieldRefMixin({divisor+: divisor}), mixinInstance(divisor):: __divisorMixin(divisor), }, divisorType:: hidden.core.resource.quantity, // Required: resource to select withResource(resource):: self + __resourceFieldRefMixin({resource: resource}), }, resourceFieldRefType:: hidden.core.v1.resourceFieldSelector, }, }, // DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling. downwardApiVolumeSource:: { new():: {}, // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. withDefaultMode(defaultMode):: self + {defaultMode: defaultMode}, // Items is a list of downward API volume file withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // Items is a list of downward API volume file withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.core.v1.downwardApiVolumeFile, mixin:: { }, }, // Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling. emptyDirVolumeSource:: { new():: {}, // What type of storage medium should back this directory. The default is "" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir withMedium(medium):: self + {medium: medium}, mixin:: { // Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir sizeLimit:: { local __sizeLimitMixin(sizeLimit) = {sizeLimit+: sizeLimit}, mixinInstance(sizeLimit):: __sizeLimitMixin(sizeLimit), }, sizeLimitType:: hidden.core.resource.quantity, }, }, // EndpointAddress is a tuple that describes single IP address. endpointAddress:: { new():: {}, // The Hostname of this endpoint withHostname(hostname):: self + {hostname: hostname}, // The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted but not fully supported on all platforms. Also, certain kubernetes components, like kube-proxy, are not IPv6 ready. withIp(ip):: self + {ip: ip}, // Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node. withNodeName(nodeName):: self + {nodeName: nodeName}, mixin:: { // Reference to object providing the endpoint. targetRef:: { local __targetRefMixin(targetRef) = {targetRef+: targetRef}, mixinInstance(targetRef):: __targetRefMixin(targetRef), // If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. withFieldPath(fieldPath):: self + __targetRefMixin({fieldPath: fieldPath}), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __targetRefMixin({name: name}), // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ withNamespace(namespace):: self + __targetRefMixin({namespace: namespace}), // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency withResourceVersion(resourceVersion):: self + __targetRefMixin({resourceVersion: resourceVersion}), // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids withUid(uid):: self + __targetRefMixin({uid: uid}), }, targetRefType:: hidden.core.v1.objectReference, }, }, // EndpointPort is a tuple that describes a single port. endpointPort:: { new():: {}, // The name of this port (corresponds to ServicePort.Name). Must be a DNS_LABEL. Optional only if one port is defined. withName(name):: self + {name: name}, // The port number of the endpoint. withPort(port):: self + {port: port}, // The IP protocol for this port. Must be UDP or TCP. Default is TCP. withProtocol(protocol):: self + {protocol: protocol}, mixin:: { }, }, // EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given: // { // Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], // Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] // } // The resulting set of endpoints can be viewed as: // a: [ 10.10.1.1:8675, 10.10.2.2:8675 ], // b: [ 10.10.1.1:309, 10.10.2.2:309 ] endpointSubset:: { new():: {}, // IP addresses which offer the related ports that are marked as ready. These endpoints should be considered safe for load balancers and clients to utilize. withAddresses(addresses):: self + if std.type(addresses) == "array" then {addresses: addresses} else {addresses: [addresses]}, // IP addresses which offer the related ports that are marked as ready. These endpoints should be considered safe for load balancers and clients to utilize. withAddressesMixin(addresses):: self + if std.type(addresses) == "array" then {addresses+: addresses} else {addresses+: [addresses]}, addressesType:: hidden.core.v1.endpointAddress, // IP addresses which offer the related ports but are not currently marked as ready because they have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check. withNotReadyAddresses(notReadyAddresses):: self + if std.type(notReadyAddresses) == "array" then {notReadyAddresses: notReadyAddresses} else {notReadyAddresses: [notReadyAddresses]}, // IP addresses which offer the related ports but are not currently marked as ready because they have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check. withNotReadyAddressesMixin(notReadyAddresses):: self + if std.type(notReadyAddresses) == "array" then {notReadyAddresses+: notReadyAddresses} else {notReadyAddresses+: [notReadyAddresses]}, notReadyAddressesType:: hidden.core.v1.endpointAddress, // Port numbers available on the related IP addresses. withPorts(ports):: self + if std.type(ports) == "array" then {ports: ports} else {ports: [ports]}, // Port numbers available on the related IP addresses. withPortsMixin(ports):: self + if std.type(ports) == "array" then {ports+: ports} else {ports+: [ports]}, portsType:: hidden.core.v1.endpointPort, mixin:: { }, }, // EnvFromSource represents the source of a set of ConfigMaps envFromSource:: { new():: {}, // An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. withPrefix(prefix):: self + {prefix: prefix}, mixin:: { // The ConfigMap to select from configMapRef:: { local __configMapRefMixin(configMapRef) = {configMapRef+: configMapRef}, mixinInstance(configMapRef):: __configMapRefMixin(configMapRef), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __configMapRefMixin({name: name}), // Specify whether the ConfigMap must be defined withOptional(optional):: self + __configMapRefMixin({optional: optional}), }, configMapRefType:: hidden.core.v1.configMapEnvSource, // The Secret to select from secretRef:: { local __secretRefMixin(secretRef) = {secretRef+: secretRef}, mixinInstance(secretRef):: __secretRefMixin(secretRef), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __secretRefMixin({name: name}), // Specify whether the Secret must be defined withOptional(optional):: self + __secretRefMixin({optional: optional}), }, secretRefType:: hidden.core.v1.secretEnvSource, }, }, // EnvVar represents an environment variable present in a Container. envVar:: { new(name, value):: {} + self.withName(name) + self.withValue(value), fromSecretRef(name, secretRefName, secretRefKey):: {} + self.withName(name) + self.mixin.valueFrom.secretKeyRef.withName(secretRefName) + self.mixin.valueFrom.secretKeyRef.withKey(secretRefKey), fromFieldPath(name, fieldPath):: {} + self.withName(name) + self.mixin.valueFrom.fieldRef.withFieldPath(fieldPath), // Name of the environment variable. Must be a C_IDENTIFIER. withName(name):: self + {name: name}, // Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". withValue(value):: self + {value: value}, mixin:: { // Source for the environment variable's value. Cannot be used if value is not empty. valueFrom:: { local __valueFromMixin(valueFrom) = {valueFrom+: valueFrom}, mixinInstance(valueFrom):: __valueFromMixin(valueFrom), // Selects a key of a ConfigMap. configMapKeyRef:: { local __configMapKeyRefMixin(configMapKeyRef) = __valueFromMixin({configMapKeyRef+: configMapKeyRef}), mixinInstance(configMapKeyRef):: __configMapKeyRefMixin(configMapKeyRef), // The key to select. withKey(key):: self + __configMapKeyRefMixin({key: key}), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __configMapKeyRefMixin({name: name}), // Specify whether the ConfigMap or it's key must be defined withOptional(optional):: self + __configMapKeyRefMixin({optional: optional}), }, configMapKeyRefType:: hidden.core.v1.configMapKeySelector, // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP. fieldRef:: { local __fieldRefMixin(fieldRef) = __valueFromMixin({fieldRef+: fieldRef}), mixinInstance(fieldRef):: __fieldRefMixin(fieldRef), // Path of the field to select in the specified API version. withFieldPath(fieldPath):: self + __fieldRefMixin({fieldPath: fieldPath}), }, fieldRefType:: hidden.core.v1.objectFieldSelector, // Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. resourceFieldRef:: { local __resourceFieldRefMixin(resourceFieldRef) = __valueFromMixin({resourceFieldRef+: resourceFieldRef}), mixinInstance(resourceFieldRef):: __resourceFieldRefMixin(resourceFieldRef), // Container name: required for volumes, optional for env vars withContainerName(containerName):: self + __resourceFieldRefMixin({containerName: containerName}), // Specifies the output format of the exposed resources, defaults to "1" divisor:: { local __divisorMixin(divisor) = __resourceFieldRefMixin({divisor+: divisor}), mixinInstance(divisor):: __divisorMixin(divisor), }, divisorType:: hidden.core.resource.quantity, // Required: resource to select withResource(resource):: self + __resourceFieldRefMixin({resource: resource}), }, resourceFieldRefType:: hidden.core.v1.resourceFieldSelector, // Selects a key of a secret in the pod's namespace secretKeyRef:: { local __secretKeyRefMixin(secretKeyRef) = __valueFromMixin({secretKeyRef+: secretKeyRef}), mixinInstance(secretKeyRef):: __secretKeyRefMixin(secretKeyRef), // The key of the secret to select from. Must be a valid secret key. withKey(key):: self + __secretKeyRefMixin({key: key}), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __secretKeyRefMixin({name: name}), // Specify whether the Secret or it's key must be defined withOptional(optional):: self + __secretKeyRefMixin({optional: optional}), }, secretKeyRefType:: hidden.core.v1.secretKeySelector, }, valueFromType:: hidden.core.v1.envVarSource, }, }, // EnvVarSource represents a source for the value of an EnvVar. envVarSource:: { new():: {}, mixin:: { // Selects a key of a ConfigMap. configMapKeyRef:: { local __configMapKeyRefMixin(configMapKeyRef) = {configMapKeyRef+: configMapKeyRef}, mixinInstance(configMapKeyRef):: __configMapKeyRefMixin(configMapKeyRef), // The key to select. withKey(key):: self + __configMapKeyRefMixin({key: key}), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __configMapKeyRefMixin({name: name}), // Specify whether the ConfigMap or it's key must be defined withOptional(optional):: self + __configMapKeyRefMixin({optional: optional}), }, configMapKeyRefType:: hidden.core.v1.configMapKeySelector, // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP. fieldRef:: { local __fieldRefMixin(fieldRef) = {fieldRef+: fieldRef}, mixinInstance(fieldRef):: __fieldRefMixin(fieldRef), // Path of the field to select in the specified API version. withFieldPath(fieldPath):: self + __fieldRefMixin({fieldPath: fieldPath}), }, fieldRefType:: hidden.core.v1.objectFieldSelector, // Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. resourceFieldRef:: { local __resourceFieldRefMixin(resourceFieldRef) = {resourceFieldRef+: resourceFieldRef}, mixinInstance(resourceFieldRef):: __resourceFieldRefMixin(resourceFieldRef), // Container name: required for volumes, optional for env vars withContainerName(containerName):: self + __resourceFieldRefMixin({containerName: containerName}), // Specifies the output format of the exposed resources, defaults to "1" divisor:: { local __divisorMixin(divisor) = __resourceFieldRefMixin({divisor+: divisor}), mixinInstance(divisor):: __divisorMixin(divisor), }, divisorType:: hidden.core.resource.quantity, // Required: resource to select withResource(resource):: self + __resourceFieldRefMixin({resource: resource}), }, resourceFieldRefType:: hidden.core.v1.resourceFieldSelector, // Selects a key of a secret in the pod's namespace secretKeyRef:: { local __secretKeyRefMixin(secretKeyRef) = {secretKeyRef+: secretKeyRef}, mixinInstance(secretKeyRef):: __secretKeyRefMixin(secretKeyRef), // The key of the secret to select from. Must be a valid secret key. withKey(key):: self + __secretKeyRefMixin({key: key}), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __secretKeyRefMixin({name: name}), // Specify whether the Secret or it's key must be defined withOptional(optional):: self + __secretKeyRefMixin({optional: optional}), }, secretKeyRefType:: hidden.core.v1.secretKeySelector, }, }, // EventSource contains information for an event. eventSource:: { new():: {}, // Component from which the event is generated. withComponent(component):: self + {component: component}, // Node name on which the event is generated. withHost(host):: self + {host: host}, mixin:: { }, }, // ExecAction describes a "run in container" action. execAction:: { new():: {}, // Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. withCommand(command):: self + if std.type(command) == "array" then {command: command} else {command: [command]}, // Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. withCommandMixin(command):: self + if std.type(command) == "array" then {command+: command} else {command+: [command]}, mixin:: { }, }, // Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling. fcVolumeSource:: { new():: {}, // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + {fsType: fsType}, // Optional: FC target lun number withLun(lun):: self + {lun: lun}, // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + {readOnly: readOnly}, // Optional: FC target worldwide names (WWNs) withTargetWwns(targetWwns):: self + if std.type(targetWwns) == "array" then {targetWWNs: targetWwns} else {targetWWNs: [targetWwns]}, // Optional: FC target worldwide names (WWNs) withTargetWwnsMixin(targetWwns):: self + if std.type(targetWwns) == "array" then {targetWWNs+: targetWwns} else {targetWWNs+: [targetWwns]}, // Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. withWwids(wwids):: self + if std.type(wwids) == "array" then {wwids: wwids} else {wwids: [wwids]}, // Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. withWwidsMixin(wwids):: self + if std.type(wwids) == "array" then {wwids+: wwids} else {wwids+: [wwids]}, mixin:: { }, }, // FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. flexVolumeSource:: { new():: {}, // Driver is the name of the driver to use for this volume. withDriver(driver):: self + {driver: driver}, // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. withFsType(fsType):: self + {fsType: fsType}, // Optional: Extra command options if any. withOptions(options):: self + {options: options}, // Optional: Extra command options if any. withOptionsMixin(options):: self + {options+: options}, // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + {readOnly: readOnly}, mixin:: { // Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts. secretRef:: { local __secretRefMixin(secretRef) = {secretRef+: secretRef}, mixinInstance(secretRef):: __secretRefMixin(secretRef), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __secretRefMixin({name: name}), }, secretRefType:: hidden.core.v1.localObjectReference, }, }, // Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling. flockerVolumeSource:: { new():: {}, // Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated withDatasetName(datasetName):: self + {datasetName: datasetName}, // UUID of the dataset. This is unique identifier of a Flocker dataset withDatasetUuid(datasetUuid):: self + {datasetUUID: datasetUuid}, mixin:: { }, }, // Represents a Persistent Disk resource in Google Compute Engine. // // A GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling. gcePersistentDiskVolumeSource:: { new():: {}, // Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk withFsType(fsType):: self + {fsType: fsType}, // The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk withPartition(partition):: self + {partition: partition}, // Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk withPdName(pdName):: self + {pdName: pdName}, // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk withReadOnly(readOnly):: self + {readOnly: readOnly}, mixin:: { }, }, // Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling. gitRepoVolumeSource:: { new():: {}, // Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. withDirectory(directory):: self + {directory: directory}, // Repository URL withRepository(repository):: self + {repository: repository}, // Commit hash for the specified revision. withRevision(revision):: self + {revision: revision}, mixin:: { }, }, // Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling. glusterfsVolumeSource:: { new():: {}, // EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod withEndpoints(endpoints):: self + {endpoints: endpoints}, // Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod withPath(path):: self + {path: path}, // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod withReadOnly(readOnly):: self + {readOnly: readOnly}, mixin:: { }, }, // HTTPGetAction describes an action based on HTTP Get requests. httpGetAction:: { new():: {}, // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. withHost(host):: self + {host: host}, // Custom headers to set in the request. HTTP allows repeated headers. withHttpHeaders(httpHeaders):: self + if std.type(httpHeaders) == "array" then {httpHeaders: httpHeaders} else {httpHeaders: [httpHeaders]}, // Custom headers to set in the request. HTTP allows repeated headers. withHttpHeadersMixin(httpHeaders):: self + if std.type(httpHeaders) == "array" then {httpHeaders+: httpHeaders} else {httpHeaders+: [httpHeaders]}, httpHeadersType:: hidden.core.v1.httpHeader, // Path to access on the HTTP server. withPath(path):: self + {path: path}, // Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. withPort(port):: {port: port}, // Scheme to use for connecting to the host. Defaults to HTTP. withScheme(scheme):: self + {scheme: scheme}, mixin:: { }, }, // HTTPHeader describes a custom header to be used in HTTP probes httpHeader:: { new():: {}, // The header field name withName(name):: self + {name: name}, // The header field value withValue(value):: self + {value: value}, mixin:: { }, }, // Handler defines a specific action that should be taken handler:: { new():: {}, mixin:: { // One and only one of the following should be specified. Exec specifies the action to take. exec:: { local __execMixin(exec) = {exec+: exec}, mixinInstance(exec):: __execMixin(exec), // Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. withCommand(command):: self + if std.type(command) == "array" then __execMixin({command: command}) else __execMixin({command: [command]}), // Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. withCommandMixin(command):: self + if std.type(command) == "array" then __execMixin({command+: command}) else __execMixin({command+: [command]}), }, execType:: hidden.core.v1.execAction, // HTTPGet specifies the http request to perform. httpGet:: { local __httpGetMixin(httpGet) = {httpGet+: httpGet}, mixinInstance(httpGet):: __httpGetMixin(httpGet), // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. withHost(host):: self + __httpGetMixin({host: host}), // Custom headers to set in the request. HTTP allows repeated headers. withHttpHeaders(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders: httpHeaders}) else __httpGetMixin({httpHeaders: [httpHeaders]}), // Custom headers to set in the request. HTTP allows repeated headers. withHttpHeadersMixin(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders+: httpHeaders}) else __httpGetMixin({httpHeaders+: [httpHeaders]}), httpHeadersType:: hidden.core.v1.httpHeader, // Path to access on the HTTP server. withPath(path):: self + __httpGetMixin({path: path}), // Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. withPort(port):: __httpGetMixin({port: port}), // Scheme to use for connecting to the host. Defaults to HTTP. withScheme(scheme):: self + __httpGetMixin({scheme: scheme}), }, httpGetType:: hidden.core.v1.httpGetAction, // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported tcpSocket:: { local __tcpSocketMixin(tcpSocket) = {tcpSocket+: tcpSocket}, mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), // Optional: Host name to connect to, defaults to the pod IP. withHost(host):: self + __tcpSocketMixin({host: host}), // Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. withPort(port):: __tcpSocketMixin({port: port}), }, tcpSocketType:: hidden.core.v1.tcpSocketAction, }, }, // HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. hostAlias:: { new():: {}, // Hostnames for the above IP address. withHostnames(hostnames):: self + if std.type(hostnames) == "array" then {hostnames: hostnames} else {hostnames: [hostnames]}, // Hostnames for the above IP address. withHostnamesMixin(hostnames):: self + if std.type(hostnames) == "array" then {hostnames+: hostnames} else {hostnames+: [hostnames]}, // IP address of the host file entry. withIp(ip):: self + {ip: ip}, mixin:: { }, }, // Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling. hostPathVolumeSource:: { new():: {}, // Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath withPath(path):: self + {path: path}, // Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath withType(type):: self + {type: type}, mixin:: { }, }, // Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling. iscsiVolumeSource:: { new():: {}, // whether support iSCSI Discovery CHAP authentication withChapAuthDiscovery(chapAuthDiscovery):: self + {chapAuthDiscovery: chapAuthDiscovery}, // whether support iSCSI Session CHAP authentication withChapAuthSession(chapAuthSession):: self + {chapAuthSession: chapAuthSession}, // Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi withFsType(fsType):: self + {fsType: fsType}, // Custom iSCSI initiator name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. withInitiatorName(initiatorName):: self + {initiatorName: initiatorName}, // Target iSCSI Qualified Name. withIqn(iqn):: self + {iqn: iqn}, // Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport. withIscsiInterface(iscsiInterface):: self + {iscsiInterface: iscsiInterface}, // iSCSI target lun number. withLun(lun):: self + {lun: lun}, // iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). withPortals(portals):: self + if std.type(portals) == "array" then {portals: portals} else {portals: [portals]}, // iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). withPortalsMixin(portals):: self + if std.type(portals) == "array" then {portals+: portals} else {portals+: [portals]}, // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. withReadOnly(readOnly):: self + {readOnly: readOnly}, // iSCSI target portal. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). withTargetPortal(targetPortal):: self + {targetPortal: targetPortal}, mixin:: { // CHAP secret for iSCSI target and initiator authentication secretRef:: { local __secretRefMixin(secretRef) = {secretRef+: secretRef}, mixinInstance(secretRef):: __secretRefMixin(secretRef), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __secretRefMixin({name: name}), }, secretRefType:: hidden.core.v1.localObjectReference, }, }, // Maps a string key to a path within a volume. keyToPath:: { new(key, path):: {} + self.withKey(key) + self.withPath(path), // The key to project. withKey(key):: self + {key: key}, // Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. withMode(mode):: self + {mode: mode}, // The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. withPath(path):: self + {path: path}, mixin:: { }, }, // Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted. lifecycle:: { new():: {}, mixin:: { // PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks postStart:: { local __postStartMixin(postStart) = {postStart+: postStart}, mixinInstance(postStart):: __postStartMixin(postStart), // One and only one of the following should be specified. Exec specifies the action to take. exec:: { local __execMixin(exec) = __postStartMixin({exec+: exec}), mixinInstance(exec):: __execMixin(exec), // Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. withCommand(command):: self + if std.type(command) == "array" then __execMixin({command: command}) else __execMixin({command: [command]}), // Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. withCommandMixin(command):: self + if std.type(command) == "array" then __execMixin({command+: command}) else __execMixin({command+: [command]}), }, execType:: hidden.core.v1.execAction, // HTTPGet specifies the http request to perform. httpGet:: { local __httpGetMixin(httpGet) = __postStartMixin({httpGet+: httpGet}), mixinInstance(httpGet):: __httpGetMixin(httpGet), // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. withHost(host):: self + __httpGetMixin({host: host}), // Custom headers to set in the request. HTTP allows repeated headers. withHttpHeaders(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders: httpHeaders}) else __httpGetMixin({httpHeaders: [httpHeaders]}), // Custom headers to set in the request. HTTP allows repeated headers. withHttpHeadersMixin(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders+: httpHeaders}) else __httpGetMixin({httpHeaders+: [httpHeaders]}), httpHeadersType:: hidden.core.v1.httpHeader, // Path to access on the HTTP server. withPath(path):: self + __httpGetMixin({path: path}), // Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. withPort(port):: __httpGetMixin({port: port}), // Scheme to use for connecting to the host. Defaults to HTTP. withScheme(scheme):: self + __httpGetMixin({scheme: scheme}), }, httpGetType:: hidden.core.v1.httpGetAction, // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported tcpSocket:: { local __tcpSocketMixin(tcpSocket) = __postStartMixin({tcpSocket+: tcpSocket}), mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), // Optional: Host name to connect to, defaults to the pod IP. withHost(host):: self + __tcpSocketMixin({host: host}), // Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. withPort(port):: __tcpSocketMixin({port: port}), }, tcpSocketType:: hidden.core.v1.tcpSocketAction, }, postStartType:: hidden.core.v1.handler, // PreStop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks preStop:: { local __preStopMixin(preStop) = {preStop+: preStop}, mixinInstance(preStop):: __preStopMixin(preStop), // One and only one of the following should be specified. Exec specifies the action to take. exec:: { local __execMixin(exec) = __preStopMixin({exec+: exec}), mixinInstance(exec):: __execMixin(exec), // Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. withCommand(command):: self + if std.type(command) == "array" then __execMixin({command: command}) else __execMixin({command: [command]}), // Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. withCommandMixin(command):: self + if std.type(command) == "array" then __execMixin({command+: command}) else __execMixin({command+: [command]}), }, execType:: hidden.core.v1.execAction, // HTTPGet specifies the http request to perform. httpGet:: { local __httpGetMixin(httpGet) = __preStopMixin({httpGet+: httpGet}), mixinInstance(httpGet):: __httpGetMixin(httpGet), // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. withHost(host):: self + __httpGetMixin({host: host}), // Custom headers to set in the request. HTTP allows repeated headers. withHttpHeaders(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders: httpHeaders}) else __httpGetMixin({httpHeaders: [httpHeaders]}), // Custom headers to set in the request. HTTP allows repeated headers. withHttpHeadersMixin(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders+: httpHeaders}) else __httpGetMixin({httpHeaders+: [httpHeaders]}), httpHeadersType:: hidden.core.v1.httpHeader, // Path to access on the HTTP server. withPath(path):: self + __httpGetMixin({path: path}), // Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. withPort(port):: __httpGetMixin({port: port}), // Scheme to use for connecting to the host. Defaults to HTTP. withScheme(scheme):: self + __httpGetMixin({scheme: scheme}), }, httpGetType:: hidden.core.v1.httpGetAction, // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported tcpSocket:: { local __tcpSocketMixin(tcpSocket) = __preStopMixin({tcpSocket+: tcpSocket}), mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), // Optional: Host name to connect to, defaults to the pod IP. withHost(host):: self + __tcpSocketMixin({host: host}), // Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. withPort(port):: __tcpSocketMixin({port: port}), }, tcpSocketType:: hidden.core.v1.tcpSocketAction, }, preStopType:: hidden.core.v1.handler, }, }, // LimitRangeItem defines a min/max usage limit for any resource that matches on kind. limitRangeItem:: { new():: {}, // Default resource requirement limit value by resource name if resource limit is omitted. withDefault(default):: self + {default: default}, // Default resource requirement limit value by resource name if resource limit is omitted. withDefaultMixin(default):: self + {default+: default}, // DefaultRequest is the default resource requirement request value by resource name if resource request is omitted. withDefaultRequest(defaultRequest):: self + {defaultRequest: defaultRequest}, // DefaultRequest is the default resource requirement request value by resource name if resource request is omitted. withDefaultRequestMixin(defaultRequest):: self + {defaultRequest+: defaultRequest}, // Max usage constraints on this kind by resource name. withMax(max):: self + {max: max}, // Max usage constraints on this kind by resource name. withMaxMixin(max):: self + {max+: max}, // MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource. withMaxLimitRequestRatio(maxLimitRequestRatio):: self + {maxLimitRequestRatio: maxLimitRequestRatio}, // MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource. withMaxLimitRequestRatioMixin(maxLimitRequestRatio):: self + {maxLimitRequestRatio+: maxLimitRequestRatio}, // Min usage constraints on this kind by resource name. withMin(min):: self + {min: min}, // Min usage constraints on this kind by resource name. withMinMixin(min):: self + {min+: min}, // Type of resource that this limit applies to. withType(type):: self + {type: type}, mixin:: { }, }, // LimitRangeSpec defines a min/max usage limit for resources that match on kind. limitRangeSpec:: { new():: {}, // Limits is the list of LimitRangeItem objects that are enforced. withLimits(limits):: self + if std.type(limits) == "array" then {limits: limits} else {limits: [limits]}, // Limits is the list of LimitRangeItem objects that are enforced. withLimitsMixin(limits):: self + if std.type(limits) == "array" then {limits+: limits} else {limits+: [limits]}, limitsType:: hidden.core.v1.limitRangeItem, mixin:: { }, }, // LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point. loadBalancerIngress:: { new():: {}, // Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers) withHostname(hostname):: self + {hostname: hostname}, // IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers) withIp(ip):: self + {ip: ip}, mixin:: { }, }, // LoadBalancerStatus represents the status of a load-balancer. loadBalancerStatus:: { new():: {}, // Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. withIngress(ingress):: self + if std.type(ingress) == "array" then {ingress: ingress} else {ingress: [ingress]}, // Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. withIngressMixin(ingress):: self + if std.type(ingress) == "array" then {ingress+: ingress} else {ingress+: [ingress]}, ingressType:: hidden.core.v1.loadBalancerIngress, mixin:: { }, }, // LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. localObjectReference:: { new():: {}, // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + {name: name}, mixin:: { }, }, // Local represents directly-attached storage with node affinity localVolumeSource:: { new():: {}, // The full path to the volume on the node For alpha, this path must be a directory Once block as a source is supported, then this path can point to a block device withPath(path):: self + {path: path}, mixin:: { }, }, // Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling. nfsVolumeSource:: { new():: {}, // Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs withPath(path):: self + {path: path}, // ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs withReadOnly(readOnly):: self + {readOnly: readOnly}, // Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs withServer(server):: self + {server: server}, mixin:: { }, }, // NamespaceSpec describes the attributes on a Namespace. namespaceSpec:: { new():: {}, // Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#finalizers withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then {finalizers: finalizers} else {finalizers: [finalizers]}, // Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#finalizers withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then {finalizers+: finalizers} else {finalizers+: [finalizers]}, mixin:: { }, }, // NamespaceStatus is information about the current status of a Namespace. namespaceStatus:: { new():: {}, // Phase is the current lifecycle phase of the namespace. More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#phases withPhase(phase):: self + {phase: phase}, mixin:: { }, }, // NodeAddress contains information for the node's address. nodeAddress:: { new():: {}, // The node address. withAddress(address):: self + {address: address}, // Node address type, one of Hostname, ExternalIP or InternalIP. withType(type):: self + {type: type}, mixin:: { }, }, // Node affinity is a group of node affinity scheduling rules. nodeAffinity:: { new():: {}, // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then {preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution} else {preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}, // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then {preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution} else {preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}, preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, mixin:: { // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = {requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}, mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, }, // NodeCondition contains condition information for a node. nodeCondition:: { new():: {}, // Human readable message indicating details about last transition. withMessage(message):: self + {message: message}, // (brief) reason for the condition's last transition. withReason(reason):: self + {reason: reason}, // Type of node condition. withType(type):: self + {type: type}, mixin:: { // Last time we got an update on a given condition. lastHeartbeatTime:: { local __lastHeartbeatTimeMixin(lastHeartbeatTime) = {lastHeartbeatTime+: lastHeartbeatTime}, mixinInstance(lastHeartbeatTime):: __lastHeartbeatTimeMixin(lastHeartbeatTime), }, lastHeartbeatTimeType:: hidden.meta.v1.time, // Last time the condition transit from one status to another. lastTransitionTime:: { local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), }, lastTransitionTimeType:: hidden.meta.v1.time, }, }, // NodeDaemonEndpoints lists ports opened by daemons running on the Node. nodeDaemonEndpoints:: { new():: {}, mixin:: { // Endpoint on which Kubelet is listening. kubeletEndpoint:: { local __kubeletEndpointMixin(kubeletEndpoint) = {kubeletEndpoint+: kubeletEndpoint}, mixinInstance(kubeletEndpoint):: __kubeletEndpointMixin(kubeletEndpoint), // Port number of the given endpoint. withPort(port):: self + __kubeletEndpointMixin({Port: port}), }, kubeletEndpointType:: hidden.core.v1.daemonEndpoint, }, }, // A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms. nodeSelector:: { new():: {}, // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then {nodeSelectorTerms: nodeSelectorTerms} else {nodeSelectorTerms: [nodeSelectorTerms]}, // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then {nodeSelectorTerms+: nodeSelectorTerms} else {nodeSelectorTerms+: [nodeSelectorTerms]}, nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, mixin:: { }, }, // A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. nodeSelectorRequirement:: { new():: {}, // The label key that the selector applies to. withKey(key):: self + {key: key}, // Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. withOperator(operator):: self + {operator: operator}, // 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. withValues(values):: self + if std.type(values) == "array" then {values: values} else {values: [values]}, // 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. withValuesMixin(values):: self + if std.type(values) == "array" then {values+: values} else {values+: [values]}, mixin:: { }, }, // A null or empty node selector term matches no objects. nodeSelectorTerm:: { new():: {}, // Required. A list of node selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then {matchExpressions: matchExpressions} else {matchExpressions: [matchExpressions]}, // Required. A list of node selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then {matchExpressions+: matchExpressions} else {matchExpressions+: [matchExpressions]}, matchExpressionsType:: hidden.core.v1.nodeSelectorRequirement, mixin:: { }, }, // NodeSpec describes the attributes that a node is created with. nodeSpec:: { new():: {}, // External ID of the node assigned by some machine database (e.g. a cloud provider). Deprecated. withExternalId(externalId):: self + {externalID: externalId}, // PodCIDR represents the pod IP range assigned to the node. withPodCidr(podCidr):: self + {podCIDR: podCidr}, // ID of the node assigned by the cloud provider in the format: :// withProviderId(providerId):: self + {providerID: providerId}, // If specified, the node's taints. withTaints(taints):: self + if std.type(taints) == "array" then {taints: taints} else {taints: [taints]}, // If specified, the node's taints. withTaintsMixin(taints):: self + if std.type(taints) == "array" then {taints+: taints} else {taints+: [taints]}, taintsType:: hidden.core.v1.taint, // Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration withUnschedulable(unschedulable):: self + {unschedulable: unschedulable}, mixin:: { // If specified, the source to get node configuration from The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field configSource:: { local __configSourceMixin(configSource) = {configSource+: configSource}, mixinInstance(configSource):: __configSourceMixin(configSource), // configMapRef:: { local __configMapRefMixin(configMapRef) = __configSourceMixin({configMapRef+: configMapRef}), mixinInstance(configMapRef):: __configMapRefMixin(configMapRef), // If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. withFieldPath(fieldPath):: self + __configMapRefMixin({fieldPath: fieldPath}), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __configMapRefMixin({name: name}), // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ withNamespace(namespace):: self + __configMapRefMixin({namespace: namespace}), // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency withResourceVersion(resourceVersion):: self + __configMapRefMixin({resourceVersion: resourceVersion}), // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids withUid(uid):: self + __configMapRefMixin({uid: uid}), }, configMapRefType:: hidden.core.v1.objectReference, }, configSourceType:: hidden.core.v1.nodeConfigSource, }, }, // NodeStatus is information about the current status of a node. nodeStatus:: { new():: {}, // List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses withAddresses(addresses):: self + if std.type(addresses) == "array" then {addresses: addresses} else {addresses: [addresses]}, // List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses withAddressesMixin(addresses):: self + if std.type(addresses) == "array" then {addresses+: addresses} else {addresses+: [addresses]}, addressesType:: hidden.core.v1.nodeAddress, // Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity. withAllocatable(allocatable):: self + {allocatable: allocatable}, // Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity. withAllocatableMixin(allocatable):: self + {allocatable+: allocatable}, // Capacity represents the total resources of a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity withCapacity(capacity):: self + {capacity: capacity}, // Capacity represents the total resources of a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity withCapacityMixin(capacity):: self + {capacity+: capacity}, // Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/concepts/nodes/node/#condition withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, // Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/concepts/nodes/node/#condition withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, conditionsType:: hidden.core.v1.nodeCondition, // List of container images on this node withImages(images):: self + if std.type(images) == "array" then {images: images} else {images: [images]}, // List of container images on this node withImagesMixin(images):: self + if std.type(images) == "array" then {images+: images} else {images+: [images]}, imagesType:: hidden.core.v1.containerImage, // NodePhase is the recently observed lifecycle phase of the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#phase The field is never populated, and now is deprecated. withPhase(phase):: self + {phase: phase}, // List of volumes that are attached to the node. withVolumesAttached(volumesAttached):: self + if std.type(volumesAttached) == "array" then {volumesAttached: volumesAttached} else {volumesAttached: [volumesAttached]}, // List of volumes that are attached to the node. withVolumesAttachedMixin(volumesAttached):: self + if std.type(volumesAttached) == "array" then {volumesAttached+: volumesAttached} else {volumesAttached+: [volumesAttached]}, volumesAttachedType:: hidden.core.v1.attachedVolume, // List of attachable volumes in use (mounted) by the node. withVolumesInUse(volumesInUse):: self + if std.type(volumesInUse) == "array" then {volumesInUse: volumesInUse} else {volumesInUse: [volumesInUse]}, // List of attachable volumes in use (mounted) by the node. withVolumesInUseMixin(volumesInUse):: self + if std.type(volumesInUse) == "array" then {volumesInUse+: volumesInUse} else {volumesInUse+: [volumesInUse]}, mixin:: { // Endpoints of daemons running on the Node. daemonEndpoints:: { local __daemonEndpointsMixin(daemonEndpoints) = {daemonEndpoints+: daemonEndpoints}, mixinInstance(daemonEndpoints):: __daemonEndpointsMixin(daemonEndpoints), // Endpoint on which Kubelet is listening. kubeletEndpoint:: { local __kubeletEndpointMixin(kubeletEndpoint) = __daemonEndpointsMixin({kubeletEndpoint+: kubeletEndpoint}), mixinInstance(kubeletEndpoint):: __kubeletEndpointMixin(kubeletEndpoint), // Port number of the given endpoint. withPort(port):: self + __kubeletEndpointMixin({Port: port}), }, kubeletEndpointType:: hidden.core.v1.daemonEndpoint, }, daemonEndpointsType:: hidden.core.v1.nodeDaemonEndpoints, // Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#info nodeInfo:: { local __nodeInfoMixin(nodeInfo) = {nodeInfo+: nodeInfo}, mixinInstance(nodeInfo):: __nodeInfoMixin(nodeInfo), // The Architecture reported by the node withArchitecture(architecture):: self + __nodeInfoMixin({architecture: architecture}), // Boot ID reported by the node. withBootId(bootId):: self + __nodeInfoMixin({bootID: bootId}), // ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0). withContainerRuntimeVersion(containerRuntimeVersion):: self + __nodeInfoMixin({containerRuntimeVersion: containerRuntimeVersion}), // Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64). withKernelVersion(kernelVersion):: self + __nodeInfoMixin({kernelVersion: kernelVersion}), // KubeProxy Version reported by the node. withKubeProxyVersion(kubeProxyVersion):: self + __nodeInfoMixin({kubeProxyVersion: kubeProxyVersion}), // Kubelet Version reported by the node. withKubeletVersion(kubeletVersion):: self + __nodeInfoMixin({kubeletVersion: kubeletVersion}), // MachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html withMachineId(machineId):: self + __nodeInfoMixin({machineID: machineId}), // The Operating System reported by the node withOperatingSystem(operatingSystem):: self + __nodeInfoMixin({operatingSystem: operatingSystem}), // OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)). withOsImage(osImage):: self + __nodeInfoMixin({osImage: osImage}), // SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html withSystemUuid(systemUuid):: self + __nodeInfoMixin({systemUUID: systemUuid}), }, nodeInfoType:: hidden.core.v1.nodeSystemInfo, }, }, // NodeSystemInfo is a set of ids/uuids to uniquely identify the node. nodeSystemInfo:: { new():: {}, // The Architecture reported by the node withArchitecture(architecture):: self + {architecture: architecture}, // Boot ID reported by the node. withBootId(bootId):: self + {bootID: bootId}, // ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0). withContainerRuntimeVersion(containerRuntimeVersion):: self + {containerRuntimeVersion: containerRuntimeVersion}, // Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64). withKernelVersion(kernelVersion):: self + {kernelVersion: kernelVersion}, // KubeProxy Version reported by the node. withKubeProxyVersion(kubeProxyVersion):: self + {kubeProxyVersion: kubeProxyVersion}, // Kubelet Version reported by the node. withKubeletVersion(kubeletVersion):: self + {kubeletVersion: kubeletVersion}, // MachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html withMachineId(machineId):: self + {machineID: machineId}, // The Operating System reported by the node withOperatingSystem(operatingSystem):: self + {operatingSystem: operatingSystem}, // OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)). withOsImage(osImage):: self + {osImage: osImage}, // SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html withSystemUuid(systemUuid):: self + {systemUUID: systemUuid}, mixin:: { }, }, // ObjectFieldSelector selects an APIVersioned field of an object. objectFieldSelector:: { new():: {}, // Path of the field to select in the specified API version. withFieldPath(fieldPath):: self + {fieldPath: fieldPath}, mixin:: { }, }, // ObjectReference contains enough information to let you inspect or modify the referred object. objectReference:: { new():: {}, // If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. withFieldPath(fieldPath):: self + {fieldPath: fieldPath}, // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + {name: name}, // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ withNamespace(namespace):: self + {namespace: namespace}, // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency withResourceVersion(resourceVersion):: self + {resourceVersion: resourceVersion}, // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids withUid(uid):: self + {uid: uid}, mixin:: { }, }, // PersistentVolumeClaimCondition contails details about state of pvc persistentVolumeClaimCondition:: { new():: {}, // Human-readable message indicating details about last transition. withMessage(message):: self + {message: message}, // Unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports "ResizeStarted" that means the underlying persistent volume is being resized. withReason(reason):: self + {reason: reason}, // withType(type):: self + {type: type}, mixin:: { // Last time we probed the condition. lastProbeTime:: { local __lastProbeTimeMixin(lastProbeTime) = {lastProbeTime+: lastProbeTime}, mixinInstance(lastProbeTime):: __lastProbeTimeMixin(lastProbeTime), }, lastProbeTimeType:: hidden.meta.v1.time, // Last time the condition transitioned from one status to another. lastTransitionTime:: { local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), }, lastTransitionTimeType:: hidden.meta.v1.time, }, }, // PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes persistentVolumeClaimSpec:: { new():: {}, // AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 withAccessModes(accessModes):: self + if std.type(accessModes) == "array" then {accessModes: accessModes} else {accessModes: [accessModes]}, // AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 withAccessModesMixin(accessModes):: self + if std.type(accessModes) == "array" then {accessModes+: accessModes} else {accessModes+: [accessModes]}, // Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 withStorageClassName(storageClassName):: self + {storageClassName: storageClassName}, // VolumeName is the binding reference to the PersistentVolume backing this claim. withVolumeName(volumeName):: self + {volumeName: volumeName}, mixin:: { // Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources resources:: { local __resourcesMixin(resources) = {resources+: resources}, mixinInstance(resources):: __resourcesMixin(resources), // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ withLimits(limits):: self + __resourcesMixin({limits: limits}), // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ withLimitsMixin(limits):: self + __resourcesMixin({limits+: limits}), // Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ withRequests(requests):: self + __resourcesMixin({requests: requests}), // Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ withRequestsMixin(requests):: self + __resourcesMixin({requests+: requests}), }, resourcesType:: hidden.core.v1.resourceRequirements, // A label query over volumes to consider for binding. selector:: { local __selectorMixin(selector) = {selector+: selector}, mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, }, }, // PersistentVolumeClaimStatus is the current status of a persistent volume claim. persistentVolumeClaimStatus:: { new():: {}, // AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 withAccessModes(accessModes):: self + if std.type(accessModes) == "array" then {accessModes: accessModes} else {accessModes: [accessModes]}, // AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 withAccessModesMixin(accessModes):: self + if std.type(accessModes) == "array" then {accessModes+: accessModes} else {accessModes+: [accessModes]}, // Represents the actual resources of the underlying volume. withCapacity(capacity):: self + {capacity: capacity}, // Represents the actual resources of the underlying volume. withCapacityMixin(capacity):: self + {capacity+: capacity}, // Current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'. withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, // Current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'. withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, conditionsType:: hidden.core.v1.persistentVolumeClaimCondition, // Phase represents the current phase of PersistentVolumeClaim. withPhase(phase):: self + {phase: phase}, mixin:: { }, }, // PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system). persistentVolumeClaimVolumeSource:: { new():: {}, // ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims withClaimName(claimName):: self + {claimName: claimName}, // Will force the ReadOnly setting in VolumeMounts. Default false. withReadOnly(readOnly):: self + {readOnly: readOnly}, mixin:: { }, }, // PersistentVolumeSpec is the specification of a persistent volume. persistentVolumeSpec:: { new():: {}, // AccessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes withAccessModes(accessModes):: self + if std.type(accessModes) == "array" then {accessModes: accessModes} else {accessModes: [accessModes]}, // AccessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes withAccessModesMixin(accessModes):: self + if std.type(accessModes) == "array" then {accessModes+: accessModes} else {accessModes+: [accessModes]}, // A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity withCapacity(capacity):: self + {capacity: capacity}, // A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity withCapacityMixin(capacity):: self + {capacity+: capacity}, // A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options withMountOptions(mountOptions):: self + if std.type(mountOptions) == "array" then {mountOptions: mountOptions} else {mountOptions: [mountOptions]}, // A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options withMountOptionsMixin(mountOptions):: self + if std.type(mountOptions) == "array" then {mountOptions+: mountOptions} else {mountOptions+: [mountOptions]}, // What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming withPersistentVolumeReclaimPolicy(persistentVolumeReclaimPolicy):: self + {persistentVolumeReclaimPolicy: persistentVolumeReclaimPolicy}, // Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass. withStorageClassName(storageClassName):: self + {storageClassName: storageClassName}, mixin:: { // AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore awsElasticBlockStore:: { local __awsElasticBlockStoreMixin(awsElasticBlockStore) = {awsElasticBlockStore+: awsElasticBlockStore}, mixinInstance(awsElasticBlockStore):: __awsElasticBlockStoreMixin(awsElasticBlockStore), // Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore withFsType(fsType):: self + __awsElasticBlockStoreMixin({fsType: fsType}), // The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). withPartition(partition):: self + __awsElasticBlockStoreMixin({partition: partition}), // Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore withReadOnly(readOnly):: self + __awsElasticBlockStoreMixin({readOnly: readOnly}), // Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore withVolumeId(volumeId):: self + __awsElasticBlockStoreMixin({volumeID: volumeId}), }, awsElasticBlockStoreType:: hidden.core.v1.awsElasticBlockStoreVolumeSource, // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. azureDisk:: { local __azureDiskMixin(azureDisk) = {azureDisk+: azureDisk}, mixinInstance(azureDisk):: __azureDiskMixin(azureDisk), // Host Caching mode: None, Read Only, Read Write. withCachingMode(cachingMode):: self + __azureDiskMixin({cachingMode: cachingMode}), // The Name of the data disk in the blob storage withDiskName(diskName):: self + __azureDiskMixin({diskName: diskName}), // The URI the data disk in the blob storage withDiskUri(diskUri):: self + __azureDiskMixin({diskURI: diskUri}), // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + __azureDiskMixin({fsType: fsType}), // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + __azureDiskMixin({readOnly: readOnly}), }, azureDiskType:: hidden.core.v1.azureDiskVolumeSource, // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. azureFile:: { local __azureFileMixin(azureFile) = {azureFile+: azureFile}, mixinInstance(azureFile):: __azureFileMixin(azureFile), // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + __azureFileMixin({readOnly: readOnly}), // the name of secret that contains Azure Storage Account Name and Key withSecretName(secretName):: self + __azureFileMixin({secretName: secretName}), // the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod withSecretNamespace(secretNamespace):: self + __azureFileMixin({secretNamespace: secretNamespace}), // Share Name withShareName(shareName):: self + __azureFileMixin({shareName: shareName}), }, azureFileType:: hidden.core.v1.azureFilePersistentVolumeSource, // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime cephfs:: { local __cephfsMixin(cephfs) = {cephfs+: cephfs}, mixinInstance(cephfs):: __cephfsMixin(cephfs), // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it withMonitors(monitors):: self + if std.type(monitors) == "array" then __cephfsMixin({monitors: monitors}) else __cephfsMixin({monitors: [monitors]}), // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it withMonitorsMixin(monitors):: self + if std.type(monitors) == "array" then __cephfsMixin({monitors+: monitors}) else __cephfsMixin({monitors+: [monitors]}), // Optional: Used as the mounted root, rather than the full Ceph tree, default is / withPath(path):: self + __cephfsMixin({path: path}), // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it withReadOnly(readOnly):: self + __cephfsMixin({readOnly: readOnly}), // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it withSecretFile(secretFile):: self + __cephfsMixin({secretFile: secretFile}), // Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it secretRef:: { local __secretRefMixin(secretRef) = __cephfsMixin({secretRef+: secretRef}), mixinInstance(secretRef):: __secretRefMixin(secretRef), // Name is unique within a namespace to reference a secret resource. withName(name):: self + __secretRefMixin({name: name}), // Namespace defines the space within which the secret name must be unique. withNamespace(namespace):: self + __secretRefMixin({namespace: namespace}), }, secretRefType:: hidden.core.v1.secretReference, // Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it withUser(user):: self + __cephfsMixin({user: user}), }, cephfsType:: hidden.core.v1.cephFSPersistentVolumeSource, // Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md cinder:: { local __cinderMixin(cinder) = {cinder+: cinder}, mixinInstance(cinder):: __cinderMixin(cinder), // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md withFsType(fsType):: self + __cinderMixin({fsType: fsType}), // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md withReadOnly(readOnly):: self + __cinderMixin({readOnly: readOnly}), // volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md withVolumeId(volumeId):: self + __cinderMixin({volumeID: volumeId}), }, cinderType:: hidden.core.v1.cinderVolumeSource, // ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding claimRef:: { local __claimRefMixin(claimRef) = {claimRef+: claimRef}, mixinInstance(claimRef):: __claimRefMixin(claimRef), // If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. withFieldPath(fieldPath):: self + __claimRefMixin({fieldPath: fieldPath}), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __claimRefMixin({name: name}), // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ withNamespace(namespace):: self + __claimRefMixin({namespace: namespace}), // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency withResourceVersion(resourceVersion):: self + __claimRefMixin({resourceVersion: resourceVersion}), // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids withUid(uid):: self + __claimRefMixin({uid: uid}), }, claimRefType:: hidden.core.v1.objectReference, // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. fc:: { local __fcMixin(fc) = {fc+: fc}, mixinInstance(fc):: __fcMixin(fc), // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + __fcMixin({fsType: fsType}), // Optional: FC target lun number withLun(lun):: self + __fcMixin({lun: lun}), // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + __fcMixin({readOnly: readOnly}), // Optional: FC target worldwide names (WWNs) withTargetWwns(targetWwns):: self + if std.type(targetWwns) == "array" then __fcMixin({targetWWNs: targetWwns}) else __fcMixin({targetWWNs: [targetWwns]}), // Optional: FC target worldwide names (WWNs) withTargetWwnsMixin(targetWwns):: self + if std.type(targetWwns) == "array" then __fcMixin({targetWWNs+: targetWwns}) else __fcMixin({targetWWNs+: [targetWwns]}), // Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. withWwids(wwids):: self + if std.type(wwids) == "array" then __fcMixin({wwids: wwids}) else __fcMixin({wwids: [wwids]}), // Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. withWwidsMixin(wwids):: self + if std.type(wwids) == "array" then __fcMixin({wwids+: wwids}) else __fcMixin({wwids+: [wwids]}), }, fcType:: hidden.core.v1.fcVolumeSource, // FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. flexVolume:: { local __flexVolumeMixin(flexVolume) = {flexVolume+: flexVolume}, mixinInstance(flexVolume):: __flexVolumeMixin(flexVolume), // Driver is the name of the driver to use for this volume. withDriver(driver):: self + __flexVolumeMixin({driver: driver}), // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. withFsType(fsType):: self + __flexVolumeMixin({fsType: fsType}), // Optional: Extra command options if any. withOptions(options):: self + __flexVolumeMixin({options: options}), // Optional: Extra command options if any. withOptionsMixin(options):: self + __flexVolumeMixin({options+: options}), // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + __flexVolumeMixin({readOnly: readOnly}), // Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts. secretRef:: { local __secretRefMixin(secretRef) = __flexVolumeMixin({secretRef+: secretRef}), mixinInstance(secretRef):: __secretRefMixin(secretRef), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __secretRefMixin({name: name}), }, secretRefType:: hidden.core.v1.localObjectReference, }, flexVolumeType:: hidden.core.v1.flexVolumeSource, // Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running flocker:: { local __flockerMixin(flocker) = {flocker+: flocker}, mixinInstance(flocker):: __flockerMixin(flocker), // Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated withDatasetName(datasetName):: self + __flockerMixin({datasetName: datasetName}), // UUID of the dataset. This is unique identifier of a Flocker dataset withDatasetUuid(datasetUuid):: self + __flockerMixin({datasetUUID: datasetUuid}), }, flockerType:: hidden.core.v1.flockerVolumeSource, // GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk gcePersistentDisk:: { local __gcePersistentDiskMixin(gcePersistentDisk) = {gcePersistentDisk+: gcePersistentDisk}, mixinInstance(gcePersistentDisk):: __gcePersistentDiskMixin(gcePersistentDisk), // Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk withFsType(fsType):: self + __gcePersistentDiskMixin({fsType: fsType}), // The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk withPartition(partition):: self + __gcePersistentDiskMixin({partition: partition}), // Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk withPdName(pdName):: self + __gcePersistentDiskMixin({pdName: pdName}), // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk withReadOnly(readOnly):: self + __gcePersistentDiskMixin({readOnly: readOnly}), }, gcePersistentDiskType:: hidden.core.v1.gcePersistentDiskVolumeSource, // Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md glusterfs:: { local __glusterfsMixin(glusterfs) = {glusterfs+: glusterfs}, mixinInstance(glusterfs):: __glusterfsMixin(glusterfs), // EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod withEndpoints(endpoints):: self + __glusterfsMixin({endpoints: endpoints}), // Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod withPath(path):: self + __glusterfsMixin({path: path}), // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod withReadOnly(readOnly):: self + __glusterfsMixin({readOnly: readOnly}), }, glusterfsType:: hidden.core.v1.glusterfsVolumeSource, // HostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath hostPath:: { local __hostPathMixin(hostPath) = {hostPath+: hostPath}, mixinInstance(hostPath):: __hostPathMixin(hostPath), // Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath withPath(path):: self + __hostPathMixin({path: path}), // Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath withType(type):: self + __hostPathMixin({type: type}), }, hostPathType:: hidden.core.v1.hostPathVolumeSource, // ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. iscsi:: { local __iscsiMixin(iscsi) = {iscsi+: iscsi}, mixinInstance(iscsi):: __iscsiMixin(iscsi), // whether support iSCSI Discovery CHAP authentication withChapAuthDiscovery(chapAuthDiscovery):: self + __iscsiMixin({chapAuthDiscovery: chapAuthDiscovery}), // whether support iSCSI Session CHAP authentication withChapAuthSession(chapAuthSession):: self + __iscsiMixin({chapAuthSession: chapAuthSession}), // Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi withFsType(fsType):: self + __iscsiMixin({fsType: fsType}), // Custom iSCSI initiator name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. withInitiatorName(initiatorName):: self + __iscsiMixin({initiatorName: initiatorName}), // Target iSCSI Qualified Name. withIqn(iqn):: self + __iscsiMixin({iqn: iqn}), // Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport. withIscsiInterface(iscsiInterface):: self + __iscsiMixin({iscsiInterface: iscsiInterface}), // iSCSI target lun number. withLun(lun):: self + __iscsiMixin({lun: lun}), // iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). withPortals(portals):: self + if std.type(portals) == "array" then __iscsiMixin({portals: portals}) else __iscsiMixin({portals: [portals]}), // iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). withPortalsMixin(portals):: self + if std.type(portals) == "array" then __iscsiMixin({portals+: portals}) else __iscsiMixin({portals+: [portals]}), // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. withReadOnly(readOnly):: self + __iscsiMixin({readOnly: readOnly}), // CHAP secret for iSCSI target and initiator authentication secretRef:: { local __secretRefMixin(secretRef) = __iscsiMixin({secretRef+: secretRef}), mixinInstance(secretRef):: __secretRefMixin(secretRef), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __secretRefMixin({name: name}), }, secretRefType:: hidden.core.v1.localObjectReference, // iSCSI target portal. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). withTargetPortal(targetPortal):: self + __iscsiMixin({targetPortal: targetPortal}), }, iscsiType:: hidden.core.v1.iscsiVolumeSource, // Local represents directly-attached storage with node affinity localStorage:: { local __localStorageMixin(localStorage) = {"local"+: localStorage}, mixinInstance(localStorage):: __localStorageMixin(localStorage), // The full path to the volume on the node For alpha, this path must be a directory Once block as a source is supported, then this path can point to a block device withPath(path):: self + __localStorageMixin({path: path}), }, localStorageType:: hidden.core.v1.localVolumeSource, // NFS represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs nfs:: { local __nfsMixin(nfs) = {nfs+: nfs}, mixinInstance(nfs):: __nfsMixin(nfs), // Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs withPath(path):: self + __nfsMixin({path: path}), // ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs withReadOnly(readOnly):: self + __nfsMixin({readOnly: readOnly}), // Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs withServer(server):: self + __nfsMixin({server: server}), }, nfsType:: hidden.core.v1.nfsVolumeSource, // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine photonPersistentDisk:: { local __photonPersistentDiskMixin(photonPersistentDisk) = {photonPersistentDisk+: photonPersistentDisk}, mixinInstance(photonPersistentDisk):: __photonPersistentDiskMixin(photonPersistentDisk), // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + __photonPersistentDiskMixin({fsType: fsType}), // ID that identifies Photon Controller persistent disk withPdId(pdId):: self + __photonPersistentDiskMixin({pdID: pdId}), }, photonPersistentDiskType:: hidden.core.v1.photonPersistentDiskVolumeSource, // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine portworxVolume:: { local __portworxVolumeMixin(portworxVolume) = {portworxVolume+: portworxVolume}, mixinInstance(portworxVolume):: __portworxVolumeMixin(portworxVolume), // FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + __portworxVolumeMixin({fsType: fsType}), // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + __portworxVolumeMixin({readOnly: readOnly}), // VolumeID uniquely identifies a Portworx volume withVolumeId(volumeId):: self + __portworxVolumeMixin({volumeID: volumeId}), }, portworxVolumeType:: hidden.core.v1.portworxVolumeSource, // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime quobyte:: { local __quobyteMixin(quobyte) = {quobyte+: quobyte}, mixinInstance(quobyte):: __quobyteMixin(quobyte), // Group to map volume access to Default is no group withGroup(group):: self + __quobyteMixin({group: group}), // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. withReadOnly(readOnly):: self + __quobyteMixin({readOnly: readOnly}), // Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes withRegistry(registry):: self + __quobyteMixin({registry: registry}), // User to map volume access to Defaults to serivceaccount user withUser(user):: self + __quobyteMixin({user: user}), // Volume is a string that references an already created Quobyte volume by name. withVolume(volume):: self + __quobyteMixin({volume: volume}), }, quobyteType:: hidden.core.v1.quobyteVolumeSource, // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md rbd:: { local __rbdMixin(rbd) = {rbd+: rbd}, mixinInstance(rbd):: __rbdMixin(rbd), // Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd withFsType(fsType):: self + __rbdMixin({fsType: fsType}), // The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withImage(image):: self + __rbdMixin({image: image}), // Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withKeyring(keyring):: self + __rbdMixin({keyring: keyring}), // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withMonitors(monitors):: self + if std.type(monitors) == "array" then __rbdMixin({monitors: monitors}) else __rbdMixin({monitors: [monitors]}), // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withMonitorsMixin(monitors):: self + if std.type(monitors) == "array" then __rbdMixin({monitors+: monitors}) else __rbdMixin({monitors+: [monitors]}), // The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withPool(pool):: self + __rbdMixin({pool: pool}), // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withReadOnly(readOnly):: self + __rbdMixin({readOnly: readOnly}), // SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it secretRef:: { local __secretRefMixin(secretRef) = __rbdMixin({secretRef+: secretRef}), mixinInstance(secretRef):: __secretRefMixin(secretRef), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __secretRefMixin({name: name}), }, secretRefType:: hidden.core.v1.localObjectReference, // The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withUser(user):: self + __rbdMixin({user: user}), }, rbdType:: hidden.core.v1.rbdVolumeSource, // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. scaleIo:: { local __scaleIoMixin(scaleIo) = {scaleIO+: scaleIo}, mixinInstance(scaleIo):: __scaleIoMixin(scaleIo), // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + __scaleIoMixin({fsType: fsType}), // The host address of the ScaleIO API Gateway. withGateway(gateway):: self + __scaleIoMixin({gateway: gateway}), // The name of the Protection Domain for the configured storage (defaults to "default"). withProtectionDomain(protectionDomain):: self + __scaleIoMixin({protectionDomain: protectionDomain}), // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + __scaleIoMixin({readOnly: readOnly}), // SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. secretRef:: { local __secretRefMixin(secretRef) = __scaleIoMixin({secretRef+: secretRef}), mixinInstance(secretRef):: __secretRefMixin(secretRef), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __secretRefMixin({name: name}), }, secretRefType:: hidden.core.v1.localObjectReference, // Flag to enable/disable SSL communication with Gateway, default false withSslEnabled(sslEnabled):: self + __scaleIoMixin({sslEnabled: sslEnabled}), // Indicates whether the storage for a volume should be thick or thin (defaults to "thin"). withStorageMode(storageMode):: self + __scaleIoMixin({storageMode: storageMode}), // The Storage Pool associated with the protection domain (defaults to "default"). withStoragePool(storagePool):: self + __scaleIoMixin({storagePool: storagePool}), // The name of the storage system as configured in ScaleIO. withSystem(system):: self + __scaleIoMixin({system: system}), // The name of a volume already created in the ScaleIO system that is associated with this volume source. withVolumeName(volumeName):: self + __scaleIoMixin({volumeName: volumeName}), }, scaleIoType:: hidden.core.v1.scaleIoVolumeSource, // StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md storageos:: { local __storageosMixin(storageos) = {storageos+: storageos}, mixinInstance(storageos):: __storageosMixin(storageos), // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + __storageosMixin({fsType: fsType}), // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + __storageosMixin({readOnly: readOnly}), // SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. secretRef:: { local __secretRefMixin(secretRef) = __storageosMixin({secretRef+: secretRef}), mixinInstance(secretRef):: __secretRefMixin(secretRef), // If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. withFieldPath(fieldPath):: self + __secretRefMixin({fieldPath: fieldPath}), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __secretRefMixin({name: name}), // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ withNamespace(namespace):: self + __secretRefMixin({namespace: namespace}), // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency withResourceVersion(resourceVersion):: self + __secretRefMixin({resourceVersion: resourceVersion}), // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids withUid(uid):: self + __secretRefMixin({uid: uid}), }, secretRefType:: hidden.core.v1.objectReference, // VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. withVolumeName(volumeName):: self + __storageosMixin({volumeName: volumeName}), // VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. withVolumeNamespace(volumeNamespace):: self + __storageosMixin({volumeNamespace: volumeNamespace}), }, storageosType:: hidden.core.v1.storageOSPersistentVolumeSource, // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine vsphereVolume:: { local __vsphereVolumeMixin(vsphereVolume) = {vsphereVolume+: vsphereVolume}, mixinInstance(vsphereVolume):: __vsphereVolumeMixin(vsphereVolume), // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + __vsphereVolumeMixin({fsType: fsType}), // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. withStoragePolicyId(storagePolicyId):: self + __vsphereVolumeMixin({storagePolicyID: storagePolicyId}), // Storage Policy Based Management (SPBM) profile name. withStoragePolicyName(storagePolicyName):: self + __vsphereVolumeMixin({storagePolicyName: storagePolicyName}), // Path that identifies vSphere volume vmdk withVolumePath(volumePath):: self + __vsphereVolumeMixin({volumePath: volumePath}), }, vsphereVolumeType:: hidden.core.v1.vsphereVirtualDiskVolumeSource, }, }, // PersistentVolumeStatus is the current status of a persistent volume. persistentVolumeStatus:: { new():: {}, // A human-readable message indicating details about why the volume is in this state. withMessage(message):: self + {message: message}, // Phase indicates if a volume is available, bound to a claim, or released by a claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase withPhase(phase):: self + {phase: phase}, // Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI. withReason(reason):: self + {reason: reason}, mixin:: { }, }, // Represents a Photon Controller persistent disk resource. photonPersistentDiskVolumeSource:: { new():: {}, // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + {fsType: fsType}, // ID that identifies Photon Controller persistent disk withPdId(pdId):: self + {pdID: pdId}, mixin:: { }, }, // Pod affinity is a group of inter pod affinity scheduling rules. podAffinity:: { new():: {}, // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then {preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution} else {preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}, // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then {preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution} else {preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}, preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then {requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution} else {requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then {requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution} else {requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, mixin:: { }, }, // Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key tches that of any node on which a pod of the set of pods is running podAffinityTerm:: { new():: {}, // namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" withNamespaces(namespaces):: self + if std.type(namespaces) == "array" then {namespaces: namespaces} else {namespaces: [namespaces]}, // namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" withNamespacesMixin(namespaces):: self + if std.type(namespaces) == "array" then {namespaces+: namespaces} else {namespaces+: [namespaces]}, // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as "all topologies" ("all topologies" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed. withTopologyKey(topologyKey):: self + {topologyKey: topologyKey}, mixin:: { // A label query over a set of resources, in this case pods. labelSelector:: { local __labelSelectorMixin(labelSelector) = {labelSelector+: labelSelector}, mixinInstance(labelSelector):: __labelSelectorMixin(labelSelector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __labelSelectorMixin({matchExpressions: matchExpressions}) else __labelSelectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __labelSelectorMixin({matchExpressions+: matchExpressions}) else __labelSelectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __labelSelectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __labelSelectorMixin({matchLabels+: matchLabels}), }, labelSelectorType:: hidden.meta.v1.labelSelector, }, }, // Pod anti affinity is a group of inter pod anti affinity scheduling rules. podAntiAffinity:: { new():: {}, // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then {preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution} else {preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}, // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then {preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution} else {preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}, preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then {requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution} else {requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then {requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution} else {requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, mixin:: { }, }, // PodCondition contains details for the current condition of this pod. podCondition:: { new():: {}, // Human-readable message indicating details about last transition. withMessage(message):: self + {message: message}, // Unique, one-word, CamelCase reason for the condition's last transition. withReason(reason):: self + {reason: reason}, // Type is the type of the condition. Currently only Ready. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions withType(type):: self + {type: type}, mixin:: { // Last time we probed the condition. lastProbeTime:: { local __lastProbeTimeMixin(lastProbeTime) = {lastProbeTime+: lastProbeTime}, mixinInstance(lastProbeTime):: __lastProbeTimeMixin(lastProbeTime), }, lastProbeTimeType:: hidden.meta.v1.time, // Last time the condition transitioned from one status to another. lastTransitionTime:: { local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), }, lastTransitionTimeType:: hidden.meta.v1.time, }, }, // PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext. podSecurityContext:: { new():: {}, // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + {fsGroup: fsGroup}, // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + {runAsNonRoot: runAsNonRoot}, // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + {runAsUser: runAsUser}, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then {supplementalGroups: supplementalGroups} else {supplementalGroups: [supplementalGroups]}, // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then {supplementalGroups+: supplementalGroups} else {supplementalGroups+: [supplementalGroups]}, mixin:: { // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = {seLinuxOptions+: seLinuxOptions}, mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, }, }, // PodSpec is a description of a pod. podSpec:: { new():: {}, // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + {activeDeadlineSeconds: activeDeadlineSeconds}, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + {automountServiceAccountToken: automountServiceAccountToken}, // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then {containers: containers} else {containers: [containers]}, // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then {containers+: containers} else {containers+: [containers]}, containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + {dnsPolicy: dnsPolicy}, // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then {hostAliases: hostAliases} else {hostAliases: [hostAliases]}, // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then {hostAliases+: hostAliases} else {hostAliases+: [hostAliases]}, hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + {hostIPC: hostIpc}, // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + {hostNetwork: hostNetwork}, // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + {hostPID: hostPid}, // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + {hostname: hostname}, // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then {imagePullSecrets: imagePullSecrets} else {imagePullSecrets: [imagePullSecrets]}, // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then {imagePullSecrets+: imagePullSecrets} else {imagePullSecrets+: [imagePullSecrets]}, imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then {initContainers: initContainers} else {initContainers: [initContainers]}, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then {initContainers+: initContainers} else {initContainers+: [initContainers]}, initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + {nodeName: nodeName}, // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + {nodeSelector: nodeSelector}, // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + {nodeSelector+: nodeSelector}, // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + {priority: priority}, // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + {priorityClassName: priorityClassName}, // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + {restartPolicy: restartPolicy}, // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + {schedulerName: schedulerName}, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + {serviceAccount: serviceAccount}, // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + {serviceAccountName: serviceAccountName}, // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + {subdomain: subdomain}, // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + {terminationGracePeriodSeconds: terminationGracePeriodSeconds}, // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then {tolerations: tolerations} else {tolerations: [tolerations]}, // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then {tolerations+: tolerations} else {tolerations+: [tolerations]}, tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then {volumes: volumes} else {volumes: [volumes]}, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then {volumes+: volumes} else {volumes+: [volumes]}, volumesType:: hidden.core.v1.volume, mixin:: { // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = {affinity+: affinity}, mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = {securityContext+: securityContext}, mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, }, }, // PodStatus represents information about the status of a pod. Status may trail the actual state of a system. podStatus:: { new():: {}, // Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, // Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, conditionsType:: hidden.core.v1.podCondition, // The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status withContainerStatuses(containerStatuses):: self + if std.type(containerStatuses) == "array" then {containerStatuses: containerStatuses} else {containerStatuses: [containerStatuses]}, // The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status withContainerStatusesMixin(containerStatuses):: self + if std.type(containerStatuses) == "array" then {containerStatuses+: containerStatuses} else {containerStatuses+: [containerStatuses]}, containerStatusesType:: hidden.core.v1.containerStatus, // IP address of the host to which the pod is assigned. Empty if not yet scheduled. withHostIp(hostIp):: self + {hostIP: hostIp}, // The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status withInitContainerStatuses(initContainerStatuses):: self + if std.type(initContainerStatuses) == "array" then {initContainerStatuses: initContainerStatuses} else {initContainerStatuses: [initContainerStatuses]}, // The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status withInitContainerStatusesMixin(initContainerStatuses):: self + if std.type(initContainerStatuses) == "array" then {initContainerStatuses+: initContainerStatuses} else {initContainerStatuses+: [initContainerStatuses]}, initContainerStatusesType:: hidden.core.v1.containerStatus, // A human readable message indicating details about why the pod is in this condition. withMessage(message):: self + {message: message}, // Current condition of the pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase withPhase(phase):: self + {phase: phase}, // IP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated. withPodIp(podIp):: self + {podIP: podIp}, // The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md withQosClass(qosClass):: self + {qosClass: qosClass}, // A brief CamelCase message indicating details about why the pod is in this state. e.g. 'Evicted' withReason(reason):: self + {reason: reason}, mixin:: { // RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod. startTime:: { local __startTimeMixin(startTime) = {startTime+: startTime}, mixinInstance(startTime):: __startTimeMixin(startTime), }, startTimeType:: hidden.meta.v1.time, }, }, // PodTemplateSpec describes the data a pod should have when created from a template podTemplateSpec:: { new():: {}, mixin:: { // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = {metadata+: metadata}, mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = {spec+: spec}, mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, }, // PortworxVolumeSource represents a Portworx volume resource. portworxVolumeSource:: { new():: {}, // FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + {fsType: fsType}, // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + {readOnly: readOnly}, // VolumeID uniquely identifies a Portworx volume withVolumeId(volumeId):: self + {volumeID: volumeId}, mixin:: { }, }, // An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). preferredSchedulingTerm:: { new():: {}, // Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. withWeight(weight):: self + {weight: weight}, mixin:: { // A node selector term, associated with the corresponding weight. preference:: { local __preferenceMixin(preference) = {preference+: preference}, mixinInstance(preference):: __preferenceMixin(preference), // Required. A list of node selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __preferenceMixin({matchExpressions: matchExpressions}) else __preferenceMixin({matchExpressions: [matchExpressions]}), // Required. A list of node selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __preferenceMixin({matchExpressions+: matchExpressions}) else __preferenceMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.core.v1.nodeSelectorRequirement, }, preferenceType:: hidden.core.v1.nodeSelectorTerm, }, }, // Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. probe:: { new():: {}, // Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. withFailureThreshold(failureThreshold):: self + {failureThreshold: failureThreshold}, // Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes withInitialDelaySeconds(initialDelaySeconds):: self + {initialDelaySeconds: initialDelaySeconds}, // How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. withPeriodSeconds(periodSeconds):: self + {periodSeconds: periodSeconds}, // Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1. withSuccessThreshold(successThreshold):: self + {successThreshold: successThreshold}, // Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes withTimeoutSeconds(timeoutSeconds):: self + {timeoutSeconds: timeoutSeconds}, mixin:: { // One and only one of the following should be specified. Exec specifies the action to take. exec:: { local __execMixin(exec) = {exec+: exec}, mixinInstance(exec):: __execMixin(exec), // Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. withCommand(command):: self + if std.type(command) == "array" then __execMixin({command: command}) else __execMixin({command: [command]}), // Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. withCommandMixin(command):: self + if std.type(command) == "array" then __execMixin({command+: command}) else __execMixin({command+: [command]}), }, execType:: hidden.core.v1.execAction, // HTTPGet specifies the http request to perform. httpGet:: { local __httpGetMixin(httpGet) = {httpGet+: httpGet}, mixinInstance(httpGet):: __httpGetMixin(httpGet), // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. withHost(host):: self + __httpGetMixin({host: host}), // Custom headers to set in the request. HTTP allows repeated headers. withHttpHeaders(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders: httpHeaders}) else __httpGetMixin({httpHeaders: [httpHeaders]}), // Custom headers to set in the request. HTTP allows repeated headers. withHttpHeadersMixin(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders+: httpHeaders}) else __httpGetMixin({httpHeaders+: [httpHeaders]}), httpHeadersType:: hidden.core.v1.httpHeader, // Path to access on the HTTP server. withPath(path):: self + __httpGetMixin({path: path}), // Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. withPort(port):: __httpGetMixin({port: port}), // Scheme to use for connecting to the host. Defaults to HTTP. withScheme(scheme):: self + __httpGetMixin({scheme: scheme}), }, httpGetType:: hidden.core.v1.httpGetAction, // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported tcpSocket:: { local __tcpSocketMixin(tcpSocket) = {tcpSocket+: tcpSocket}, mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), // Optional: Host name to connect to, defaults to the pod IP. withHost(host):: self + __tcpSocketMixin({host: host}), // Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. withPort(port):: __tcpSocketMixin({port: port}), }, tcpSocketType:: hidden.core.v1.tcpSocketAction, }, }, // Represents a projected volume source projectedVolumeSource:: { new():: {}, // Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. withDefaultMode(defaultMode):: self + {defaultMode: defaultMode}, // list of volume projections withSources(sources):: self + if std.type(sources) == "array" then {sources: sources} else {sources: [sources]}, // list of volume projections withSourcesMixin(sources):: self + if std.type(sources) == "array" then {sources+: sources} else {sources+: [sources]}, sourcesType:: hidden.core.v1.volumeProjection, mixin:: { }, }, // Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling. quobyteVolumeSource:: { new():: {}, // Group to map volume access to Default is no group withGroup(group):: self + {group: group}, // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. withReadOnly(readOnly):: self + {readOnly: readOnly}, // Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes withRegistry(registry):: self + {registry: registry}, // User to map volume access to Defaults to serivceaccount user withUser(user):: self + {user: user}, // Volume is a string that references an already created Quobyte volume by name. withVolume(volume):: self + {volume: volume}, mixin:: { }, }, // Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling. rbdVolumeSource:: { new():: {}, // Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd withFsType(fsType):: self + {fsType: fsType}, // The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withImage(image):: self + {image: image}, // Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withKeyring(keyring):: self + {keyring: keyring}, // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withMonitors(monitors):: self + if std.type(monitors) == "array" then {monitors: monitors} else {monitors: [monitors]}, // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withMonitorsMixin(monitors):: self + if std.type(monitors) == "array" then {monitors+: monitors} else {monitors+: [monitors]}, // The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withPool(pool):: self + {pool: pool}, // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withReadOnly(readOnly):: self + {readOnly: readOnly}, // The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withUser(user):: self + {user: user}, mixin:: { // SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it secretRef:: { local __secretRefMixin(secretRef) = {secretRef+: secretRef}, mixinInstance(secretRef):: __secretRefMixin(secretRef), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __secretRefMixin({name: name}), }, secretRefType:: hidden.core.v1.localObjectReference, }, }, // ReplicationControllerCondition describes the state of a replication controller at a certain point. replicationControllerCondition:: { new():: {}, // A human readable message indicating details about the transition. withMessage(message):: self + {message: message}, // The reason for the condition's last transition. withReason(reason):: self + {reason: reason}, // Type of replication controller condition. withType(type):: self + {type: type}, mixin:: { // The last time the condition transitioned from one status to another. lastTransitionTime:: { local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), }, lastTransitionTimeType:: hidden.meta.v1.time, }, }, // ReplicationControllerSpec is the specification of a replication controller. replicationControllerSpec:: { new():: {}, // Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) withMinReadySeconds(minReadySeconds):: self + {minReadySeconds: minReadySeconds}, // Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller withReplicas(replicas):: self + {replicas: replicas}, // Selector is a label query over pods that should match the Replicas count. If Selector is empty, it is defaulted to the labels present on the Pod template. Label keys and values that must match in order to be controlled by this replication controller, if empty defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors withSelector(selector):: self + {selector: selector}, // Selector is a label query over pods that should match the Replicas count. If Selector is empty, it is defaulted to the labels present on the Pod template. Label keys and values that must match in order to be controlled by this replication controller, if empty defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors withSelectorMixin(selector):: self + {selector+: selector}, mixin:: { // Template is the object that describes the pod that will be created if insufficient replicas are detected. This takes precedence over a TemplateRef. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template template:: { local __templateMixin(template) = {template+: template}, mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, }, }, // ReplicationControllerStatus represents the current status of a replication controller. replicationControllerStatus:: { new():: {}, // The number of available replicas (ready for at least minReadySeconds) for this replication controller. withAvailableReplicas(availableReplicas):: self + {availableReplicas: availableReplicas}, // Represents the latest available observations of a replication controller's current state. withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, // Represents the latest available observations of a replication controller's current state. withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, conditionsType:: hidden.core.v1.replicationControllerCondition, // The number of pods that have labels matching the labels of the pod template of the replication controller. withFullyLabeledReplicas(fullyLabeledReplicas):: self + {fullyLabeledReplicas: fullyLabeledReplicas}, // ObservedGeneration reflects the generation of the most recently observed replication controller. withObservedGeneration(observedGeneration):: self + {observedGeneration: observedGeneration}, // The number of ready replicas for this replication controller. withReadyReplicas(readyReplicas):: self + {readyReplicas: readyReplicas}, // Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller withReplicas(replicas):: self + {replicas: replicas}, mixin:: { }, }, // ResourceFieldSelector represents container resources (cpu, memory) and their output format resourceFieldSelector:: { new():: {}, // Container name: required for volumes, optional for env vars withContainerName(containerName):: self + {containerName: containerName}, // Required: resource to select withResource(resource):: self + {resource: resource}, mixin:: { // Specifies the output format of the exposed resources, defaults to "1" divisor:: { local __divisorMixin(divisor) = {divisor+: divisor}, mixinInstance(divisor):: __divisorMixin(divisor), }, divisorType:: hidden.core.resource.quantity, }, }, // ResourceQuotaSpec defines the desired hard limits to enforce for Quota. resourceQuotaSpec:: { new():: {}, // Hard is the set of desired hard limits for each named resource. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md withHard(hard):: self + {hard: hard}, // Hard is the set of desired hard limits for each named resource. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md withHardMixin(hard):: self + {hard+: hard}, // A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects. withScopes(scopes):: self + if std.type(scopes) == "array" then {scopes: scopes} else {scopes: [scopes]}, // A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects. withScopesMixin(scopes):: self + if std.type(scopes) == "array" then {scopes+: scopes} else {scopes+: [scopes]}, mixin:: { }, }, // ResourceQuotaStatus defines the enforced hard limits and observed use. resourceQuotaStatus:: { new():: {}, // Hard is the set of enforced hard limits for each named resource. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md withHard(hard):: self + {hard: hard}, // Hard is the set of enforced hard limits for each named resource. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md withHardMixin(hard):: self + {hard+: hard}, // Used is the current observed total usage of the resource in the namespace. withUsed(used):: self + {used: used}, // Used is the current observed total usage of the resource in the namespace. withUsedMixin(used):: self + {used+: used}, mixin:: { }, }, // ResourceRequirements describes the compute resource requirements. resourceRequirements:: { new():: {}, // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ withLimits(limits):: self + {limits: limits}, // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ withLimitsMixin(limits):: self + {limits+: limits}, // Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ withRequests(requests):: self + {requests: requests}, // Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ withRequestsMixin(requests):: self + {requests+: requests}, mixin:: { }, }, // SELinuxOptions are the labels to be applied to the container seLinuxOptions:: { new():: {}, // Level is SELinux level label that applies to the container. withLevel(level):: self + {level: level}, // Role is a SELinux role label that applies to the container. withRole(role):: self + {role: role}, // Type is a SELinux type label that applies to the container. withType(type):: self + {type: type}, // User is a SELinux user label that applies to the container. withUser(user):: self + {user: user}, mixin:: { }, }, // ScaleIOVolumeSource represents a persistent ScaleIO volume scaleIoVolumeSource:: { new():: {}, // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + {fsType: fsType}, // The host address of the ScaleIO API Gateway. withGateway(gateway):: self + {gateway: gateway}, // The name of the Protection Domain for the configured storage (defaults to "default"). withProtectionDomain(protectionDomain):: self + {protectionDomain: protectionDomain}, // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + {readOnly: readOnly}, // Flag to enable/disable SSL communication with Gateway, default false withSslEnabled(sslEnabled):: self + {sslEnabled: sslEnabled}, // Indicates whether the storage for a volume should be thick or thin (defaults to "thin"). withStorageMode(storageMode):: self + {storageMode: storageMode}, // The Storage Pool associated with the protection domain (defaults to "default"). withStoragePool(storagePool):: self + {storagePool: storagePool}, // The name of the storage system as configured in ScaleIO. withSystem(system):: self + {system: system}, // The name of a volume already created in the ScaleIO system that is associated with this volume source. withVolumeName(volumeName):: self + {volumeName: volumeName}, mixin:: { // SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. secretRef:: { local __secretRefMixin(secretRef) = {secretRef+: secretRef}, mixinInstance(secretRef):: __secretRefMixin(secretRef), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __secretRefMixin({name: name}), }, secretRefType:: hidden.core.v1.localObjectReference, }, }, // SecretEnvSource selects a Secret to populate the environment variables with. // // The contents of the target Secret's Data field will represent the key-value pairs as environment variables. secretEnvSource:: { new():: {}, // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + {name: name}, // Specify whether the Secret must be defined withOptional(optional):: self + {optional: optional}, mixin:: { }, }, // SecretKeySelector selects a key of a Secret. secretKeySelector:: { new():: {}, // The key of the secret to select from. Must be a valid secret key. withKey(key):: self + {key: key}, // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + {name: name}, // Specify whether the Secret or it's key must be defined withOptional(optional):: self + {optional: optional}, mixin:: { }, }, // Adapts a secret into a projected volume. // // The contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode. secretProjection:: { new():: {}, // If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.core.v1.keyToPath, // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + {name: name}, // Specify whether the Secret or its key must be defined withOptional(optional):: self + {optional: optional}, mixin:: { }, }, // SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace secretReference:: { new():: {}, // Name is unique within a namespace to reference a secret resource. withName(name):: self + {name: name}, // Namespace defines the space within which the secret name must be unique. withNamespace(namespace):: self + {namespace: namespace}, mixin:: { }, }, // Adapts a Secret into a volume. // // The contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling. secretVolumeSource:: { new():: {}, // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. withDefaultMode(defaultMode):: self + {defaultMode: defaultMode}, // If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, // If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, itemsType:: hidden.core.v1.keyToPath, // Specify whether the Secret or it's keys must be defined withOptional(optional):: self + {optional: optional}, // Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret withSecretName(secretName):: self + {secretName: secretName}, mixin:: { }, }, // SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence. securityContext:: { new():: {}, // AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN withAllowPrivilegeEscalation(allowPrivilegeEscalation):: self + {allowPrivilegeEscalation: allowPrivilegeEscalation}, // Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. withPrivileged(privileged):: self + {privileged: privileged}, // Whether this container has a read-only root filesystem. Default is false. withReadOnlyRootFilesystem(readOnlyRootFilesystem):: self + {readOnlyRootFilesystem: readOnlyRootFilesystem}, // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + {runAsNonRoot: runAsNonRoot}, // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsUser(runAsUser):: self + {runAsUser: runAsUser}, mixin:: { // The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. capabilities:: { local __capabilitiesMixin(capabilities) = {capabilities+: capabilities}, mixinInstance(capabilities):: __capabilitiesMixin(capabilities), // Added capabilities withAdd(add):: self + if std.type(add) == "array" then __capabilitiesMixin({add: add}) else __capabilitiesMixin({add: [add]}), // Added capabilities withAddMixin(add):: self + if std.type(add) == "array" then __capabilitiesMixin({add+: add}) else __capabilitiesMixin({add+: [add]}), // Removed capabilities withDrop(drop):: self + if std.type(drop) == "array" then __capabilitiesMixin({drop: drop}) else __capabilitiesMixin({drop: [drop]}), // Removed capabilities withDropMixin(drop):: self + if std.type(drop) == "array" then __capabilitiesMixin({drop+: drop}) else __capabilitiesMixin({drop+: [drop]}), }, capabilitiesType:: hidden.core.v1.capabilities, // The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = {seLinuxOptions+: seLinuxOptions}, mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, }, }, // ServicePort contains information on service's port. servicePort:: { new(port, targetPort):: {} + self.withPort(port) + self.withTargetPort(targetPort), newNamed(name, port, targetPort):: {} + self.withName(name) + self.withPort(port) + self.withTargetPort(targetPort), // The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. This maps to the 'Name' field in EndpointPort objects. Optional if only one ServicePort is defined on this service. withName(name):: self + {name: name}, // The port on each node on which this service is exposed when type=NodePort or LoadBalancer. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport withNodePort(nodePort):: self + {nodePort: nodePort}, // The port that will be exposed by this service. withPort(port):: self + {port: port}, // The IP protocol for this port. Supports "TCP" and "UDP". Default is TCP. withProtocol(protocol):: self + {protocol: protocol}, // Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod's container ports. If this is not specified, the value of the 'port' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the 'port' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service withTargetPort(targetPort):: {targetPort: targetPort}, mixin:: { }, }, // ServiceSpec describes the attributes that a user creates on a service. serviceSpec:: { new():: {}, // clusterIP is the IP address of the service and is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are "None", empty string (""), or a valid IP address. "None" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies withClusterIp(clusterIp):: self + {clusterIP: clusterIp}, // externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system. withExternalIps(externalIps):: self + if std.type(externalIps) == "array" then {externalIPs: externalIps} else {externalIPs: [externalIps]}, // externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system. withExternalIpsMixin(externalIps):: self + if std.type(externalIps) == "array" then {externalIPs+: externalIps} else {externalIPs+: [externalIps]}, // externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid DNS name and requires Type to be ExternalName. withExternalName(externalName):: self + {externalName: externalName}, // externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. "Local" preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. "Cluster" obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading. withExternalTrafficPolicy(externalTrafficPolicy):: self + {externalTrafficPolicy: externalTrafficPolicy}, // healthCheckNodePort specifies the healthcheck nodePort for the service. If not specified, HealthCheckNodePort is created by the service api backend with the allocated nodePort. Will use user-specified nodePort value if specified by the client. Only effects when Type is set to LoadBalancer and ExternalTrafficPolicy is set to Local. withHealthCheckNodePort(healthCheckNodePort):: self + {healthCheckNodePort: healthCheckNodePort}, // Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. withLoadBalancerIp(loadBalancerIp):: self + {loadBalancerIP: loadBalancerIp}, // If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature." More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/ withLoadBalancerSourceRanges(loadBalancerSourceRanges):: self + if std.type(loadBalancerSourceRanges) == "array" then {loadBalancerSourceRanges: loadBalancerSourceRanges} else {loadBalancerSourceRanges: [loadBalancerSourceRanges]}, // If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature." More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/ withLoadBalancerSourceRangesMixin(loadBalancerSourceRanges):: self + if std.type(loadBalancerSourceRanges) == "array" then {loadBalancerSourceRanges+: loadBalancerSourceRanges} else {loadBalancerSourceRanges+: [loadBalancerSourceRanges]}, // The list of ports that are exposed by this service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies withPorts(ports):: self + if std.type(ports) == "array" then {ports: ports} else {ports: [ports]}, // The list of ports that are exposed by this service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies withPortsMixin(ports):: self + if std.type(ports) == "array" then {ports+: ports} else {ports+: [ports]}, portsType:: hidden.core.v1.servicePort, // publishNotReadyAddresses, when set to true, indicates that DNS implementations must publish the notReadyAddresses of subsets for the Endpoints associated with the Service. The default value is false. The primary use case for setting this field is to use a StatefulSet's Headless Service to propagate SRV records for its Pods without respect to their readiness for purpose of peer discovery. This field will replace the service.alpha.kubernetes.io/tolerate-unready-endpoints when that annotation is deprecated and all clients have been converted to use this field. withPublishNotReadyAddresses(publishNotReadyAddresses):: self + {publishNotReadyAddresses: publishNotReadyAddresses}, // Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/ withSelector(selector):: self + {selector: selector}, // Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/ withSelectorMixin(selector):: self + {selector+: selector}, // Supports "ClientIP" and "None". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies withSessionAffinity(sessionAffinity):: self + {sessionAffinity: sessionAffinity}, // type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. "ExternalName" maps to the specified externalName. "ClusterIP" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object. If clusterIP is "None", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. "NodePort" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. "LoadBalancer" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types withType(type):: self + {type: type}, mixin:: { // sessionAffinityConfig contains the configurations of session affinity. sessionAffinityConfig:: { local __sessionAffinityConfigMixin(sessionAffinityConfig) = {sessionAffinityConfig+: sessionAffinityConfig}, mixinInstance(sessionAffinityConfig):: __sessionAffinityConfigMixin(sessionAffinityConfig), // clientIP contains the configurations of Client IP based session affinity. clientIp:: { local __clientIpMixin(clientIp) = __sessionAffinityConfigMixin({clientIP+: clientIp}), mixinInstance(clientIp):: __clientIpMixin(clientIp), // timeoutSeconds specifies the seconds of ClientIP type session sticky time. The value must be >0 && <=86400(for 1 day) if ServiceAffinity == "ClientIP". Default value is 10800(for 3 hours). withTimeoutSeconds(timeoutSeconds):: self + __clientIpMixin({timeoutSeconds: timeoutSeconds}), }, clientIpType:: hidden.core.v1.clientIPConfig, }, sessionAffinityConfigType:: hidden.core.v1.sessionAffinityConfig, }, }, // ServiceStatus represents the current status of a service. serviceStatus:: { new():: {}, mixin:: { // LoadBalancer contains the current status of the load-balancer, if one is present. loadBalancer:: { local __loadBalancerMixin(loadBalancer) = {loadBalancer+: loadBalancer}, mixinInstance(loadBalancer):: __loadBalancerMixin(loadBalancer), // Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. withIngress(ingress):: self + if std.type(ingress) == "array" then __loadBalancerMixin({ingress: ingress}) else __loadBalancerMixin({ingress: [ingress]}), // Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. withIngressMixin(ingress):: self + if std.type(ingress) == "array" then __loadBalancerMixin({ingress+: ingress}) else __loadBalancerMixin({ingress+: [ingress]}), ingressType:: hidden.core.v1.loadBalancerIngress, }, loadBalancerType:: hidden.core.v1.loadBalancerStatus, }, }, // SessionAffinityConfig represents the configurations of session affinity. sessionAffinityConfig:: { new():: {}, mixin:: { // clientIP contains the configurations of Client IP based session affinity. clientIp:: { local __clientIpMixin(clientIp) = {clientIP+: clientIp}, mixinInstance(clientIp):: __clientIpMixin(clientIp), // timeoutSeconds specifies the seconds of ClientIP type session sticky time. The value must be >0 && <=86400(for 1 day) if ServiceAffinity == "ClientIP". Default value is 10800(for 3 hours). withTimeoutSeconds(timeoutSeconds):: self + __clientIpMixin({timeoutSeconds: timeoutSeconds}), }, clientIpType:: hidden.core.v1.clientIPConfig, }, }, // Represents a StorageOS persistent volume resource. storageOSPersistentVolumeSource:: { new():: {}, // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + {fsType: fsType}, // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + {readOnly: readOnly}, // VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. withVolumeName(volumeName):: self + {volumeName: volumeName}, // VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. withVolumeNamespace(volumeNamespace):: self + {volumeNamespace: volumeNamespace}, mixin:: { // SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. secretRef:: { local __secretRefMixin(secretRef) = {secretRef+: secretRef}, mixinInstance(secretRef):: __secretRefMixin(secretRef), // If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. withFieldPath(fieldPath):: self + __secretRefMixin({fieldPath: fieldPath}), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __secretRefMixin({name: name}), // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ withNamespace(namespace):: self + __secretRefMixin({namespace: namespace}), // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency withResourceVersion(resourceVersion):: self + __secretRefMixin({resourceVersion: resourceVersion}), // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids withUid(uid):: self + __secretRefMixin({uid: uid}), }, secretRefType:: hidden.core.v1.objectReference, }, }, // Represents a StorageOS persistent volume resource. storageOSVolumeSource:: { new():: {}, // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + {fsType: fsType}, // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + {readOnly: readOnly}, // VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. withVolumeName(volumeName):: self + {volumeName: volumeName}, // VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. withVolumeNamespace(volumeNamespace):: self + {volumeNamespace: volumeNamespace}, mixin:: { // SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. secretRef:: { local __secretRefMixin(secretRef) = {secretRef+: secretRef}, mixinInstance(secretRef):: __secretRefMixin(secretRef), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __secretRefMixin({name: name}), }, secretRefType:: hidden.core.v1.localObjectReference, }, }, // TCPSocketAction describes an action based on opening a socket tcpSocketAction:: { new():: {}, // Optional: Host name to connect to, defaults to the pod IP. withHost(host):: self + {host: host}, // Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. withPort(port):: {port: port}, mixin:: { }, }, // The node this Taint is attached to has the "effect" on any pod that does not tolerate the Taint. taint:: { new():: {}, // Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute. withEffect(effect):: self + {effect: effect}, // Required. The taint key to be applied to a node. withKey(key):: self + {key: key}, // Required. The taint value corresponding to the taint key. withValue(value):: self + {value: value}, mixin:: { // TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints. timeAdded:: { local __timeAddedMixin(timeAdded) = {timeAdded+: timeAdded}, mixinInstance(timeAdded):: __timeAddedMixin(timeAdded), }, timeAddedType:: hidden.meta.v1.time, }, }, // The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . toleration:: { new():: {}, // Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. withEffect(effect):: self + {effect: effect}, // Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. withKey(key):: self + {key: key}, // Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. withOperator(operator):: self + {operator: operator}, // TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. withTolerationSeconds(tolerationSeconds):: self + {tolerationSeconds: tolerationSeconds}, // Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. withValue(value):: self + {value: value}, mixin:: { }, }, // Volume represents a named volume in a pod that may be accessed by any container in the pod. volume:: { fromConfigMap(name, configMapName, configMapItems):: {} + self.withName(name) + self.mixin.configMap.withName(configMapName) + self.mixin.configMap.withItems(configMapItems), fromEmptyDir(name, emptyDir={}):: {} + self.withName(name) + self.mixin.emptyDir.mixinInstance(emptyDir), fromPersistentVolumeClaim(name, claimName):: {} + self.withName(name) + self.mixin.persistentVolumeClaim.withClaimName(claimName), fromHostPath(name, hostPath):: {} + self.withName(name) + self.mixin.hostPath.withPath(hostPath), fromSecret(name, secretName):: {} + self.withName(name) + self.mixin.secret.withSecretName(secretName), // Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + {name: name}, mixin:: { // AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore awsElasticBlockStore:: { local __awsElasticBlockStoreMixin(awsElasticBlockStore) = {awsElasticBlockStore+: awsElasticBlockStore}, mixinInstance(awsElasticBlockStore):: __awsElasticBlockStoreMixin(awsElasticBlockStore), // Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore withFsType(fsType):: self + __awsElasticBlockStoreMixin({fsType: fsType}), // The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). withPartition(partition):: self + __awsElasticBlockStoreMixin({partition: partition}), // Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore withReadOnly(readOnly):: self + __awsElasticBlockStoreMixin({readOnly: readOnly}), // Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore withVolumeId(volumeId):: self + __awsElasticBlockStoreMixin({volumeID: volumeId}), }, awsElasticBlockStoreType:: hidden.core.v1.awsElasticBlockStoreVolumeSource, // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. azureDisk:: { local __azureDiskMixin(azureDisk) = {azureDisk+: azureDisk}, mixinInstance(azureDisk):: __azureDiskMixin(azureDisk), // Host Caching mode: None, Read Only, Read Write. withCachingMode(cachingMode):: self + __azureDiskMixin({cachingMode: cachingMode}), // The Name of the data disk in the blob storage withDiskName(diskName):: self + __azureDiskMixin({diskName: diskName}), // The URI the data disk in the blob storage withDiskUri(diskUri):: self + __azureDiskMixin({diskURI: diskUri}), // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + __azureDiskMixin({fsType: fsType}), // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + __azureDiskMixin({readOnly: readOnly}), }, azureDiskType:: hidden.core.v1.azureDiskVolumeSource, // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. azureFile:: { local __azureFileMixin(azureFile) = {azureFile+: azureFile}, mixinInstance(azureFile):: __azureFileMixin(azureFile), // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + __azureFileMixin({readOnly: readOnly}), // the name of secret that contains Azure Storage Account Name and Key withSecretName(secretName):: self + __azureFileMixin({secretName: secretName}), // Share Name withShareName(shareName):: self + __azureFileMixin({shareName: shareName}), }, azureFileType:: hidden.core.v1.azureFileVolumeSource, // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime cephfs:: { local __cephfsMixin(cephfs) = {cephfs+: cephfs}, mixinInstance(cephfs):: __cephfsMixin(cephfs), // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it withMonitors(monitors):: self + if std.type(monitors) == "array" then __cephfsMixin({monitors: monitors}) else __cephfsMixin({monitors: [monitors]}), // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it withMonitorsMixin(monitors):: self + if std.type(monitors) == "array" then __cephfsMixin({monitors+: monitors}) else __cephfsMixin({monitors+: [monitors]}), // Optional: Used as the mounted root, rather than the full Ceph tree, default is / withPath(path):: self + __cephfsMixin({path: path}), // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it withReadOnly(readOnly):: self + __cephfsMixin({readOnly: readOnly}), // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it withSecretFile(secretFile):: self + __cephfsMixin({secretFile: secretFile}), // Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it secretRef:: { local __secretRefMixin(secretRef) = __cephfsMixin({secretRef+: secretRef}), mixinInstance(secretRef):: __secretRefMixin(secretRef), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __secretRefMixin({name: name}), }, secretRefType:: hidden.core.v1.localObjectReference, // Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it withUser(user):: self + __cephfsMixin({user: user}), }, cephfsType:: hidden.core.v1.cephFsVolumeSource, // Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md cinder:: { local __cinderMixin(cinder) = {cinder+: cinder}, mixinInstance(cinder):: __cinderMixin(cinder), // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md withFsType(fsType):: self + __cinderMixin({fsType: fsType}), // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md withReadOnly(readOnly):: self + __cinderMixin({readOnly: readOnly}), // volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md withVolumeId(volumeId):: self + __cinderMixin({volumeID: volumeId}), }, cinderType:: hidden.core.v1.cinderVolumeSource, // ConfigMap represents a configMap that should populate this volume configMap:: { local __configMapMixin(configMap) = {configMap+: configMap}, mixinInstance(configMap):: __configMapMixin(configMap), // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. withDefaultMode(defaultMode):: self + __configMapMixin({defaultMode: defaultMode}), // If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. withItems(items):: self + if std.type(items) == "array" then __configMapMixin({items: items}) else __configMapMixin({items: [items]}), // If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. withItemsMixin(items):: self + if std.type(items) == "array" then __configMapMixin({items+: items}) else __configMapMixin({items+: [items]}), itemsType:: hidden.core.v1.keyToPath, // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __configMapMixin({name: name}), // Specify whether the ConfigMap or it's keys must be defined withOptional(optional):: self + __configMapMixin({optional: optional}), }, configMapType:: hidden.core.v1.configMapVolumeSource, // DownwardAPI represents downward API about the pod that should populate this volume downwardApi:: { local __downwardApiMixin(downwardApi) = {downwardAPI+: downwardApi}, mixinInstance(downwardApi):: __downwardApiMixin(downwardApi), // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. withDefaultMode(defaultMode):: self + __downwardApiMixin({defaultMode: defaultMode}), // Items is a list of downward API volume file withItems(items):: self + if std.type(items) == "array" then __downwardApiMixin({items: items}) else __downwardApiMixin({items: [items]}), // Items is a list of downward API volume file withItemsMixin(items):: self + if std.type(items) == "array" then __downwardApiMixin({items+: items}) else __downwardApiMixin({items+: [items]}), itemsType:: hidden.core.v1.downwardApiVolumeFile, }, downwardApiType:: hidden.core.v1.downwardApiVolumeSource, // EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir emptyDir:: { local __emptyDirMixin(emptyDir) = {emptyDir+: emptyDir}, mixinInstance(emptyDir):: __emptyDirMixin(emptyDir), // What type of storage medium should back this directory. The default is "" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir withMedium(medium):: self + __emptyDirMixin({medium: medium}), // Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir sizeLimit:: { local __sizeLimitMixin(sizeLimit) = __emptyDirMixin({sizeLimit+: sizeLimit}), mixinInstance(sizeLimit):: __sizeLimitMixin(sizeLimit), }, sizeLimitType:: hidden.core.resource.quantity, }, emptyDirType:: hidden.core.v1.emptyDirVolumeSource, // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. fc:: { local __fcMixin(fc) = {fc+: fc}, mixinInstance(fc):: __fcMixin(fc), // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + __fcMixin({fsType: fsType}), // Optional: FC target lun number withLun(lun):: self + __fcMixin({lun: lun}), // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + __fcMixin({readOnly: readOnly}), // Optional: FC target worldwide names (WWNs) withTargetWwns(targetWwns):: self + if std.type(targetWwns) == "array" then __fcMixin({targetWWNs: targetWwns}) else __fcMixin({targetWWNs: [targetWwns]}), // Optional: FC target worldwide names (WWNs) withTargetWwnsMixin(targetWwns):: self + if std.type(targetWwns) == "array" then __fcMixin({targetWWNs+: targetWwns}) else __fcMixin({targetWWNs+: [targetWwns]}), // Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. withWwids(wwids):: self + if std.type(wwids) == "array" then __fcMixin({wwids: wwids}) else __fcMixin({wwids: [wwids]}), // Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. withWwidsMixin(wwids):: self + if std.type(wwids) == "array" then __fcMixin({wwids+: wwids}) else __fcMixin({wwids+: [wwids]}), }, fcType:: hidden.core.v1.fcVolumeSource, // FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. flexVolume:: { local __flexVolumeMixin(flexVolume) = {flexVolume+: flexVolume}, mixinInstance(flexVolume):: __flexVolumeMixin(flexVolume), // Driver is the name of the driver to use for this volume. withDriver(driver):: self + __flexVolumeMixin({driver: driver}), // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. withFsType(fsType):: self + __flexVolumeMixin({fsType: fsType}), // Optional: Extra command options if any. withOptions(options):: self + __flexVolumeMixin({options: options}), // Optional: Extra command options if any. withOptionsMixin(options):: self + __flexVolumeMixin({options+: options}), // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + __flexVolumeMixin({readOnly: readOnly}), // Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts. secretRef:: { local __secretRefMixin(secretRef) = __flexVolumeMixin({secretRef+: secretRef}), mixinInstance(secretRef):: __secretRefMixin(secretRef), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __secretRefMixin({name: name}), }, secretRefType:: hidden.core.v1.localObjectReference, }, flexVolumeType:: hidden.core.v1.flexVolumeSource, // Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running flocker:: { local __flockerMixin(flocker) = {flocker+: flocker}, mixinInstance(flocker):: __flockerMixin(flocker), // Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated withDatasetName(datasetName):: self + __flockerMixin({datasetName: datasetName}), // UUID of the dataset. This is unique identifier of a Flocker dataset withDatasetUuid(datasetUuid):: self + __flockerMixin({datasetUUID: datasetUuid}), }, flockerType:: hidden.core.v1.flockerVolumeSource, // GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk gcePersistentDisk:: { local __gcePersistentDiskMixin(gcePersistentDisk) = {gcePersistentDisk+: gcePersistentDisk}, mixinInstance(gcePersistentDisk):: __gcePersistentDiskMixin(gcePersistentDisk), // Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk withFsType(fsType):: self + __gcePersistentDiskMixin({fsType: fsType}), // The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk withPartition(partition):: self + __gcePersistentDiskMixin({partition: partition}), // Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk withPdName(pdName):: self + __gcePersistentDiskMixin({pdName: pdName}), // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk withReadOnly(readOnly):: self + __gcePersistentDiskMixin({readOnly: readOnly}), }, gcePersistentDiskType:: hidden.core.v1.gcePersistentDiskVolumeSource, // GitRepo represents a git repository at a particular revision. gitRepo:: { local __gitRepoMixin(gitRepo) = {gitRepo+: gitRepo}, mixinInstance(gitRepo):: __gitRepoMixin(gitRepo), // Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. withDirectory(directory):: self + __gitRepoMixin({directory: directory}), // Repository URL withRepository(repository):: self + __gitRepoMixin({repository: repository}), // Commit hash for the specified revision. withRevision(revision):: self + __gitRepoMixin({revision: revision}), }, gitRepoType:: hidden.core.v1.gitRepoVolumeSource, // Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md glusterfs:: { local __glusterfsMixin(glusterfs) = {glusterfs+: glusterfs}, mixinInstance(glusterfs):: __glusterfsMixin(glusterfs), // EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod withEndpoints(endpoints):: self + __glusterfsMixin({endpoints: endpoints}), // Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod withPath(path):: self + __glusterfsMixin({path: path}), // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod withReadOnly(readOnly):: self + __glusterfsMixin({readOnly: readOnly}), }, glusterfsType:: hidden.core.v1.glusterfsVolumeSource, // HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath hostPath:: { local __hostPathMixin(hostPath) = {hostPath+: hostPath}, mixinInstance(hostPath):: __hostPathMixin(hostPath), // Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath withPath(path):: self + __hostPathMixin({path: path}), // Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath withType(type):: self + __hostPathMixin({type: type}), }, hostPathType:: hidden.core.v1.hostPathVolumeSource, // ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md iscsi:: { local __iscsiMixin(iscsi) = {iscsi+: iscsi}, mixinInstance(iscsi):: __iscsiMixin(iscsi), // whether support iSCSI Discovery CHAP authentication withChapAuthDiscovery(chapAuthDiscovery):: self + __iscsiMixin({chapAuthDiscovery: chapAuthDiscovery}), // whether support iSCSI Session CHAP authentication withChapAuthSession(chapAuthSession):: self + __iscsiMixin({chapAuthSession: chapAuthSession}), // Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi withFsType(fsType):: self + __iscsiMixin({fsType: fsType}), // Custom iSCSI initiator name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. withInitiatorName(initiatorName):: self + __iscsiMixin({initiatorName: initiatorName}), // Target iSCSI Qualified Name. withIqn(iqn):: self + __iscsiMixin({iqn: iqn}), // Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport. withIscsiInterface(iscsiInterface):: self + __iscsiMixin({iscsiInterface: iscsiInterface}), // iSCSI target lun number. withLun(lun):: self + __iscsiMixin({lun: lun}), // iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). withPortals(portals):: self + if std.type(portals) == "array" then __iscsiMixin({portals: portals}) else __iscsiMixin({portals: [portals]}), // iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). withPortalsMixin(portals):: self + if std.type(portals) == "array" then __iscsiMixin({portals+: portals}) else __iscsiMixin({portals+: [portals]}), // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. withReadOnly(readOnly):: self + __iscsiMixin({readOnly: readOnly}), // CHAP secret for iSCSI target and initiator authentication secretRef:: { local __secretRefMixin(secretRef) = __iscsiMixin({secretRef+: secretRef}), mixinInstance(secretRef):: __secretRefMixin(secretRef), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __secretRefMixin({name: name}), }, secretRefType:: hidden.core.v1.localObjectReference, // iSCSI target portal. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). withTargetPortal(targetPortal):: self + __iscsiMixin({targetPortal: targetPortal}), }, iscsiType:: hidden.core.v1.iscsiVolumeSource, // NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs nfs:: { local __nfsMixin(nfs) = {nfs+: nfs}, mixinInstance(nfs):: __nfsMixin(nfs), // Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs withPath(path):: self + __nfsMixin({path: path}), // ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs withReadOnly(readOnly):: self + __nfsMixin({readOnly: readOnly}), // Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs withServer(server):: self + __nfsMixin({server: server}), }, nfsType:: hidden.core.v1.nfsVolumeSource, // PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims persistentVolumeClaim:: { local __persistentVolumeClaimMixin(persistentVolumeClaim) = {persistentVolumeClaim+: persistentVolumeClaim}, mixinInstance(persistentVolumeClaim):: __persistentVolumeClaimMixin(persistentVolumeClaim), // ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims withClaimName(claimName):: self + __persistentVolumeClaimMixin({claimName: claimName}), // Will force the ReadOnly setting in VolumeMounts. Default false. withReadOnly(readOnly):: self + __persistentVolumeClaimMixin({readOnly: readOnly}), }, persistentVolumeClaimType:: hidden.core.v1.persistentVolumeClaimVolumeSource, // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine photonPersistentDisk:: { local __photonPersistentDiskMixin(photonPersistentDisk) = {photonPersistentDisk+: photonPersistentDisk}, mixinInstance(photonPersistentDisk):: __photonPersistentDiskMixin(photonPersistentDisk), // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + __photonPersistentDiskMixin({fsType: fsType}), // ID that identifies Photon Controller persistent disk withPdId(pdId):: self + __photonPersistentDiskMixin({pdID: pdId}), }, photonPersistentDiskType:: hidden.core.v1.photonPersistentDiskVolumeSource, // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine portworxVolume:: { local __portworxVolumeMixin(portworxVolume) = {portworxVolume+: portworxVolume}, mixinInstance(portworxVolume):: __portworxVolumeMixin(portworxVolume), // FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + __portworxVolumeMixin({fsType: fsType}), // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + __portworxVolumeMixin({readOnly: readOnly}), // VolumeID uniquely identifies a Portworx volume withVolumeId(volumeId):: self + __portworxVolumeMixin({volumeID: volumeId}), }, portworxVolumeType:: hidden.core.v1.portworxVolumeSource, // Items for all in one resources secrets, configmaps, and downward API projected:: { local __projectedMixin(projected) = {projected+: projected}, mixinInstance(projected):: __projectedMixin(projected), // Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. withDefaultMode(defaultMode):: self + __projectedMixin({defaultMode: defaultMode}), // list of volume projections withSources(sources):: self + if std.type(sources) == "array" then __projectedMixin({sources: sources}) else __projectedMixin({sources: [sources]}), // list of volume projections withSourcesMixin(sources):: self + if std.type(sources) == "array" then __projectedMixin({sources+: sources}) else __projectedMixin({sources+: [sources]}), sourcesType:: hidden.core.v1.volumeProjection, }, projectedType:: hidden.core.v1.projectedVolumeSource, // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime quobyte:: { local __quobyteMixin(quobyte) = {quobyte+: quobyte}, mixinInstance(quobyte):: __quobyteMixin(quobyte), // Group to map volume access to Default is no group withGroup(group):: self + __quobyteMixin({group: group}), // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. withReadOnly(readOnly):: self + __quobyteMixin({readOnly: readOnly}), // Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes withRegistry(registry):: self + __quobyteMixin({registry: registry}), // User to map volume access to Defaults to serivceaccount user withUser(user):: self + __quobyteMixin({user: user}), // Volume is a string that references an already created Quobyte volume by name. withVolume(volume):: self + __quobyteMixin({volume: volume}), }, quobyteType:: hidden.core.v1.quobyteVolumeSource, // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md rbd:: { local __rbdMixin(rbd) = {rbd+: rbd}, mixinInstance(rbd):: __rbdMixin(rbd), // Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd withFsType(fsType):: self + __rbdMixin({fsType: fsType}), // The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withImage(image):: self + __rbdMixin({image: image}), // Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withKeyring(keyring):: self + __rbdMixin({keyring: keyring}), // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withMonitors(monitors):: self + if std.type(monitors) == "array" then __rbdMixin({monitors: monitors}) else __rbdMixin({monitors: [monitors]}), // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withMonitorsMixin(monitors):: self + if std.type(monitors) == "array" then __rbdMixin({monitors+: monitors}) else __rbdMixin({monitors+: [monitors]}), // The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withPool(pool):: self + __rbdMixin({pool: pool}), // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withReadOnly(readOnly):: self + __rbdMixin({readOnly: readOnly}), // SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it secretRef:: { local __secretRefMixin(secretRef) = __rbdMixin({secretRef+: secretRef}), mixinInstance(secretRef):: __secretRefMixin(secretRef), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __secretRefMixin({name: name}), }, secretRefType:: hidden.core.v1.localObjectReference, // The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it withUser(user):: self + __rbdMixin({user: user}), }, rbdType:: hidden.core.v1.rbdVolumeSource, // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. scaleIo:: { local __scaleIoMixin(scaleIo) = {scaleIO+: scaleIo}, mixinInstance(scaleIo):: __scaleIoMixin(scaleIo), // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + __scaleIoMixin({fsType: fsType}), // The host address of the ScaleIO API Gateway. withGateway(gateway):: self + __scaleIoMixin({gateway: gateway}), // The name of the Protection Domain for the configured storage (defaults to "default"). withProtectionDomain(protectionDomain):: self + __scaleIoMixin({protectionDomain: protectionDomain}), // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + __scaleIoMixin({readOnly: readOnly}), // SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. secretRef:: { local __secretRefMixin(secretRef) = __scaleIoMixin({secretRef+: secretRef}), mixinInstance(secretRef):: __secretRefMixin(secretRef), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __secretRefMixin({name: name}), }, secretRefType:: hidden.core.v1.localObjectReference, // Flag to enable/disable SSL communication with Gateway, default false withSslEnabled(sslEnabled):: self + __scaleIoMixin({sslEnabled: sslEnabled}), // Indicates whether the storage for a volume should be thick or thin (defaults to "thin"). withStorageMode(storageMode):: self + __scaleIoMixin({storageMode: storageMode}), // The Storage Pool associated with the protection domain (defaults to "default"). withStoragePool(storagePool):: self + __scaleIoMixin({storagePool: storagePool}), // The name of the storage system as configured in ScaleIO. withSystem(system):: self + __scaleIoMixin({system: system}), // The name of a volume already created in the ScaleIO system that is associated with this volume source. withVolumeName(volumeName):: self + __scaleIoMixin({volumeName: volumeName}), }, scaleIoType:: hidden.core.v1.scaleIoVolumeSource, // Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret secret:: { local __secretMixin(secret) = {secret+: secret}, mixinInstance(secret):: __secretMixin(secret), // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. withDefaultMode(defaultMode):: self + __secretMixin({defaultMode: defaultMode}), // If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. withItems(items):: self + if std.type(items) == "array" then __secretMixin({items: items}) else __secretMixin({items: [items]}), // If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. withItemsMixin(items):: self + if std.type(items) == "array" then __secretMixin({items+: items}) else __secretMixin({items+: [items]}), itemsType:: hidden.core.v1.keyToPath, // Specify whether the Secret or it's keys must be defined withOptional(optional):: self + __secretMixin({optional: optional}), // Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret withSecretName(secretName):: self + __secretMixin({secretName: secretName}), }, secretType:: hidden.core.v1.secretVolumeSource, // StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. storageos:: { local __storageosMixin(storageos) = {storageos+: storageos}, mixinInstance(storageos):: __storageosMixin(storageos), // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + __storageosMixin({fsType: fsType}), // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. withReadOnly(readOnly):: self + __storageosMixin({readOnly: readOnly}), // SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. secretRef:: { local __secretRefMixin(secretRef) = __storageosMixin({secretRef+: secretRef}), mixinInstance(secretRef):: __secretRefMixin(secretRef), // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __secretRefMixin({name: name}), }, secretRefType:: hidden.core.v1.localObjectReference, // VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. withVolumeName(volumeName):: self + __storageosMixin({volumeName: volumeName}), // VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. withVolumeNamespace(volumeNamespace):: self + __storageosMixin({volumeNamespace: volumeNamespace}), }, storageosType:: hidden.core.v1.storageOSVolumeSource, // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine vsphereVolume:: { local __vsphereVolumeMixin(vsphereVolume) = {vsphereVolume+: vsphereVolume}, mixinInstance(vsphereVolume):: __vsphereVolumeMixin(vsphereVolume), // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + __vsphereVolumeMixin({fsType: fsType}), // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. withStoragePolicyId(storagePolicyId):: self + __vsphereVolumeMixin({storagePolicyID: storagePolicyId}), // Storage Policy Based Management (SPBM) profile name. withStoragePolicyName(storagePolicyName):: self + __vsphereVolumeMixin({storagePolicyName: storagePolicyName}), // Path that identifies vSphere volume vmdk withVolumePath(volumePath):: self + __vsphereVolumeMixin({volumePath: volumePath}), }, vsphereVolumeType:: hidden.core.v1.vsphereVirtualDiskVolumeSource, }, }, // VolumeMount describes a mounting of a Volume within a container. volumeMount:: { new(name, mountPath, readOnly=false):: {} + self.withName(name) + self.withMountPath(mountPath) + self.withReadOnly(readOnly), // Path within the container at which the volume should be mounted. Must not contain ':'. withMountPath(mountPath):: self + {mountPath: mountPath}, // mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationHostToContainer is used. This field is alpha in 1.8 and can be reworked or removed in a future release. withMountPropagation(mountPropagation):: self + {mountPropagation: mountPropagation}, // This must match the Name of a Volume. withName(name):: self + {name: name}, // Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. withReadOnly(readOnly):: self + {readOnly: readOnly}, // Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). withSubPath(subPath):: self + {subPath: subPath}, mixin:: { }, }, // Projection that may be projected along with other supported volume types volumeProjection:: { new():: {}, mixin:: { // information about the configMap data to project configMap:: { local __configMapMixin(configMap) = {configMap+: configMap}, mixinInstance(configMap):: __configMapMixin(configMap), // If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. withItems(items):: self + if std.type(items) == "array" then __configMapMixin({items: items}) else __configMapMixin({items: [items]}), // If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. withItemsMixin(items):: self + if std.type(items) == "array" then __configMapMixin({items+: items}) else __configMapMixin({items+: [items]}), itemsType:: hidden.core.v1.keyToPath, // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __configMapMixin({name: name}), // Specify whether the ConfigMap or it's keys must be defined withOptional(optional):: self + __configMapMixin({optional: optional}), }, configMapType:: hidden.core.v1.configMapProjection, // information about the downwardAPI data to project downwardApi:: { local __downwardApiMixin(downwardApi) = {downwardAPI+: downwardApi}, mixinInstance(downwardApi):: __downwardApiMixin(downwardApi), // Items is a list of DownwardAPIVolume file withItems(items):: self + if std.type(items) == "array" then __downwardApiMixin({items: items}) else __downwardApiMixin({items: [items]}), // Items is a list of DownwardAPIVolume file withItemsMixin(items):: self + if std.type(items) == "array" then __downwardApiMixin({items+: items}) else __downwardApiMixin({items+: [items]}), itemsType:: hidden.core.v1.downwardApiVolumeFile, }, downwardApiType:: hidden.core.v1.downwardApiProjection, // information about the secret data to project secret:: { local __secretMixin(secret) = {secret+: secret}, mixinInstance(secret):: __secretMixin(secret), // If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. withItems(items):: self + if std.type(items) == "array" then __secretMixin({items: items}) else __secretMixin({items: [items]}), // If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. withItemsMixin(items):: self + if std.type(items) == "array" then __secretMixin({items+: items}) else __secretMixin({items+: [items]}), itemsType:: hidden.core.v1.keyToPath, // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names withName(name):: self + __secretMixin({name: name}), // Specify whether the Secret or its key must be defined withOptional(optional):: self + __secretMixin({optional: optional}), }, secretType:: hidden.core.v1.secretProjection, }, }, // Represents a vSphere volume resource. vsphereVirtualDiskVolumeSource:: { new():: {}, // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. withFsType(fsType):: self + {fsType: fsType}, // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. withStoragePolicyId(storagePolicyId):: self + {storagePolicyID: storagePolicyId}, // Storage Policy Based Management (SPBM) profile name. withStoragePolicyName(storagePolicyName):: self + {storagePolicyName: storagePolicyName}, // Path that identifies vSphere volume vmdk withVolumePath(volumePath):: self + {volumePath: volumePath}, mixin:: { }, }, // The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) weightedPodAffinityTerm:: { new():: {}, // weight associated with matching the corresponding podAffinityTerm, in the range 1-100. withWeight(weight):: self + {weight: weight}, mixin:: { // Required. A pod affinity term, associated with the corresponding weight. podAffinityTerm:: { local __podAffinityTermMixin(podAffinityTerm) = {podAffinityTerm+: podAffinityTerm}, mixinInstance(podAffinityTerm):: __podAffinityTermMixin(podAffinityTerm), // A label query over a set of resources, in this case pods. labelSelector:: { local __labelSelectorMixin(labelSelector) = __podAffinityTermMixin({labelSelector+: labelSelector}), mixinInstance(labelSelector):: __labelSelectorMixin(labelSelector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __labelSelectorMixin({matchExpressions: matchExpressions}) else __labelSelectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __labelSelectorMixin({matchExpressions+: matchExpressions}) else __labelSelectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __labelSelectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __labelSelectorMixin({matchLabels+: matchLabels}), }, labelSelectorType:: hidden.meta.v1.labelSelector, // namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" withNamespaces(namespaces):: self + if std.type(namespaces) == "array" then __podAffinityTermMixin({namespaces: namespaces}) else __podAffinityTermMixin({namespaces: [namespaces]}), // namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" withNamespacesMixin(namespaces):: self + if std.type(namespaces) == "array" then __podAffinityTermMixin({namespaces+: namespaces}) else __podAffinityTermMixin({namespaces+: [namespaces]}), // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as "all topologies" ("all topologies" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed. withTopologyKey(topologyKey):: self + __podAffinityTermMixin({topologyKey: topologyKey}), }, podAffinityTermType:: hidden.core.v1.podAffinityTerm, }, }, }, }, extensions:: { v1beta1:: { local apiVersion = {apiVersion: "extensions/v1beta1"}, // defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined. allowedHostPath:: { new():: {}, // is the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path. // // Examples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo` withPathPrefix(pathPrefix):: self + {pathPrefix: pathPrefix}, mixin:: { }, }, // DaemonSetSpec is the specification of a daemon set. daemonSetSpec:: { new():: {}, // The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready). withMinReadySeconds(minReadySeconds):: self + {minReadySeconds: minReadySeconds}, // The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. withRevisionHistoryLimit(revisionHistoryLimit):: self + {revisionHistoryLimit: revisionHistoryLimit}, mixin:: { // A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors selector:: { local __selectorMixin(selector) = {selector+: selector}, mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template template:: { local __templateMixin(template) = {template+: template}, mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, // An update strategy to replace existing DaemonSet pods with new pods. updateStrategy:: { local __updateStrategyMixin(updateStrategy) = {updateStrategy+: updateStrategy}, mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), // Rolling update config params. Present only if type = "RollingUpdate". rollingUpdate:: { local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({rollingUpdate+: rollingUpdate}), mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), // The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), }, rollingUpdateType:: hidden.extensions.v1beta1.rollingUpdateDaemonSet, // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is OnDelete. withType(type):: self + __updateStrategyMixin({type: type}), }, updateStrategyType:: hidden.extensions.v1beta1.daemonSetUpdateStrategy, }, }, // DaemonSetStatus represents the current status of a daemon set. daemonSetStatus:: { new():: {}, // Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision. withCollisionCount(collisionCount):: self + {collisionCount: collisionCount}, // The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ withCurrentNumberScheduled(currentNumberScheduled):: self + {currentNumberScheduled: currentNumberScheduled}, // The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ withDesiredNumberScheduled(desiredNumberScheduled):: self + {desiredNumberScheduled: desiredNumberScheduled}, // The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds) withNumberAvailable(numberAvailable):: self + {numberAvailable: numberAvailable}, // The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ withNumberMisscheduled(numberMisscheduled):: self + {numberMisscheduled: numberMisscheduled}, // The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready. withNumberReady(numberReady):: self + {numberReady: numberReady}, // The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds) withNumberUnavailable(numberUnavailable):: self + {numberUnavailable: numberUnavailable}, // The most recent generation observed by the daemon set controller. withObservedGeneration(observedGeneration):: self + {observedGeneration: observedGeneration}, // The total number of nodes that are running updated daemon pod withUpdatedNumberScheduled(updatedNumberScheduled):: self + {updatedNumberScheduled: updatedNumberScheduled}, mixin:: { }, }, // daemonSetUpdateStrategy:: { new():: {}, // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is OnDelete. withType(type):: self + {type: type}, mixin:: { // Rolling update config params. Present only if type = "RollingUpdate". rollingUpdate:: { local __rollingUpdateMixin(rollingUpdate) = {rollingUpdate+: rollingUpdate}, mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), // The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), }, rollingUpdateType:: hidden.extensions.v1beta1.rollingUpdateDaemonSet, }, }, // DeploymentCondition describes the state of a deployment at a certain point. deploymentCondition:: { new():: {}, // A human readable message indicating details about the transition. withMessage(message):: self + {message: message}, // The reason for the condition's last transition. withReason(reason):: self + {reason: reason}, // Type of deployment condition. withType(type):: self + {type: type}, mixin:: { // Last time the condition transitioned from one status to another. lastTransitionTime:: { local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), }, lastTransitionTimeType:: hidden.meta.v1.time, // The last time this condition was updated. lastUpdateTime:: { local __lastUpdateTimeMixin(lastUpdateTime) = {lastUpdateTime+: lastUpdateTime}, mixinInstance(lastUpdateTime):: __lastUpdateTimeMixin(lastUpdateTime), }, lastUpdateTimeType:: hidden.meta.v1.time, }, }, // DeploymentSpec is the specification of the desired behavior of the Deployment. deploymentSpec:: { new():: {}, // Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) withMinReadySeconds(minReadySeconds):: self + {minReadySeconds: minReadySeconds}, // Indicates that the deployment is paused and will not be processed by the deployment controller. withPaused(paused):: self + {paused: paused}, // The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. This is not set by default. withProgressDeadlineSeconds(progressDeadlineSeconds):: self + {progressDeadlineSeconds: progressDeadlineSeconds}, // Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. withReplicas(replicas):: self + {replicas: replicas}, // The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. withRevisionHistoryLimit(revisionHistoryLimit):: self + {revisionHistoryLimit: revisionHistoryLimit}, mixin:: { // DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done. rollbackTo:: { local __rollbackToMixin(rollbackTo) = {rollbackTo+: rollbackTo}, mixinInstance(rollbackTo):: __rollbackToMixin(rollbackTo), // The revision to rollback to. If set to 0, rollback to the last revision. withRevision(revision):: self + __rollbackToMixin({revision: revision}), }, rollbackToType:: hidden.extensions.v1beta1.rollbackConfig, // Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. selector:: { local __selectorMixin(selector) = {selector+: selector}, mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // The deployment strategy to use to replace existing pods with new ones. strategy:: { local __strategyMixin(strategy) = {strategy+: strategy}, mixinInstance(strategy):: __strategyMixin(strategy), // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. rollingUpdate:: { local __rollingUpdateMixin(rollingUpdate) = __strategyMixin({rollingUpdate+: rollingUpdate}), mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), // The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. By default, a value of 1 is used. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. withMaxSurge(maxSurge):: __rollingUpdateMixin({maxSurge: maxSurge}), // The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), }, rollingUpdateType:: hidden.extensions.v1beta1.rollingUpdateDeployment, // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. withType(type):: self + __strategyMixin({type: type}), }, strategyType:: hidden.extensions.v1beta1.deploymentStrategy, // Template describes the pods that will be created. template:: { local __templateMixin(template) = {template+: template}, mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, }, }, // DeploymentStatus is the most recently observed status of the Deployment. deploymentStatus:: { new():: {}, // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. withAvailableReplicas(availableReplicas):: self + {availableReplicas: availableReplicas}, // Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet. withCollisionCount(collisionCount):: self + {collisionCount: collisionCount}, // Represents the latest available observations of a deployment's current state. withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, // Represents the latest available observations of a deployment's current state. withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, conditionsType:: hidden.extensions.v1beta1.deploymentCondition, // The generation observed by the deployment controller. withObservedGeneration(observedGeneration):: self + {observedGeneration: observedGeneration}, // Total number of ready pods targeted by this deployment. withReadyReplicas(readyReplicas):: self + {readyReplicas: readyReplicas}, // Total number of non-terminated pods targeted by this deployment (their labels match the selector). withReplicas(replicas):: self + {replicas: replicas}, // Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created. withUnavailableReplicas(unavailableReplicas):: self + {unavailableReplicas: unavailableReplicas}, // Total number of non-terminated pods targeted by this deployment that have the desired template spec. withUpdatedReplicas(updatedReplicas):: self + {updatedReplicas: updatedReplicas}, mixin:: { }, }, // DeploymentStrategy describes how to replace existing pods with new ones. deploymentStrategy:: { new():: {}, // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. withType(type):: self + {type: type}, mixin:: { // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. rollingUpdate:: { local __rollingUpdateMixin(rollingUpdate) = {rollingUpdate+: rollingUpdate}, mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), // The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. By default, a value of 1 is used. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. withMaxSurge(maxSurge):: __rollingUpdateMixin({maxSurge: maxSurge}), // The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), }, rollingUpdateType:: hidden.extensions.v1beta1.rollingUpdateDeployment, }, }, // FSGroupStrategyOptions defines the strategy type and options used to create the strategy. fsGroupStrategyOptions:: { new():: {}, // Ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end. withRanges(ranges):: self + if std.type(ranges) == "array" then {ranges: ranges} else {ranges: [ranges]}, // Ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end. withRangesMixin(ranges):: self + if std.type(ranges) == "array" then {ranges+: ranges} else {ranges+: [ranges]}, rangesType:: hidden.extensions.v1beta1.idRange, // Rule is the strategy that will dictate what FSGroup is used in the SecurityContext. withRule(rule):: self + {rule: rule}, mixin:: { }, }, // HTTPIngressPath associates a path regex with a backend. Incoming urls matching the path are forwarded to the backend. httpIngressPath:: { new():: {}, // Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional "path" part of a URL as defined by RFC 3986. Paths must begin with a '/'. If unspecified, the path defaults to a catch all sending traffic to the backend. withPath(path):: self + {path: path}, mixin:: { // Backend defines the referenced service endpoint to which the traffic will be forwarded to. backend:: { local __backendMixin(backend) = {backend+: backend}, mixinInstance(backend):: __backendMixin(backend), // Specifies the name of the referenced service. withServiceName(serviceName):: self + __backendMixin({serviceName: serviceName}), // Specifies the port of the referenced service. withServicePort(servicePort):: __backendMixin({servicePort: servicePort}), }, backendType:: hidden.extensions.v1beta1.ingressBackend, }, }, // HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'. httpIngressRuleValue:: { new():: {}, // A collection of paths that map requests to backends. withPaths(paths):: self + if std.type(paths) == "array" then {paths: paths} else {paths: [paths]}, // A collection of paths that map requests to backends. withPathsMixin(paths):: self + if std.type(paths) == "array" then {paths+: paths} else {paths+: [paths]}, pathsType:: hidden.extensions.v1beta1.httpIngressPath, mixin:: { }, }, // Host Port Range defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined. hostPortRange:: { new():: {}, // max is the end of the range, inclusive. withMax(max):: self + {max: max}, // min is the start of the range, inclusive. withMin(min):: self + {min: min}, mixin:: { }, }, // ID Range provides a min/max of an allowed range of IDs. idRange:: { new():: {}, // Max is the end of the range, inclusive. withMax(max):: self + {max: max}, // Min is the start of the range, inclusive. withMin(min):: self + {min: min}, mixin:: { }, }, // IPBlock describes a particular CIDR (Ex. "192.168.1.1/24") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule. ipBlock:: { new():: {}, // CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" withCidr(cidr):: self + {cidr: cidr}, // Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range withExcept(except):: self + if std.type(except) == "array" then {except: except} else {except: [except]}, // Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range withExceptMixin(except):: self + if std.type(except) == "array" then {except+: except} else {except+: [except]}, mixin:: { }, }, // IngressBackend describes all endpoints for a given service and port. ingressBackend:: { new():: {}, // Specifies the name of the referenced service. withServiceName(serviceName):: self + {serviceName: serviceName}, // Specifies the port of the referenced service. withServicePort(servicePort):: {servicePort: servicePort}, mixin:: { }, }, // IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue. ingressRule:: { new():: {}, // Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the "host" part of the URI as defined in the RFC: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the // IP in the Spec of the parent Ingress. // 2. The `:` delimiter is not respected because ports are not allowed. // Currently the port of an Ingress is implicitly :80 for http and // :443 for https. // Both these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue. withHost(host):: self + {host: host}, mixin:: { // http:: { local __httpMixin(http) = {http+: http}, mixinInstance(http):: __httpMixin(http), // A collection of paths that map requests to backends. withPaths(paths):: self + if std.type(paths) == "array" then __httpMixin({paths: paths}) else __httpMixin({paths: [paths]}), // A collection of paths that map requests to backends. withPathsMixin(paths):: self + if std.type(paths) == "array" then __httpMixin({paths+: paths}) else __httpMixin({paths+: [paths]}), pathsType:: hidden.extensions.v1beta1.httpIngressPath, }, httpType:: hidden.extensions.v1beta1.httpIngressRuleValue, }, }, // IngressSpec describes the Ingress the user wishes to exist. ingressSpec:: { new():: {}, // A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend. withRules(rules):: self + if std.type(rules) == "array" then {rules: rules} else {rules: [rules]}, // A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend. withRulesMixin(rules):: self + if std.type(rules) == "array" then {rules+: rules} else {rules+: [rules]}, rulesType:: hidden.extensions.v1beta1.ingressRule, // TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI. withTls(tls):: self + if std.type(tls) == "array" then {tls: tls} else {tls: [tls]}, // TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI. withTlsMixin(tls):: self + if std.type(tls) == "array" then {tls+: tls} else {tls+: [tls]}, tlsType:: hidden.extensions.v1beta1.ingressTls, mixin:: { // A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default. backend:: { local __backendMixin(backend) = {backend+: backend}, mixinInstance(backend):: __backendMixin(backend), // Specifies the name of the referenced service. withServiceName(serviceName):: self + __backendMixin({serviceName: serviceName}), // Specifies the port of the referenced service. withServicePort(servicePort):: __backendMixin({servicePort: servicePort}), }, backendType:: hidden.extensions.v1beta1.ingressBackend, }, }, // IngressStatus describe the current state of the Ingress. ingressStatus:: { new():: {}, mixin:: { // LoadBalancer contains the current status of the load-balancer. loadBalancer:: { local __loadBalancerMixin(loadBalancer) = {loadBalancer+: loadBalancer}, mixinInstance(loadBalancer):: __loadBalancerMixin(loadBalancer), // Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. withIngress(ingress):: self + if std.type(ingress) == "array" then __loadBalancerMixin({ingress: ingress}) else __loadBalancerMixin({ingress: [ingress]}), // Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. withIngressMixin(ingress):: self + if std.type(ingress) == "array" then __loadBalancerMixin({ingress+: ingress}) else __loadBalancerMixin({ingress+: [ingress]}), ingressType:: hidden.core.v1.loadBalancerIngress, }, loadBalancerType:: hidden.core.v1.loadBalancerStatus, }, }, // IngressTLS describes the transport layer security associated with an Ingress. ingressTls:: { new():: {}, // Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified. withHosts(hosts):: self + if std.type(hosts) == "array" then {hosts: hosts} else {hosts: [hosts]}, // Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified. withHostsMixin(hosts):: self + if std.type(hosts) == "array" then {hosts+: hosts} else {hosts+: [hosts]}, // SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL routing based on SNI hostname alone. If the SNI host in a listener conflicts with the "Host" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing. withSecretName(secretName):: self + {secretName: secretName}, mixin:: { }, }, // NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8 networkPolicyEgressRule:: { new():: {}, // List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list. withPorts(ports):: self + if std.type(ports) == "array" then {ports: ports} else {ports: [ports]}, // List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list. withPortsMixin(ports):: self + if std.type(ports) == "array" then {ports+: ports} else {ports+: [ports]}, portsType:: hidden.extensions.v1beta1.networkPolicyPort, // List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list. withTo(to):: self + if std.type(to) == "array" then {to: to} else {to: [to]}, // List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list. withToMixin(to):: self + if std.type(to) == "array" then {to+: to} else {to+: [to]}, toType:: hidden.extensions.v1beta1.networkPolicyPeer, mixin:: { }, }, // This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from. networkPolicyIngressRule:: { new():: {}, // List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list. withFrom(from):: self + if std.type(from) == "array" then {from: from} else {from: [from]}, // List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list. withFromMixin(from):: self + if std.type(from) == "array" then {from+: from} else {from+: [from]}, fromType:: hidden.extensions.v1beta1.networkPolicyPeer, // List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list. withPorts(ports):: self + if std.type(ports) == "array" then {ports: ports} else {ports: [ports]}, // List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list. withPortsMixin(ports):: self + if std.type(ports) == "array" then {ports+: ports} else {ports+: [ports]}, portsType:: hidden.extensions.v1beta1.networkPolicyPort, mixin:: { }, }, // networkPolicyPeer:: { new():: {}, mixin:: { // IPBlock defines policy on a particular IPBlock ipBlock:: { local __ipBlockMixin(ipBlock) = {ipBlock+: ipBlock}, mixinInstance(ipBlock):: __ipBlockMixin(ipBlock), // CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" withCidr(cidr):: self + __ipBlockMixin({cidr: cidr}), // Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range withExcept(except):: self + if std.type(except) == "array" then __ipBlockMixin({except: except}) else __ipBlockMixin({except: [except]}), // Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range withExceptMixin(except):: self + if std.type(except) == "array" then __ipBlockMixin({except+: except}) else __ipBlockMixin({except+: [except]}), }, ipBlockType:: hidden.extensions.v1beta1.ipBlock, // Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces. namespaceSelector:: { local __namespaceSelectorMixin(namespaceSelector) = {namespaceSelector+: namespaceSelector}, mixinInstance(namespaceSelector):: __namespaceSelectorMixin(namespaceSelector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __namespaceSelectorMixin({matchExpressions: matchExpressions}) else __namespaceSelectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __namespaceSelectorMixin({matchExpressions+: matchExpressions}) else __namespaceSelectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __namespaceSelectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __namespaceSelectorMixin({matchLabels+: matchLabels}), }, namespaceSelectorType:: hidden.meta.v1.labelSelector, // This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace. podSelector:: { local __podSelectorMixin(podSelector) = {podSelector+: podSelector}, mixinInstance(podSelector):: __podSelectorMixin(podSelector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions: matchExpressions}) else __podSelectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions+: matchExpressions}) else __podSelectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __podSelectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __podSelectorMixin({matchLabels+: matchLabels}), }, podSelectorType:: hidden.meta.v1.labelSelector, }, }, // networkPolicyPort:: { new():: {}, // If specified, the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched. withPort(port):: {port: port}, // Optional. The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP. withProtocol(protocol):: self + {protocol: protocol}, mixin:: { }, }, // networkPolicySpec:: { new():: {}, // List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8 withEgress(egress):: self + if std.type(egress) == "array" then {egress: egress} else {egress: [egress]}, // List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8 withEgressMixin(egress):: self + if std.type(egress) == "array" then {egress+: egress} else {egress+: [egress]}, egressType:: hidden.extensions.v1beta1.networkPolicyEgressRule, // List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default). withIngress(ingress):: self + if std.type(ingress) == "array" then {ingress: ingress} else {ingress: [ingress]}, // List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default). withIngressMixin(ingress):: self + if std.type(ingress) == "array" then {ingress+: ingress} else {ingress+: [ingress]}, ingressType:: hidden.extensions.v1beta1.networkPolicyIngressRule, // List of rule types that the NetworkPolicy relates to. Valid options are Ingress, Egress, or Ingress,Egress. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 withPolicyTypes(policyTypes):: self + if std.type(policyTypes) == "array" then {policyTypes: policyTypes} else {policyTypes: [policyTypes]}, // List of rule types that the NetworkPolicy relates to. Valid options are Ingress, Egress, or Ingress,Egress. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 withPolicyTypesMixin(policyTypes):: self + if std.type(policyTypes) == "array" then {policyTypes+: policyTypes} else {policyTypes+: [policyTypes]}, mixin:: { // Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace. podSelector:: { local __podSelectorMixin(podSelector) = {podSelector+: podSelector}, mixinInstance(podSelector):: __podSelectorMixin(podSelector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions: matchExpressions}) else __podSelectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions+: matchExpressions}) else __podSelectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __podSelectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __podSelectorMixin({matchLabels+: matchLabels}), }, podSelectorType:: hidden.meta.v1.labelSelector, }, }, // Pod Security Policy Spec defines the policy enforced. podSecurityPolicySpec:: { new():: {}, // AllowPrivilegeEscalation determines if a pod can request to allow privilege escalation. withAllowPrivilegeEscalation(allowPrivilegeEscalation):: self + {allowPrivilegeEscalation: allowPrivilegeEscalation}, // AllowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities. withAllowedCapabilities(allowedCapabilities):: self + if std.type(allowedCapabilities) == "array" then {allowedCapabilities: allowedCapabilities} else {allowedCapabilities: [allowedCapabilities]}, // AllowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities. withAllowedCapabilitiesMixin(allowedCapabilities):: self + if std.type(allowedCapabilities) == "array" then {allowedCapabilities+: allowedCapabilities} else {allowedCapabilities+: [allowedCapabilities]}, // is a white list of allowed host paths. Empty indicates that all host paths may be used. withAllowedHostPaths(allowedHostPaths):: self + if std.type(allowedHostPaths) == "array" then {allowedHostPaths: allowedHostPaths} else {allowedHostPaths: [allowedHostPaths]}, // is a white list of allowed host paths. Empty indicates that all host paths may be used. withAllowedHostPathsMixin(allowedHostPaths):: self + if std.type(allowedHostPaths) == "array" then {allowedHostPaths+: allowedHostPaths} else {allowedHostPaths+: [allowedHostPaths]}, allowedHostPathsType:: hidden.extensions.v1beta1.allowedHostPath, // DefaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capabiility in both DefaultAddCapabilities and RequiredDropCapabilities. withDefaultAddCapabilities(defaultAddCapabilities):: self + if std.type(defaultAddCapabilities) == "array" then {defaultAddCapabilities: defaultAddCapabilities} else {defaultAddCapabilities: [defaultAddCapabilities]}, // DefaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capabiility in both DefaultAddCapabilities and RequiredDropCapabilities. withDefaultAddCapabilitiesMixin(defaultAddCapabilities):: self + if std.type(defaultAddCapabilities) == "array" then {defaultAddCapabilities+: defaultAddCapabilities} else {defaultAddCapabilities+: [defaultAddCapabilities]}, // DefaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process. withDefaultAllowPrivilegeEscalation(defaultAllowPrivilegeEscalation):: self + {defaultAllowPrivilegeEscalation: defaultAllowPrivilegeEscalation}, // hostIPC determines if the policy allows the use of HostIPC in the pod spec. withHostIpc(hostIpc):: self + {hostIPC: hostIpc}, // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec. withHostNetwork(hostNetwork):: self + {hostNetwork: hostNetwork}, // hostPID determines if the policy allows the use of HostPID in the pod spec. withHostPid(hostPid):: self + {hostPID: hostPid}, // hostPorts determines which host port ranges are allowed to be exposed. withHostPorts(hostPorts):: self + if std.type(hostPorts) == "array" then {hostPorts: hostPorts} else {hostPorts: [hostPorts]}, // hostPorts determines which host port ranges are allowed to be exposed. withHostPortsMixin(hostPorts):: self + if std.type(hostPorts) == "array" then {hostPorts+: hostPorts} else {hostPorts+: [hostPorts]}, hostPortsType:: hidden.extensions.v1beta1.hostPortRange, // privileged determines if a pod can request to be run as privileged. withPrivileged(privileged):: self + {privileged: privileged}, // ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to. withReadOnlyRootFilesystem(readOnlyRootFilesystem):: self + {readOnlyRootFilesystem: readOnlyRootFilesystem}, // RequiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added. withRequiredDropCapabilities(requiredDropCapabilities):: self + if std.type(requiredDropCapabilities) == "array" then {requiredDropCapabilities: requiredDropCapabilities} else {requiredDropCapabilities: [requiredDropCapabilities]}, // RequiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added. withRequiredDropCapabilitiesMixin(requiredDropCapabilities):: self + if std.type(requiredDropCapabilities) == "array" then {requiredDropCapabilities+: requiredDropCapabilities} else {requiredDropCapabilities+: [requiredDropCapabilities]}, // volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used. withVolumes(volumes):: self + if std.type(volumes) == "array" then {volumes: volumes} else {volumes: [volumes]}, // volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used. withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then {volumes+: volumes} else {volumes+: [volumes]}, mixin:: { // FSGroup is the strategy that will dictate what fs group is used by the SecurityContext. fsGroup:: { local __fsGroupMixin(fsGroup) = {fsGroup+: fsGroup}, mixinInstance(fsGroup):: __fsGroupMixin(fsGroup), // Ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end. withRanges(ranges):: self + if std.type(ranges) == "array" then __fsGroupMixin({ranges: ranges}) else __fsGroupMixin({ranges: [ranges]}), // Ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end. withRangesMixin(ranges):: self + if std.type(ranges) == "array" then __fsGroupMixin({ranges+: ranges}) else __fsGroupMixin({ranges+: [ranges]}), rangesType:: hidden.extensions.v1beta1.idRange, // Rule is the strategy that will dictate what FSGroup is used in the SecurityContext. withRule(rule):: self + __fsGroupMixin({rule: rule}), }, fsGroupType:: hidden.extensions.v1beta1.fsGroupStrategyOptions, // runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set. runAsUser:: { local __runAsUserMixin(runAsUser) = {runAsUser+: runAsUser}, mixinInstance(runAsUser):: __runAsUserMixin(runAsUser), // Ranges are the allowed ranges of uids that may be used. withRanges(ranges):: self + if std.type(ranges) == "array" then __runAsUserMixin({ranges: ranges}) else __runAsUserMixin({ranges: [ranges]}), // Ranges are the allowed ranges of uids that may be used. withRangesMixin(ranges):: self + if std.type(ranges) == "array" then __runAsUserMixin({ranges+: ranges}) else __runAsUserMixin({ranges+: [ranges]}), rangesType:: hidden.extensions.v1beta1.idRange, // Rule is the strategy that will dictate the allowable RunAsUser values that may be set. withRule(rule):: self + __runAsUserMixin({rule: rule}), }, runAsUserType:: hidden.extensions.v1beta1.runAsUserStrategyOptions, // seLinux is the strategy that will dictate the allowable labels that may be set. seLinux:: { local __seLinuxMixin(seLinux) = {seLinux+: seLinux}, mixinInstance(seLinux):: __seLinuxMixin(seLinux), // type is the strategy that will dictate the allowable labels that may be set. withRule(rule):: self + __seLinuxMixin({rule: rule}), // seLinuxOptions required to run as; required for MustRunAs More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __seLinuxMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, }, seLinuxType:: hidden.extensions.v1beta1.seLinuxStrategyOptions, // SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext. supplementalGroups:: { local __supplementalGroupsMixin(supplementalGroups) = {supplementalGroups+: supplementalGroups}, mixinInstance(supplementalGroups):: __supplementalGroupsMixin(supplementalGroups), // Ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end. withRanges(ranges):: self + if std.type(ranges) == "array" then __supplementalGroupsMixin({ranges: ranges}) else __supplementalGroupsMixin({ranges: [ranges]}), // Ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end. withRangesMixin(ranges):: self + if std.type(ranges) == "array" then __supplementalGroupsMixin({ranges+: ranges}) else __supplementalGroupsMixin({ranges+: [ranges]}), rangesType:: hidden.extensions.v1beta1.idRange, // Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. withRule(rule):: self + __supplementalGroupsMixin({rule: rule}), }, supplementalGroupsType:: hidden.extensions.v1beta1.supplementalGroupsStrategyOptions, }, }, // ReplicaSetCondition describes the state of a replica set at a certain point. replicaSetCondition:: { new():: {}, // A human readable message indicating details about the transition. withMessage(message):: self + {message: message}, // The reason for the condition's last transition. withReason(reason):: self + {reason: reason}, // Type of replica set condition. withType(type):: self + {type: type}, mixin:: { // The last time the condition transitioned from one status to another. lastTransitionTime:: { local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), }, lastTransitionTimeType:: hidden.meta.v1.time, }, }, // ReplicaSetSpec is the specification of a ReplicaSet. replicaSetSpec:: { new():: {}, // Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) withMinReadySeconds(minReadySeconds):: self + {minReadySeconds: minReadySeconds}, // Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller withReplicas(replicas):: self + {replicas: replicas}, mixin:: { // Selector is a label query over pods that should match the replica count. If the selector is empty, it is defaulted to the labels present on the pod template. Label keys and values that must match in order to be controlled by this replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors selector:: { local __selectorMixin(selector) = {selector+: selector}, mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, // Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template template:: { local __templateMixin(template) = {template+: template}, mixinInstance(template):: __templateMixin(template), // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metadata:: { local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), mixinInstance(metadata):: __metadataMixin(metadata), // 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 withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), // 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 withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: annotations}), // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [finalizers]}), // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, // 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 withLabels(labels):: self + __metadataMixin({labels: labels}), // 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 withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), // 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 withName(name):: self + __metadataMixin({name: name}), // Namespace defines the space within 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 withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), }, metadataType:: hidden.meta.v1.objectMeta, // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status spec:: { local __specMixin(spec) = __templateMixin({spec+: spec}), mixinInstance(spec):: __specMixin(spec), // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), // If specified, the pod's scheduling constraints affinity:: { local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), mixinInstance(affinity):: __affinityMixin(affinity), // Describes node affinity scheduling rules for the pod. nodeAffinity:: { local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. requiredDuringSchedulingIgnoredDuringExecution:: { local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), // Required. A list of node selector terms. The terms are ORed. withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, }, requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, }, nodeAffinityType:: hidden.core.v1.nodeAffinity, // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). podAffinity:: { local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAffinityType:: hidden.core.v1.podAffinity, // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). podAntiAffinity:: { local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, }, podAntiAffinityType:: hidden.core.v1.podAntiAffinity, }, affinityType:: hidden.core.v1.affinity, // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), // List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), containersType:: hidden.core.v1.container, // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), hostAliasesType:: hidden.core.v1.hostAlias, // Use the host's ipc namespace. Optional: Default to false. withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), // Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), // Use the host's pid namespace. Optional: Default to false. withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. withHostname(hostname):: self + __specMixin({hostname: hostname}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), imagePullSecretsType:: hidden.core.v1.localObjectReference, // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), // List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), initContainersType:: hidden.core.v1.container, // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. withNodeName(nodeName):: self + __specMixin({nodeName: nodeName}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), // NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), // The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. withPriority(priority):: self + __specMixin({priority: priority}), // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), // Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. withSchedulerName(schedulerName):: self + __specMixin({schedulerName: schedulerName}), // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. securityContext:: { local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), mixinInstance(securityContext):: __securityContextMixin(securityContext), // A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: // // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), // Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: runAsNonRoot}), // The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), // The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, // 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. withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), // 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. withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), }, securityContextType:: hidden.core.v1.podSecurityContext, // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: serviceAccount}), // ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. withSubdomain(subdomain):: self + __specMixin({subdomain: subdomain}), // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), // If specified, the pod's tolerations. withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), // If specified, the pod's tolerations. withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), tolerationsType:: hidden.core.v1.toleration, // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), volumesType:: hidden.core.v1.volume, }, specType:: hidden.core.v1.podSpec, }, templateType:: hidden.core.v1.podTemplateSpec, }, }, // ReplicaSetStatus represents the current status of a ReplicaSet. replicaSetStatus:: { new():: {}, // The number of available replicas (ready for at least minReadySeconds) for this replica set. withAvailableReplicas(availableReplicas):: self + {availableReplicas: availableReplicas}, // Represents the latest available observations of a replica set's current state. withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, // Represents the latest available observations of a replica set's current state. withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, conditionsType:: hidden.extensions.v1beta1.replicaSetCondition, // The number of pods that have labels matching the labels of the pod template of the replicaset. withFullyLabeledReplicas(fullyLabeledReplicas):: self + {fullyLabeledReplicas: fullyLabeledReplicas}, // ObservedGeneration reflects the generation of the most recently observed ReplicaSet. withObservedGeneration(observedGeneration):: self + {observedGeneration: observedGeneration}, // The number of ready replicas for this replica set. withReadyReplicas(readyReplicas):: self + {readyReplicas: readyReplicas}, // Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller withReplicas(replicas):: self + {replicas: replicas}, mixin:: { }, }, // DEPRECATED. rollbackConfig:: { new():: {}, // The revision to rollback to. If set to 0, rollback to the last revision. withRevision(revision):: self + {revision: revision}, mixin:: { }, }, // Spec to control the desired behavior of daemon set rolling update. rollingUpdateDaemonSet:: { new():: {}, // The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. withMaxUnavailable(maxUnavailable):: {maxUnavailable: maxUnavailable}, mixin:: { }, }, // Spec to control the desired behavior of rolling update. rollingUpdateDeployment:: { new():: {}, // The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. By default, a value of 1 is used. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. withMaxSurge(maxSurge):: {maxSurge: maxSurge}, // The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. withMaxUnavailable(maxUnavailable):: {maxUnavailable: maxUnavailable}, mixin:: { }, }, // Run A sUser Strategy Options defines the strategy type and any options used to create the strategy. runAsUserStrategyOptions:: { new():: {}, // Ranges are the allowed ranges of uids that may be used. withRanges(ranges):: self + if std.type(ranges) == "array" then {ranges: ranges} else {ranges: [ranges]}, // Ranges are the allowed ranges of uids that may be used. withRangesMixin(ranges):: self + if std.type(ranges) == "array" then {ranges+: ranges} else {ranges+: [ranges]}, rangesType:: hidden.extensions.v1beta1.idRange, // Rule is the strategy that will dictate the allowable RunAsUser values that may be set. withRule(rule):: self + {rule: rule}, mixin:: { }, }, // SELinux Strategy Options defines the strategy type and any options used to create the strategy. seLinuxStrategyOptions:: { new():: {}, // type is the strategy that will dictate the allowable labels that may be set. withRule(rule):: self + {rule: rule}, mixin:: { // seLinuxOptions required to run as; required for MustRunAs More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md seLinuxOptions:: { local __seLinuxOptionsMixin(seLinuxOptions) = {seLinuxOptions+: seLinuxOptions}, mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), // Level is SELinux level label that applies to the container. withLevel(level):: self + __seLinuxOptionsMixin({level: level}), // Role is a SELinux role label that applies to the container. withRole(role):: self + __seLinuxOptionsMixin({role: role}), // Type is a SELinux type label that applies to the container. withType(type):: self + __seLinuxOptionsMixin({type: type}), // User is a SELinux user label that applies to the container. withUser(user):: self + __seLinuxOptionsMixin({user: user}), }, seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, }, }, // describes the attributes of a scale subresource scaleSpec:: { new():: {}, // desired number of instances for the scaled object. withReplicas(replicas):: self + {replicas: replicas}, mixin:: { }, }, // represents the current status of a scale subresource. scaleStatus:: { new():: {}, // actual number of observed instances of the scaled object. withReplicas(replicas):: self + {replicas: replicas}, // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors withSelector(selector):: self + {selector: selector}, // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors withSelectorMixin(selector):: self + {selector+: selector}, // label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors withTargetSelector(targetSelector):: self + {targetSelector: targetSelector}, mixin:: { }, }, // SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy. supplementalGroupsStrategyOptions:: { new():: {}, // Ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end. withRanges(ranges):: self + if std.type(ranges) == "array" then {ranges: ranges} else {ranges: [ranges]}, // Ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end. withRangesMixin(ranges):: self + if std.type(ranges) == "array" then {ranges+: ranges} else {ranges+: [ranges]}, rangesType:: hidden.extensions.v1beta1.idRange, // Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. withRule(rule):: self + {rule: rule}, mixin:: { }, }, }, }, meta:: { v1:: { local apiVersion = {apiVersion: "meta/v1"}, // APIResource specifies the name of a resource and whether it is namespaced. apiResource:: { new():: {}, // categories is a list of the grouped resources this resource belongs to (e.g. 'all') withCategories(categories):: self + if std.type(categories) == "array" then {categories: categories} else {categories: [categories]}, // categories is a list of the grouped resources this resource belongs to (e.g. 'all') withCategoriesMixin(categories):: self + if std.type(categories) == "array" then {categories+: categories} else {categories+: [categories]}, // group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale". withGroup(group):: self + {group: group}, // name is the plural name of the resource. withName(name):: self + {name: name}, // namespaced indicates if a resource is namespaced or not. withNamespaced(namespaced):: self + {namespaced: namespaced}, // shortNames is a list of suggested short names of the resource. withShortNames(shortNames):: self + if std.type(shortNames) == "array" then {shortNames: shortNames} else {shortNames: [shortNames]}, // shortNames is a list of suggested short names of the resource. withShortNamesMixin(shortNames):: self + if std.type(shortNames) == "array" then {shortNames+: shortNames} else {shortNames+: [shortNames]}, // singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface. withSingularName(singularName):: self + {singularName: singularName}, // verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy) withVerbs(verbs):: self + if std.type(verbs) == "array" then {verbs: verbs} else {verbs: [verbs]}, // verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy) withVerbsMixin(verbs):: self + if std.type(verbs) == "array" then {verbs+: verbs} else {verbs+: [verbs]}, // version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)". withVersion(version):: self + {version: version}, mixin:: { }, }, // GroupVersion contains the "group/version" and "version" string of a version. It is made a struct to keep extensibility. groupVersionForDiscovery:: { new():: {}, // groupVersion specifies the API group and version in the form "group/version" withGroupVersion(groupVersion):: self + {groupVersion: groupVersion}, // version specifies the version in the form of "version". This is to save the clients the trouble of splitting the GroupVersion. withVersion(version):: self + {version: version}, mixin:: { }, }, // Initializer is information about an initializer that has not yet completed. initializer:: { new():: {}, // name of the process that is responsible for initializing this object. withName(name):: self + {name: name}, mixin:: { }, }, // Initializers tracks the progress of initialization. initializers:: { new():: {}, // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then {pending: pending} else {pending: [pending]}, // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then {pending+: pending} else {pending+: [pending]}, pendingType:: hidden.meta.v1.initializer, mixin:: { // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = {result+: result}, mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, }, // 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. labelSelector:: { new():: {}, // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then {matchExpressions: matchExpressions} else {matchExpressions: [matchExpressions]}, // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then {matchExpressions+: matchExpressions} else {matchExpressions+: [matchExpressions]}, matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + {matchLabels: matchLabels}, // 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. withMatchLabelsMixin(matchLabels):: self + {matchLabels+: matchLabels}, mixin:: { }, }, // A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. labelSelectorRequirement:: { new():: {}, // key is the label key that the selector applies to. withKey(key):: self + {key: key}, // operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. withOperator(operator):: self + {operator: operator}, // 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. withValues(values):: self + if std.type(values) == "array" then {values: values} else {values: [values]}, // 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. withValuesMixin(values):: self + if std.type(values) == "array" then {values+: values} else {values+: [values]}, mixin:: { }, }, // ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}. listMeta:: { new():: {}, // continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response. withContinue(continue):: self + {continue: continue}, // String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency withResourceVersion(resourceVersion):: self + {resourceVersion: resourceVersion}, // selfLink is a URL representing this object. Populated by the system. Read-only. withSelfLink(selfLink):: self + {selfLink: selfLink}, mixin:: { }, }, // ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. objectMeta:: { new():: {}, // 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 withAnnotations(annotations):: self + {annotations: annotations}, // 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 withAnnotationsMixin(annotations):: self + {annotations+: annotations}, // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. withClusterName(clusterName):: self + {clusterName: clusterName}, // 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. withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + {deletionGracePeriodSeconds: deletionGracePeriodSeconds}, // 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. withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then {finalizers: finalizers} else {finalizers: [finalizers]}, // 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. withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then {finalizers+: finalizers} else {finalizers+: [finalizers]}, // 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency withGenerateName(generateName):: self + {generateName: generateName}, // 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 withLabels(labels):: self + {labels: labels}, // 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 withLabelsMixin(labels):: self + {labels+: labels}, // 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 withName(name):: self + {name: name}, // Namespace defines the space within 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 withNamespace(namespace):: self + {namespace: namespace}, mixin:: { // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. // // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. initializers:: { local __initializersMixin(initializers) = {initializers+: initializers}, mixinInstance(initializers):: __initializersMixin(initializers), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), pendingType:: hidden.meta.v1.initializer, // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. result:: { local __resultMixin(result) = __initializersMixin({result+: result}), mixinInstance(result):: __resultMixin(result), // Suggested HTTP return code for this status, 0 if not set. withCode(code):: self + __resultMixin({code: code}), // 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. details:: { local __detailsMixin(details) = __resultMixin({details+: details}), mixinInstance(details):: __detailsMixin(details), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + __detailsMixin({group: group}), // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + __detailsMixin({name: name}), // 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. withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: retryAfterSeconds}), // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + __detailsMixin({uid: uid}), }, detailsType:: hidden.meta.v1.statusDetails, // A human-readable description of the status of this operation. withMessage(message):: self + __resultMixin({message: 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. withReason(reason):: self + __resultMixin({reason: reason}), }, resultType:: hidden.meta.v1.status, }, initializersType:: hidden.meta.v1.initializers, }, }, // OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field. ownerReference:: { new():: {}, // If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned. withBlockOwnerDeletion(blockOwnerDeletion):: self + {blockOwnerDeletion: blockOwnerDeletion}, // If true, this reference points to the managing controller. withController(controller):: self + {controller: controller}, // Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names withName(name):: self + {name: name}, // UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + {uid: uid}, mixin:: { }, }, // Patch is provided to give a concrete name and type to the Kubernetes PATCH request body. patch:: { new():: {}, mixin:: { }, }, // Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. preconditions:: { new():: {}, // Specifies the target UID. withUid(uid):: self + {uid: uid}, mixin:: { }, }, // ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match. serverAddressByClientCidr:: { new():: {}, // The CIDR with which clients can match their IP to figure out the server address that they should use. withClientCidr(clientCidr):: self + {clientCIDR: clientCidr}, // Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port. withServerAddress(serverAddress):: self + {serverAddress: serverAddress}, mixin:: { }, }, // StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered. statusCause:: { new():: {}, // 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" withField(field):: self + {field: field}, // A human-readable description of the cause of the error. This field may be presented as-is to a reader. withMessage(message):: self + {message: message}, // A machine-readable description of the cause of the error. If this value is empty there is no information available. withReason(reason):: self + {reason: reason}, mixin:: { }, }, // 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. statusDetails:: { new():: {}, // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCauses(causes):: self + if std.type(causes) == "array" then {causes: causes} else {causes: [causes]}, // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. withCausesMixin(causes):: self + if std.type(causes) == "array" then {causes+: causes} else {causes+: [causes]}, causesType:: hidden.meta.v1.statusCause, // The group attribute of the resource associated with the status StatusReason. withGroup(group):: self + {group: group}, // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). withName(name):: self + {name: name}, // 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. withRetryAfterSeconds(retryAfterSeconds):: self + {retryAfterSeconds: retryAfterSeconds}, // UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids withUid(uid):: self + {uid: uid}, mixin:: { }, }, // time:: { new():: {}, mixin:: { }, }, }, }, networking:: { v1:: { local apiVersion = {apiVersion: "networking/v1"}, // IPBlock describes a particular CIDR (Ex. "192.168.1.1/24") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule. ipBlock:: { new():: {}, // CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" withCidr(cidr):: self + {cidr: cidr}, // Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range withExcept(except):: self + if std.type(except) == "array" then {except: except} else {except: [except]}, // Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range withExceptMixin(except):: self + if std.type(except) == "array" then {except+: except} else {except+: [except]}, mixin:: { }, }, // NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8 networkPolicyEgressRule:: { new():: {}, // List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list. withPorts(ports):: self + if std.type(ports) == "array" then {ports: ports} else {ports: [ports]}, // List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list. withPortsMixin(ports):: self + if std.type(ports) == "array" then {ports+: ports} else {ports+: [ports]}, portsType:: hidden.networking.v1.networkPolicyPort, // List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list. withTo(to):: self + if std.type(to) == "array" then {to: to} else {to: [to]}, // List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list. withToMixin(to):: self + if std.type(to) == "array" then {to+: to} else {to+: [to]}, toType:: hidden.networking.v1.networkPolicyPeer, mixin:: { }, }, // NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from. networkPolicyIngressRule:: { new():: {}, // List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list. withFrom(from):: self + if std.type(from) == "array" then {from: from} else {from: [from]}, // List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list. withFromMixin(from):: self + if std.type(from) == "array" then {from+: from} else {from+: [from]}, fromType:: hidden.networking.v1.networkPolicyPeer, // List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list. withPorts(ports):: self + if std.type(ports) == "array" then {ports: ports} else {ports: [ports]}, // List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list. withPortsMixin(ports):: self + if std.type(ports) == "array" then {ports+: ports} else {ports+: [ports]}, portsType:: hidden.networking.v1.networkPolicyPort, mixin:: { }, }, // NetworkPolicyPeer describes a peer to allow traffic from. Exactly one of its fields must be specified. networkPolicyPeer:: { new():: {}, mixin:: { // IPBlock defines policy on a particular IPBlock ipBlock:: { local __ipBlockMixin(ipBlock) = {ipBlock+: ipBlock}, mixinInstance(ipBlock):: __ipBlockMixin(ipBlock), // CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" withCidr(cidr):: self + __ipBlockMixin({cidr: cidr}), // Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range withExcept(except):: self + if std.type(except) == "array" then __ipBlockMixin({except: except}) else __ipBlockMixin({except: [except]}), // Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range withExceptMixin(except):: self + if std.type(except) == "array" then __ipBlockMixin({except+: except}) else __ipBlockMixin({except+: [except]}), }, ipBlockType:: hidden.networking.v1.ipBlock, // Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces. namespaceSelector:: { local __namespaceSelectorMixin(namespaceSelector) = {namespaceSelector+: namespaceSelector}, mixinInstance(namespaceSelector):: __namespaceSelectorMixin(namespaceSelector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __namespaceSelectorMixin({matchExpressions: matchExpressions}) else __namespaceSelectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __namespaceSelectorMixin({matchExpressions+: matchExpressions}) else __namespaceSelectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __namespaceSelectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __namespaceSelectorMixin({matchLabels+: matchLabels}), }, namespaceSelectorType:: hidden.meta.v1.labelSelector, // This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace. podSelector:: { local __podSelectorMixin(podSelector) = {podSelector+: podSelector}, mixinInstance(podSelector):: __podSelectorMixin(podSelector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions: matchExpressions}) else __podSelectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions+: matchExpressions}) else __podSelectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __podSelectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __podSelectorMixin({matchLabels+: matchLabels}), }, podSelectorType:: hidden.meta.v1.labelSelector, }, }, // NetworkPolicyPort describes a port to allow traffic on networkPolicyPort:: { new():: {}, // The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. withPort(port):: {port: port}, // The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP. withProtocol(protocol):: self + {protocol: protocol}, mixin:: { }, }, // NetworkPolicySpec provides the specification of a NetworkPolicy networkPolicySpec:: { new():: {}, // List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8 withEgress(egress):: self + if std.type(egress) == "array" then {egress: egress} else {egress: [egress]}, // List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8 withEgressMixin(egress):: self + if std.type(egress) == "array" then {egress+: egress} else {egress+: [egress]}, egressType:: hidden.networking.v1.networkPolicyEgressRule, // List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default) withIngress(ingress):: self + if std.type(ingress) == "array" then {ingress: ingress} else {ingress: [ingress]}, // List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default) withIngressMixin(ingress):: self + if std.type(ingress) == "array" then {ingress+: ingress} else {ingress+: [ingress]}, ingressType:: hidden.networking.v1.networkPolicyIngressRule, // List of rule types that the NetworkPolicy relates to. Valid options are Ingress, Egress, or Ingress,Egress. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 withPolicyTypes(policyTypes):: self + if std.type(policyTypes) == "array" then {policyTypes: policyTypes} else {policyTypes: [policyTypes]}, // List of rule types that the NetworkPolicy relates to. Valid options are Ingress, Egress, or Ingress,Egress. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 withPolicyTypesMixin(policyTypes):: self + if std.type(policyTypes) == "array" then {policyTypes+: policyTypes} else {policyTypes+: [policyTypes]}, mixin:: { // Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace. podSelector:: { local __podSelectorMixin(podSelector) = {podSelector+: podSelector}, mixinInstance(podSelector):: __podSelectorMixin(podSelector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions: matchExpressions}) else __podSelectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions+: matchExpressions}) else __podSelectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __podSelectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __podSelectorMixin({matchLabels+: matchLabels}), }, podSelectorType:: hidden.meta.v1.labelSelector, }, }, }, }, policy:: { v1beta1:: { local apiVersion = {apiVersion: "policy/v1beta1"}, // PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. podDisruptionBudgetSpec:: { new():: {}, // An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with "minAvailable". withMaxUnavailable(maxUnavailable):: {maxUnavailable: maxUnavailable}, // An eviction is allowed if at least "minAvailable" pods selected by "selector" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying "100%". withMinAvailable(minAvailable):: {minAvailable: minAvailable}, mixin:: { // Label query over pods whose evictions are managed by the disruption budget. selector:: { local __selectorMixin(selector) = {selector+: selector}, mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, }, }, // PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system. podDisruptionBudgetStatus:: { new():: {}, // current number of healthy pods withCurrentHealthy(currentHealthy):: self + {currentHealthy: currentHealthy}, // minimum desired number of healthy pods withDesiredHealthy(desiredHealthy):: self + {desiredHealthy: desiredHealthy}, // DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions. withDisruptedPods(disruptedPods):: self + {disruptedPods: disruptedPods}, // DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions. withDisruptedPodsMixin(disruptedPods):: self + {disruptedPods+: disruptedPods}, // Number of pod disruptions that are currently allowed. withDisruptionsAllowed(disruptionsAllowed):: self + {disruptionsAllowed: disruptionsAllowed}, // total number of pods counted by this disruption budget withExpectedPods(expectedPods):: self + {expectedPods: expectedPods}, // Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other status informatio is valid only if observedGeneration equals to PDB's object generation. withObservedGeneration(observedGeneration):: self + {observedGeneration: observedGeneration}, mixin:: { }, }, }, }, rbac:: { v1:: { local apiVersion = {apiVersion: "rbac/v1"}, // PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to. policyRule:: { new():: {}, // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. withApiGroups(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups: apiGroups} else {apiGroups: [apiGroups]}, // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. withApiGroupsMixin(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups+: apiGroups} else {apiGroups+: [apiGroups]}, // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. withNonResourceUrls(nonResourceUrls):: self + if std.type(nonResourceUrls) == "array" then {nonResourceURLs: nonResourceUrls} else {nonResourceURLs: [nonResourceUrls]}, // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. withNonResourceUrlsMixin(nonResourceUrls):: self + if std.type(nonResourceUrls) == "array" then {nonResourceURLs+: nonResourceUrls} else {nonResourceURLs+: [nonResourceUrls]}, // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. withResourceNames(resourceNames):: self + if std.type(resourceNames) == "array" then {resourceNames: resourceNames} else {resourceNames: [resourceNames]}, // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. withResourceNamesMixin(resourceNames):: self + if std.type(resourceNames) == "array" then {resourceNames+: resourceNames} else {resourceNames+: [resourceNames]}, // Resources is a list of resources this rule applies to. ResourceAll represents all resources. withResources(resources):: self + if std.type(resources) == "array" then {resources: resources} else {resources: [resources]}, // Resources is a list of resources this rule applies to. ResourceAll represents all resources. withResourcesMixin(resources):: self + if std.type(resources) == "array" then {resources+: resources} else {resources+: [resources]}, // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. withVerbs(verbs):: self + if std.type(verbs) == "array" then {verbs: verbs} else {verbs: [verbs]}, // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. withVerbsMixin(verbs):: self + if std.type(verbs) == "array" then {verbs+: verbs} else {verbs+: [verbs]}, mixin:: { }, }, // RoleRef contains information that points to the role being used roleRef:: { new():: {}, // APIGroup is the group for the resource being referenced withApiGroup(apiGroup):: self + {apiGroup: apiGroup}, // Name is the name of resource being referenced withName(name):: self + {name: name}, mixin:: { }, }, // Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names. subject:: { new():: {}, // APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects. withApiGroup(apiGroup):: self + {apiGroup: apiGroup}, // Name of the object being referenced. withName(name):: self + {name: name}, // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error. withNamespace(namespace):: self + {namespace: namespace}, mixin:: { }, }, }, v1alpha1:: { local apiVersion = {apiVersion: "rbac/v1alpha1"}, // PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to. policyRule:: { new():: {}, // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. withApiGroups(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups: apiGroups} else {apiGroups: [apiGroups]}, // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. withApiGroupsMixin(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups+: apiGroups} else {apiGroups+: [apiGroups]}, // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. withNonResourceUrls(nonResourceUrls):: self + if std.type(nonResourceUrls) == "array" then {nonResourceURLs: nonResourceUrls} else {nonResourceURLs: [nonResourceUrls]}, // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. withNonResourceUrlsMixin(nonResourceUrls):: self + if std.type(nonResourceUrls) == "array" then {nonResourceURLs+: nonResourceUrls} else {nonResourceURLs+: [nonResourceUrls]}, // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. withResourceNames(resourceNames):: self + if std.type(resourceNames) == "array" then {resourceNames: resourceNames} else {resourceNames: [resourceNames]}, // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. withResourceNamesMixin(resourceNames):: self + if std.type(resourceNames) == "array" then {resourceNames+: resourceNames} else {resourceNames+: [resourceNames]}, // Resources is a list of resources this rule applies to. ResourceAll represents all resources. withResources(resources):: self + if std.type(resources) == "array" then {resources: resources} else {resources: [resources]}, // Resources is a list of resources this rule applies to. ResourceAll represents all resources. withResourcesMixin(resources):: self + if std.type(resources) == "array" then {resources+: resources} else {resources+: [resources]}, // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. withVerbs(verbs):: self + if std.type(verbs) == "array" then {verbs: verbs} else {verbs: [verbs]}, // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. withVerbsMixin(verbs):: self + if std.type(verbs) == "array" then {verbs+: verbs} else {verbs+: [verbs]}, mixin:: { }, }, // RoleRef contains information that points to the role being used roleRef:: { new():: {}, // APIGroup is the group for the resource being referenced withApiGroup(apiGroup):: self + {apiGroup: apiGroup}, // Name is the name of resource being referenced withName(name):: self + {name: name}, mixin:: { }, }, // Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names. subject:: { new():: {}, // Name of the object being referenced. withName(name):: self + {name: name}, // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error. withNamespace(namespace):: self + {namespace: namespace}, mixin:: { }, }, }, v1beta1:: { local apiVersion = {apiVersion: "rbac/v1beta1"}, // PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to. policyRule:: { new():: {}, // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. withApiGroups(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups: apiGroups} else {apiGroups: [apiGroups]}, // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. withApiGroupsMixin(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups+: apiGroups} else {apiGroups+: [apiGroups]}, // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. withNonResourceUrls(nonResourceUrls):: self + if std.type(nonResourceUrls) == "array" then {nonResourceURLs: nonResourceUrls} else {nonResourceURLs: [nonResourceUrls]}, // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. withNonResourceUrlsMixin(nonResourceUrls):: self + if std.type(nonResourceUrls) == "array" then {nonResourceURLs+: nonResourceUrls} else {nonResourceURLs+: [nonResourceUrls]}, // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. withResourceNames(resourceNames):: self + if std.type(resourceNames) == "array" then {resourceNames: resourceNames} else {resourceNames: [resourceNames]}, // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. withResourceNamesMixin(resourceNames):: self + if std.type(resourceNames) == "array" then {resourceNames+: resourceNames} else {resourceNames+: [resourceNames]}, // Resources is a list of resources this rule applies to. ResourceAll represents all resources. withResources(resources):: self + if std.type(resources) == "array" then {resources: resources} else {resources: [resources]}, // Resources is a list of resources this rule applies to. ResourceAll represents all resources. withResourcesMixin(resources):: self + if std.type(resources) == "array" then {resources+: resources} else {resources+: [resources]}, // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. withVerbs(verbs):: self + if std.type(verbs) == "array" then {verbs: verbs} else {verbs: [verbs]}, // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. withVerbsMixin(verbs):: self + if std.type(verbs) == "array" then {verbs+: verbs} else {verbs+: [verbs]}, mixin:: { }, }, // RoleRef contains information that points to the role being used roleRef:: { new():: {}, // APIGroup is the group for the resource being referenced withApiGroup(apiGroup):: self + {apiGroup: apiGroup}, // Name is the name of resource being referenced withName(name):: self + {name: name}, mixin:: { }, }, // Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names. subject:: { new():: {}, // APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects. withApiGroup(apiGroup):: self + {apiGroup: apiGroup}, // Name of the object being referenced. withName(name):: self + {name: name}, // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error. withNamespace(namespace):: self + {namespace: namespace}, mixin:: { }, }, }, }, settings:: { v1alpha1:: { local apiVersion = {apiVersion: "settings/v1alpha1"}, // PodPresetSpec is a description of a pod preset. podPresetSpec:: { new():: {}, // Env defines the collection of EnvVar to inject into containers. withEnv(env):: self + if std.type(env) == "array" then {env: env} else {env: [env]}, // Env defines the collection of EnvVar to inject into containers. withEnvMixin(env):: self + if std.type(env) == "array" then {env+: env} else {env+: [env]}, // EnvFrom defines the collection of EnvFromSource to inject into containers. withEnvFrom(envFrom):: self + if std.type(envFrom) == "array" then {envFrom: envFrom} else {envFrom: [envFrom]}, // EnvFrom defines the collection of EnvFromSource to inject into containers. withEnvFromMixin(envFrom):: self + if std.type(envFrom) == "array" then {envFrom+: envFrom} else {envFrom+: [envFrom]}, envFromType:: hidden.core.v1.envFromSource, envType:: hidden.core.v1.envVar, // VolumeMounts defines the collection of VolumeMount to inject into containers. withVolumeMounts(volumeMounts):: self + if std.type(volumeMounts) == "array" then {volumeMounts: volumeMounts} else {volumeMounts: [volumeMounts]}, // VolumeMounts defines the collection of VolumeMount to inject into containers. withVolumeMountsMixin(volumeMounts):: self + if std.type(volumeMounts) == "array" then {volumeMounts+: volumeMounts} else {volumeMounts+: [volumeMounts]}, volumeMountsType:: hidden.core.v1.volumeMount, // Volumes defines the collection of Volume to inject into the pod. withVolumes(volumes):: self + if std.type(volumes) == "array" then {volumes: volumes} else {volumes: [volumes]}, // Volumes defines the collection of Volume to inject into the pod. withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then {volumes+: volumes} else {volumes+: [volumes]}, volumesType:: hidden.core.v1.volume, mixin:: { // Selector is a label query over a set of resources, in this case pods. Required. selector:: { local __selectorMixin(selector) = {selector+: selector}, mixinInstance(selector):: __selectorMixin(selector), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), // matchExpressions is a list of label selector requirements. The requirements are ANDed. withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, // 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. withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), // 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. withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), }, selectorType:: hidden.meta.v1.labelSelector, }, }, }, }, }, }