Autodoc for K8s Rel 1.27 v1 document classes¶
This page contains the docstrings for the top-level classes
(HikaruDocumentBase subclasses)
in hikaru.model.rel_1_27.v1.documents
. Instances of these classes are used
directly with K8s (other objects are embedded within these), and methods are
only defined on these classes.
If you need to access doc for all objects, refer to the docstrings for the full
set of classes in hikaru.model.rel_1_27.v1.v1
.
The doc starts with the standard module-level warning not to edit the file.
HikaruDocumentBase and subclasses¶
DO NOT EDIT THIS FILE!
This module is automatically generated using the Hikaru build program that turns a Kubernetes swagger spec into the code for the hikaru.model package.
- class hikaru.model.rel_1_27.v1.documents.HikaruDocumentBase¶
- get_status()¶
Returns a status object, if a call resulted in on
It turns out that for certain resources, a delete() operation will result in K8s returning a sort of odd object: a Status resource, but one whose kind and apiVersion properties indicate it is a different type of message altogether. In these instances, Hikaru would try to instantiate the class identified by the kind/apiVersion attributes, but generally not fail as most of the time the pieces that are missing in the received message are optional on the receiving class. However, this doesn’t always happen, and besides, the lack of visible status hides important information. So the following solution was settled on in order to not break existing code: Hikaru now detects if a Status object is being returned, and if so it creates and instance with the received data and stores it in a private variable. The method returns self as usual, but this new method returns the status object if there is one.
If a status object is returned, it remains held by self until it is explicitly cleared with clear_status()
- Returns:
None or a Status object if one was present from the previous call.
- clear_status()¶
Clear out any previously held status.
See the docstring for get_status() to understand when Status objects might be available.
This call clears out any held Status so that subsequent calls that don’t generate Status won’t be confused by the presence of a previously received status. It is the responsibility of the user of the object to determine when Status should be cleared out.
- class hikaru.model.rel_1_27.v1.documents.MutatingWebhookConfiguration(apiVersion: str | None = 'admissionregistration.k8s.io/v1', kind: str | None = 'MutatingWebhookConfiguration', metadata: ObjectMeta | None = None, webhooks: ~typing.List[MutatingWebhook] | None = <factory>, client: dataclasses.InitVar[typing.Optional[kubernetes.client.api_client.ApiClient]] = None)¶
MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.
Full name: MutatingWebhookConfiguration
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object metadata; More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
webhooks: Webhooks is a list of webhooks and the affected resources and operations.
- static deleteCollectionMutatingWebhookConfiguration(continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[MutatingWebhookConfiguration] ¶
delete collection of MutatingWebhookConfiguration
operationID: deleteCollectionMutatingWebhookConfiguration path: /apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations
- Parameters:
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createMutatingWebhookConfiguration(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[MutatingWebhookConfiguration] ¶
create a MutatingWebhookConfiguration
operationID: createMutatingWebhookConfiguration path: /apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations
- Parameters:
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 MutatingWebhookConfiguration OK 201 MutatingWebhookConfiguration Created 202 MutatingWebhookConfiguration Accepted 401 None Unauthorized
- create(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) MutatingWebhookConfiguration ¶
create a MutatingWebhookConfiguration
operationID: createMutatingWebhookConfiguration path: /apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteMutatingWebhookConfiguration(name: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[MutatingWebhookConfiguration] ¶
delete a MutatingWebhookConfiguration
operationID: deleteMutatingWebhookConfiguration path: /apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) MutatingWebhookConfiguration ¶
delete a MutatingWebhookConfiguration
operationID: deleteMutatingWebhookConfiguration path: /apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readMutatingWebhookConfiguration(name: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[MutatingWebhookConfiguration] ¶
read the specified MutatingWebhookConfiguration
operationID: readMutatingWebhookConfiguration path: /apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}
- Parameters:
name – name for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 MutatingWebhookConfiguration OK 401 None Unauthorized
- read(name: str | None = None, pretty: str | None = None, client: ApiClient | None = None) MutatingWebhookConfiguration ¶
read the specified MutatingWebhookConfiguration
operationID: readMutatingWebhookConfiguration path: /apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchMutatingWebhookConfiguration(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[MutatingWebhookConfiguration] ¶
partially update the specified MutatingWebhookConfiguration
operationID: patchMutatingWebhookConfiguration path: /apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 MutatingWebhookConfiguration OK 201 MutatingWebhookConfiguration Created 401 None Unauthorized
- update(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) MutatingWebhookConfiguration ¶
partially update the specified MutatingWebhookConfiguration
operationID: patchMutatingWebhookConfiguration path: /apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceMutatingWebhookConfiguration(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[MutatingWebhookConfiguration] ¶
replace the specified MutatingWebhookConfiguration
operationID: replaceMutatingWebhookConfiguration path: /apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 MutatingWebhookConfiguration OK 201 MutatingWebhookConfiguration Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.MutatingWebhookConfigurationList(items: List[MutatingWebhookConfiguration], apiVersion: str | None = 'admissionregistration.k8s.io/v1', kind: str | None = 'MutatingWebhookConfigurationList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.
Full name: MutatingWebhookConfigurationList
Attributes: items: List of MutatingWebhookConfiguration. apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- static listMutatingWebhookConfiguration(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[MutatingWebhookConfigurationList] ¶
list or watch objects of kind MutatingWebhookConfiguration
operationID: listMutatingWebhookConfiguration path: /apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 MutatingWebhookConfigurationList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.ValidatingWebhookConfiguration(apiVersion: str | None = 'admissionregistration.k8s.io/v1', kind: str | None = 'ValidatingWebhookConfiguration', metadata: ObjectMeta | None = None, webhooks: ~typing.List[ValidatingWebhook] | None = <factory>, client: dataclasses.InitVar[typing.Optional[kubernetes.client.api_client.ApiClient]] = None)¶
ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.
Full name: ValidatingWebhookConfiguration
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object metadata; More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
webhooks: Webhooks is a list of webhooks and the affected resources and operations.
- static deleteCollectionValidatingWebhookConfiguration(continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ValidatingWebhookConfiguration] ¶
delete collection of ValidatingWebhookConfiguration
operationID: deleteCollectionValidatingWebhookConfiguration path: /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations
- Parameters:
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createValidatingWebhookConfiguration(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ValidatingWebhookConfiguration] ¶
create a ValidatingWebhookConfiguration
operationID: createValidatingWebhookConfiguration path: /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations
- Parameters:
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ValidatingWebhookConfiguration OK 201 ValidatingWebhookConfiguration Created 202 ValidatingWebhookConfiguration Accepted 401 None Unauthorized
- create(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) ValidatingWebhookConfiguration ¶
create a ValidatingWebhookConfiguration
operationID: createValidatingWebhookConfiguration path: /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteValidatingWebhookConfiguration(name: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ValidatingWebhookConfiguration] ¶
delete a ValidatingWebhookConfiguration
operationID: deleteValidatingWebhookConfiguration path: /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) ValidatingWebhookConfiguration ¶
delete a ValidatingWebhookConfiguration
operationID: deleteValidatingWebhookConfiguration path: /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readValidatingWebhookConfiguration(name: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ValidatingWebhookConfiguration] ¶
read the specified ValidatingWebhookConfiguration
operationID: readValidatingWebhookConfiguration path: /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}
- Parameters:
name – name for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ValidatingWebhookConfiguration OK 401 None Unauthorized
- read(name: str | None = None, pretty: str | None = None, client: ApiClient | None = None) ValidatingWebhookConfiguration ¶
read the specified ValidatingWebhookConfiguration
operationID: readValidatingWebhookConfiguration path: /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchValidatingWebhookConfiguration(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ValidatingWebhookConfiguration] ¶
partially update the specified ValidatingWebhookConfiguration
operationID: patchValidatingWebhookConfiguration path: /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ValidatingWebhookConfiguration OK 201 ValidatingWebhookConfiguration Created 401 None Unauthorized
- update(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) ValidatingWebhookConfiguration ¶
partially update the specified ValidatingWebhookConfiguration
operationID: patchValidatingWebhookConfiguration path: /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceValidatingWebhookConfiguration(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ValidatingWebhookConfiguration] ¶
replace the specified ValidatingWebhookConfiguration
operationID: replaceValidatingWebhookConfiguration path: /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ValidatingWebhookConfiguration OK 201 ValidatingWebhookConfiguration Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.ValidatingWebhookConfigurationList(items: List[ValidatingWebhookConfiguration], apiVersion: str | None = 'admissionregistration.k8s.io/v1', kind: str | None = 'ValidatingWebhookConfigurationList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.
Full name: ValidatingWebhookConfigurationList
Attributes: items: List of ValidatingWebhookConfiguration. apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- static listValidatingWebhookConfiguration(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ValidatingWebhookConfigurationList] ¶
list or watch objects of kind ValidatingWebhookConfiguration
operationID: listValidatingWebhookConfiguration path: /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ValidatingWebhookConfigurationList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.ControllerRevision(revision: int, apiVersion: str | None = 'apps/v1', kind: str | None = 'ControllerRevision', metadata: ObjectMeta | None = None, data: object | None = <factory>, client: dataclasses.InitVar[typing.Optional[kubernetes.client.api_client.ApiClient]] = None)¶
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.
Full name: ControllerRevision
Attributes: revision: Revision indicates the revision of the state represented by Data. apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
data: Data is the serialized representation of the state.
- static deleteCollectionNamespacedControllerRevision(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ControllerRevision] ¶
delete collection of ControllerRevision
operationID: deleteCollectionNamespacedControllerRevision path: /apis/apps/v1/namespaces/{namespace}/controllerrevisions
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedControllerRevision(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ControllerRevision] ¶
create a ControllerRevision
operationID: createNamespacedControllerRevision path: /apis/apps/v1/namespaces/{namespace}/controllerrevisions
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ControllerRevision OK 201 ControllerRevision Created 202 ControllerRevision Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) ControllerRevision ¶
create a ControllerRevision
operationID: createNamespacedControllerRevision path: /apis/apps/v1/namespaces/{namespace}/controllerrevisions
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedControllerRevision(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ControllerRevision] ¶
delete a ControllerRevision
operationID: deleteNamespacedControllerRevision path: /apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) ControllerRevision ¶
delete a ControllerRevision
operationID: deleteNamespacedControllerRevision path: /apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedControllerRevision(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ControllerRevision] ¶
read the specified ControllerRevision
operationID: readNamespacedControllerRevision path: /apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ControllerRevision OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) ControllerRevision ¶
read the specified ControllerRevision
operationID: readNamespacedControllerRevision path: /apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedControllerRevision(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ControllerRevision] ¶
partially update the specified ControllerRevision
operationID: patchNamespacedControllerRevision path: /apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ControllerRevision OK 201 ControllerRevision Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) ControllerRevision ¶
partially update the specified ControllerRevision
operationID: patchNamespacedControllerRevision path: /apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedControllerRevision(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ControllerRevision] ¶
replace the specified ControllerRevision
operationID: replaceNamespacedControllerRevision path: /apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ControllerRevision OK 201 ControllerRevision Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.ControllerRevisionList(items: List[ControllerRevision], apiVersion: str | None = 'apps/v1', kind: str | None = 'ControllerRevisionList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
ControllerRevisionList is a resource containing a list of ControllerRevision objects.
Full name: ControllerRevisionList
Attributes: items: Items is the list of ControllerRevisions apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- static listControllerRevisionForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ControllerRevisionList] ¶
list or watch objects of kind ControllerRevision
operationID: listControllerRevisionForAllNamespaces path: /apis/apps/v1/controllerrevisions
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ControllerRevisionList OK 401 None Unauthorized
- static listNamespacedControllerRevision(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ControllerRevisionList] ¶
list or watch objects of kind ControllerRevision
operationID: listNamespacedControllerRevision path: /apis/apps/v1/namespaces/{namespace}/controllerrevisions
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ControllerRevisionList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.DaemonSet(apiVersion: str | None = 'apps/v1', kind: str | None = 'DaemonSet', metadata: ObjectMeta | None = None, spec: DaemonSetSpec | None = None, status: DaemonSetStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
DaemonSet represents the configuration of a daemon set.
Full name: DaemonSet
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- spec: The desired behavior of this daemon set. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- status: The current status of this daemon set. This data may be out of date by some
window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- static deleteCollectionNamespacedDaemonSet(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[DaemonSet] ¶
delete collection of DaemonSet
operationID: deleteCollectionNamespacedDaemonSet path: /apis/apps/v1/namespaces/{namespace}/daemonsets
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedDaemonSet(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[DaemonSet] ¶
create a DaemonSet
operationID: createNamespacedDaemonSet path: /apis/apps/v1/namespaces/{namespace}/daemonsets
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 DaemonSet OK 201 DaemonSet Created 202 DaemonSet Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) DaemonSet ¶
create a DaemonSet
operationID: createNamespacedDaemonSet path: /apis/apps/v1/namespaces/{namespace}/daemonsets
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedDaemonSet(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[DaemonSet] ¶
delete a DaemonSet
operationID: deleteNamespacedDaemonSet path: /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) DaemonSet ¶
delete a DaemonSet
operationID: deleteNamespacedDaemonSet path: /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedDaemonSet(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[DaemonSet] ¶
read the specified DaemonSet
operationID: readNamespacedDaemonSet path: /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 DaemonSet OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) DaemonSet ¶
read the specified DaemonSet
operationID: readNamespacedDaemonSet path: /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedDaemonSet(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[DaemonSet] ¶
partially update the specified DaemonSet
operationID: patchNamespacedDaemonSet path: /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 DaemonSet OK 201 DaemonSet Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) DaemonSet ¶
partially update the specified DaemonSet
operationID: patchNamespacedDaemonSet path: /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedDaemonSet(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[DaemonSet] ¶
replace the specified DaemonSet
operationID: replaceNamespacedDaemonSet path: /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 DaemonSet OK 201 DaemonSet Created 401 None Unauthorized
- replaceNamespacedDaemonSetStatus(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[DaemonSet] ¶
replace status of the specified DaemonSet
operationID: replaceNamespacedDaemonSetStatus path: /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 DaemonSet OK 201 DaemonSet Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.DaemonSetList(items: List[DaemonSet], apiVersion: str | None = 'apps/v1', kind: str | None = 'DaemonSetList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
DaemonSetList is a collection of daemon sets.
Full name: DaemonSetList
Attributes: items: A list of daemon sets. apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- static listDaemonSetForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[DaemonSetList] ¶
list or watch objects of kind DaemonSet
operationID: listDaemonSetForAllNamespaces path: /apis/apps/v1/daemonsets
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 DaemonSetList OK 401 None Unauthorized
- static listNamespacedDaemonSet(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[DaemonSetList] ¶
list or watch objects of kind DaemonSet
operationID: listNamespacedDaemonSet path: /apis/apps/v1/namespaces/{namespace}/daemonsets
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 DaemonSetList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.Deployment(apiVersion: str | None = 'apps/v1', kind: str | None = 'Deployment', metadata: ObjectMeta | None = None, spec: DeploymentSpec | None = None, status: DeploymentStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
Deployment enables declarative updates for Pods and ReplicaSets.
Full name: Deployment
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
spec: Specification of the desired behavior of the Deployment. status: Most recently observed status of the Deployment.
- static deleteCollectionNamespacedDeployment(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Deployment] ¶
delete collection of Deployment
operationID: deleteCollectionNamespacedDeployment path: /apis/apps/v1/namespaces/{namespace}/deployments
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedDeployment(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Deployment] ¶
create a Deployment
operationID: createNamespacedDeployment path: /apis/apps/v1/namespaces/{namespace}/deployments
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Deployment OK 201 Deployment Created 202 Deployment Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) Deployment ¶
create a Deployment
operationID: createNamespacedDeployment path: /apis/apps/v1/namespaces/{namespace}/deployments
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedDeployment(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Deployment] ¶
delete a Deployment
operationID: deleteNamespacedDeployment path: /apis/apps/v1/namespaces/{namespace}/deployments/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) Deployment ¶
delete a Deployment
operationID: deleteNamespacedDeployment path: /apis/apps/v1/namespaces/{namespace}/deployments/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedDeployment(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Deployment] ¶
read the specified Deployment
operationID: readNamespacedDeployment path: /apis/apps/v1/namespaces/{namespace}/deployments/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Deployment OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) Deployment ¶
read the specified Deployment
operationID: readNamespacedDeployment path: /apis/apps/v1/namespaces/{namespace}/deployments/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedDeployment(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Deployment] ¶
partially update the specified Deployment
operationID: patchNamespacedDeployment path: /apis/apps/v1/namespaces/{namespace}/deployments/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Deployment OK 201 Deployment Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) Deployment ¶
partially update the specified Deployment
operationID: patchNamespacedDeployment path: /apis/apps/v1/namespaces/{namespace}/deployments/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedDeployment(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Deployment] ¶
replace the specified Deployment
operationID: replaceNamespacedDeployment path: /apis/apps/v1/namespaces/{namespace}/deployments/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Deployment OK 201 Deployment Created 401 None Unauthorized
- replaceNamespacedDeploymentStatus(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Deployment] ¶
replace status of the specified Deployment
operationID: replaceNamespacedDeploymentStatus path: /apis/apps/v1/namespaces/{namespace}/deployments/{name}/status
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Deployment OK 201 Deployment Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.DeploymentList(items: List[Deployment], apiVersion: str | None = 'apps/v1', kind: str | None = 'DeploymentList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
DeploymentList is a list of Deployments.
Full name: DeploymentList
Attributes: items: Items is the list of Deployments. apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
metadata: Standard list metadata.
- static listDeploymentForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[DeploymentList] ¶
list or watch objects of kind Deployment
operationID: listDeploymentForAllNamespaces path: /apis/apps/v1/deployments
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 DeploymentList OK 401 None Unauthorized
- static listNamespacedDeployment(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[DeploymentList] ¶
list or watch objects of kind Deployment
operationID: listNamespacedDeployment path: /apis/apps/v1/namespaces/{namespace}/deployments
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 DeploymentList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.ReplicaSet(apiVersion: str | None = 'apps/v1', kind: str | None = 'ReplicaSet', metadata: ObjectMeta | None = None, spec: ReplicaSetSpec | None = None, status: ReplicaSetStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
ReplicaSet ensures that a specified number of pod replicas are running at any given time.
Full name: ReplicaSet
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: 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/sig-architecture/api-conventions.md#metadata
- spec: Spec defines the specification of the desired behavior of the ReplicaSet. More
info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- status: Status is the most recently observed status of the ReplicaSet. This data may
be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- static deleteCollectionNamespacedReplicaSet(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ReplicaSet] ¶
delete collection of ReplicaSet
operationID: deleteCollectionNamespacedReplicaSet path: /apis/apps/v1/namespaces/{namespace}/replicasets
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedReplicaSet(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ReplicaSet] ¶
create a ReplicaSet
operationID: createNamespacedReplicaSet path: /apis/apps/v1/namespaces/{namespace}/replicasets
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ReplicaSet OK 201 ReplicaSet Created 202 ReplicaSet Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) ReplicaSet ¶
create a ReplicaSet
operationID: createNamespacedReplicaSet path: /apis/apps/v1/namespaces/{namespace}/replicasets
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedReplicaSet(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ReplicaSet] ¶
delete a ReplicaSet
operationID: deleteNamespacedReplicaSet path: /apis/apps/v1/namespaces/{namespace}/replicasets/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) ReplicaSet ¶
delete a ReplicaSet
operationID: deleteNamespacedReplicaSet path: /apis/apps/v1/namespaces/{namespace}/replicasets/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedReplicaSet(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ReplicaSet] ¶
read the specified ReplicaSet
operationID: readNamespacedReplicaSet path: /apis/apps/v1/namespaces/{namespace}/replicasets/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ReplicaSet OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) ReplicaSet ¶
read the specified ReplicaSet
operationID: readNamespacedReplicaSet path: /apis/apps/v1/namespaces/{namespace}/replicasets/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedReplicaSet(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ReplicaSet] ¶
partially update the specified ReplicaSet
operationID: patchNamespacedReplicaSet path: /apis/apps/v1/namespaces/{namespace}/replicasets/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ReplicaSet OK 201 ReplicaSet Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) ReplicaSet ¶
partially update the specified ReplicaSet
operationID: patchNamespacedReplicaSet path: /apis/apps/v1/namespaces/{namespace}/replicasets/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedReplicaSet(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ReplicaSet] ¶
replace the specified ReplicaSet
operationID: replaceNamespacedReplicaSet path: /apis/apps/v1/namespaces/{namespace}/replicasets/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ReplicaSet OK 201 ReplicaSet Created 401 None Unauthorized
- replaceNamespacedReplicaSetStatus(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ReplicaSet] ¶
replace status of the specified ReplicaSet
operationID: replaceNamespacedReplicaSetStatus path: /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ReplicaSet OK 201 ReplicaSet Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.ReplicaSetList(items: List[ReplicaSet], apiVersion: str | None = 'apps/v1', kind: str | None = 'ReplicaSetList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
ReplicaSetList is a collection of ReplicaSets.
Full name: ReplicaSetList
Attributes: items: List of ReplicaSets. More info:
- apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- static listNamespacedReplicaSet(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ReplicaSetList] ¶
list or watch objects of kind ReplicaSet
operationID: listNamespacedReplicaSet path: /apis/apps/v1/namespaces/{namespace}/replicasets
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ReplicaSetList OK 401 None Unauthorized
- static listReplicaSetForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ReplicaSetList] ¶
list or watch objects of kind ReplicaSet
operationID: listReplicaSetForAllNamespaces path: /apis/apps/v1/replicasets
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ReplicaSetList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.StatefulSet(apiVersion: str | None = 'apps/v1', kind: str | None = 'StatefulSet', metadata: ObjectMeta | None = None, spec: StatefulSetSpec | None = None, status: StatefulSetStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
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.
Full name: StatefulSet
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
spec: Spec defines the desired identities of pods in this set. status: Status is the current status of Pods in this StatefulSet. This data may be out
of date by some window of time.
- static deleteCollectionNamespacedStatefulSet(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[StatefulSet] ¶
delete collection of StatefulSet
operationID: deleteCollectionNamespacedStatefulSet path: /apis/apps/v1/namespaces/{namespace}/statefulsets
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedStatefulSet(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[StatefulSet] ¶
create a StatefulSet
operationID: createNamespacedStatefulSet path: /apis/apps/v1/namespaces/{namespace}/statefulsets
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 StatefulSet OK 201 StatefulSet Created 202 StatefulSet Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) StatefulSet ¶
create a StatefulSet
operationID: createNamespacedStatefulSet path: /apis/apps/v1/namespaces/{namespace}/statefulsets
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedStatefulSet(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[StatefulSet] ¶
delete a StatefulSet
operationID: deleteNamespacedStatefulSet path: /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) StatefulSet ¶
delete a StatefulSet
operationID: deleteNamespacedStatefulSet path: /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedStatefulSet(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[StatefulSet] ¶
read the specified StatefulSet
operationID: readNamespacedStatefulSet path: /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 StatefulSet OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) StatefulSet ¶
read the specified StatefulSet
operationID: readNamespacedStatefulSet path: /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedStatefulSet(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[StatefulSet] ¶
partially update the specified StatefulSet
operationID: patchNamespacedStatefulSet path: /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 StatefulSet OK 201 StatefulSet Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) StatefulSet ¶
partially update the specified StatefulSet
operationID: patchNamespacedStatefulSet path: /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedStatefulSet(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[StatefulSet] ¶
replace the specified StatefulSet
operationID: replaceNamespacedStatefulSet path: /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 StatefulSet OK 201 StatefulSet Created 401 None Unauthorized
- replaceNamespacedStatefulSetStatus(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[StatefulSet] ¶
replace status of the specified StatefulSet
operationID: replaceNamespacedStatefulSetStatus path: /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 StatefulSet OK 201 StatefulSet Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.StatefulSetList(items: List[StatefulSet], apiVersion: str | None = 'apps/v1', kind: str | None = 'StatefulSetList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
StatefulSetList is a collection of StatefulSets.
Full name: StatefulSetList
Attributes: items: Items is the list of stateful sets. apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- static listNamespacedStatefulSet(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[StatefulSetList] ¶
list or watch objects of kind StatefulSet
operationID: listNamespacedStatefulSet path: /apis/apps/v1/namespaces/{namespace}/statefulsets
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 StatefulSetList OK 401 None Unauthorized
- static listStatefulSetForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[StatefulSetList] ¶
list or watch objects of kind StatefulSet
operationID: listStatefulSetForAllNamespaces path: /apis/apps/v1/statefulsets
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 StatefulSetList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.TokenReview(spec: TokenReviewSpec, apiVersion: str | None = 'authentication.k8s.io/v1', kind: str | None = 'TokenReview', metadata: ObjectMeta | None = None, status: TokenReviewStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
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.
Full name: TokenReview
Attributes: spec: Spec holds information about the request being evaluated apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- status: Status is filled in by the server and indicates whether the request can be
authenticated.
- createTokenReview(client: ApiClient | None = None, async_req: bool = False) Response[TokenReview] ¶
create a TokenReview
operationID: createTokenReview path: /apis/authentication.k8s.io/v1/tokenreviews :param client: optional; instance of kubernetes.client.api_client.ApiClient :param async_req: bool; if True, call is async and the caller must invoke
.get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 TokenReview OK 201 TokenReview Created 202 TokenReview Accepted 401 None Unauthorized
- create(client: ApiClient | None = None) TokenReview ¶
create a TokenReview
operationID: createTokenReview path: /apis/authentication.k8s.io/v1/tokenreviews :param client: optional; instance of kubernetes.client.api_client.ApiClient :return: returns self; the state of self may be permuted with a returned
HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- class hikaru.model.rel_1_27.v1.documents.LocalSubjectAccessReview(spec: SubjectAccessReviewSpec, apiVersion: str | None = 'authorization.k8s.io/v1', kind: str | None = 'LocalSubjectAccessReview', metadata: ObjectMeta | None = None, status: SubjectAccessReviewStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
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.
Full name: LocalSubjectAccessReview
Attributes: spec: 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.
- apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- status: Status is filled in by the server and indicates whether the request is allowed
or not
- createNamespacedLocalSubjectAccessReview(namespace: str, client: ApiClient | None = None, async_req: bool = False) Response[LocalSubjectAccessReview] ¶
create a LocalSubjectAccessReview
operationID: createNamespacedLocalSubjectAccessReview path: /apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews
- Parameters:
namespace – namespace for the resource
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 LocalSubjectAccessReview OK 201 LocalSubjectAccessReview Created 202 LocalSubjectAccessReview Accepted 401 None Unauthorized
- create(namespace: str | None = None, client: ApiClient | None = None) LocalSubjectAccessReview ¶
create a LocalSubjectAccessReview
operationID: createNamespacedLocalSubjectAccessReview path: /apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- class hikaru.model.rel_1_27.v1.documents.SelfSubjectAccessReview(spec: SelfSubjectAccessReviewSpec, apiVersion: str | None = 'authorization.k8s.io/v1', kind: str | None = 'SelfSubjectAccessReview', metadata: ObjectMeta | None = None, status: SubjectAccessReviewStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
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
Full name: SelfSubjectAccessReview
Attributes: spec: Spec holds information about the request being evaluated. user and groups must
be empty
- apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- status: Status is filled in by the server and indicates whether the request is allowed
or not
- createSelfSubjectAccessReview(client: ApiClient | None = None, async_req: bool = False) Response[SelfSubjectAccessReview] ¶
create a SelfSubjectAccessReview
operationID: createSelfSubjectAccessReview path: /apis/authorization.k8s.io/v1/selfsubjectaccessreviews :param client: optional; instance of kubernetes.client.api_client.ApiClient :param async_req: bool; if True, call is async and the caller must invoke
.get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 SelfSubjectAccessReview OK 201 SelfSubjectAccessReview Created 202 SelfSubjectAccessReview Accepted 401 None Unauthorized
- create(client: ApiClient | None = None) SelfSubjectAccessReview ¶
create a SelfSubjectAccessReview
operationID: createSelfSubjectAccessReview path: /apis/authorization.k8s.io/v1/selfsubjectaccessreviews :param client: optional; instance of kubernetes.client.api_client.ApiClient :return: returns self; the state of self may be permuted with a returned
HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- class hikaru.model.rel_1_27.v1.documents.SelfSubjectRulesReview(spec: SelfSubjectRulesReviewSpec, apiVersion: str | None = 'authorization.k8s.io/v1', kind: str | None = 'SelfSubjectRulesReview', metadata: ObjectMeta | None = None, status: SubjectRulesReviewStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
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.
Full name: SelfSubjectRulesReview
Attributes: spec: Spec holds information about the request being evaluated. apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- status: Status is filled in by the server and indicates the set of actions a user can
perform.
- createSelfSubjectRulesReview(client: ApiClient | None = None, async_req: bool = False) Response[SelfSubjectRulesReview] ¶
create a SelfSubjectRulesReview
operationID: createSelfSubjectRulesReview path: /apis/authorization.k8s.io/v1/selfsubjectrulesreviews :param client: optional; instance of kubernetes.client.api_client.ApiClient :param async_req: bool; if True, call is async and the caller must invoke
.get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 SelfSubjectRulesReview OK 201 SelfSubjectRulesReview Created 202 SelfSubjectRulesReview Accepted 401 None Unauthorized
- create(client: ApiClient | None = None) SelfSubjectRulesReview ¶
create a SelfSubjectRulesReview
operationID: createSelfSubjectRulesReview path: /apis/authorization.k8s.io/v1/selfsubjectrulesreviews :param client: optional; instance of kubernetes.client.api_client.ApiClient :return: returns self; the state of self may be permuted with a returned
HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- class hikaru.model.rel_1_27.v1.documents.SubjectAccessReview(spec: SubjectAccessReviewSpec, apiVersion: str | None = 'authorization.k8s.io/v1', kind: str | None = 'SubjectAccessReview', metadata: ObjectMeta | None = None, status: SubjectAccessReviewStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
SubjectAccessReview checks whether or not a user or group can perform an action.
Full name: SubjectAccessReview
Attributes: spec: Spec holds information about the request being evaluated apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- status: Status is filled in by the server and indicates whether the request is allowed
or not
- createSubjectAccessReview(client: ApiClient | None = None, async_req: bool = False) Response[SubjectAccessReview] ¶
create a SubjectAccessReview
operationID: createSubjectAccessReview path: /apis/authorization.k8s.io/v1/subjectaccessreviews :param client: optional; instance of kubernetes.client.api_client.ApiClient :param async_req: bool; if True, call is async and the caller must invoke
.get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 SubjectAccessReview OK 201 SubjectAccessReview Created 202 SubjectAccessReview Accepted 401 None Unauthorized
- create(client: ApiClient | None = None) SubjectAccessReview ¶
create a SubjectAccessReview
operationID: createSubjectAccessReview path: /apis/authorization.k8s.io/v1/subjectaccessreviews :param client: optional; instance of kubernetes.client.api_client.ApiClient :return: returns self; the state of self may be permuted with a returned
HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- class hikaru.model.rel_1_27.v1.documents.HorizontalPodAutoscaler(apiVersion: str | None = 'autoscaling/v1', kind: str | None = 'HorizontalPodAutoscaler', metadata: ObjectMeta | None = None, spec: HorizontalPodAutoscalerSpec | None = None, status: HorizontalPodAutoscalerStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
configuration of a horizontal pod autoscaler.
Full name: HorizontalPodAutoscaler
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- spec: spec defines the behaviour of autoscaler. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
status: status is the current information about the autoscaler.
- static deleteCollectionNamespacedHorizontalPodAutoscaler(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[HorizontalPodAutoscaler] ¶
delete collection of HorizontalPodAutoscaler
operationID: deleteCollectionNamespacedHorizontalPodAutoscaler path: /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedHorizontalPodAutoscaler(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[HorizontalPodAutoscaler] ¶
create a HorizontalPodAutoscaler
operationID: createNamespacedHorizontalPodAutoscaler path: /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 HorizontalPodAutoscaler OK 201 HorizontalPodAutoscaler Created 202 HorizontalPodAutoscaler Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) HorizontalPodAutoscaler ¶
create a HorizontalPodAutoscaler
operationID: createNamespacedHorizontalPodAutoscaler path: /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedHorizontalPodAutoscaler(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[HorizontalPodAutoscaler] ¶
delete a HorizontalPodAutoscaler
operationID: deleteNamespacedHorizontalPodAutoscaler path: /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) HorizontalPodAutoscaler ¶
delete a HorizontalPodAutoscaler
operationID: deleteNamespacedHorizontalPodAutoscaler path: /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedHorizontalPodAutoscaler(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[HorizontalPodAutoscaler] ¶
read the specified HorizontalPodAutoscaler
operationID: readNamespacedHorizontalPodAutoscaler path: /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 HorizontalPodAutoscaler OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) HorizontalPodAutoscaler ¶
read the specified HorizontalPodAutoscaler
operationID: readNamespacedHorizontalPodAutoscaler path: /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedHorizontalPodAutoscaler(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[HorizontalPodAutoscaler] ¶
partially update the specified HorizontalPodAutoscaler
operationID: patchNamespacedHorizontalPodAutoscaler path: /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 HorizontalPodAutoscaler OK 201 HorizontalPodAutoscaler Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) HorizontalPodAutoscaler ¶
partially update the specified HorizontalPodAutoscaler
operationID: patchNamespacedHorizontalPodAutoscaler path: /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedHorizontalPodAutoscaler(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[HorizontalPodAutoscaler] ¶
replace the specified HorizontalPodAutoscaler
operationID: replaceNamespacedHorizontalPodAutoscaler path: /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 HorizontalPodAutoscaler OK 201 HorizontalPodAutoscaler Created 401 None Unauthorized
- replaceNamespacedHorizontalPodAutoscalerStatus(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[HorizontalPodAutoscaler] ¶
replace status of the specified HorizontalPodAutoscaler
operationID: replaceNamespacedHorizontalPodAutoscalerStatus path: /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 HorizontalPodAutoscaler OK 201 HorizontalPodAutoscaler Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.HorizontalPodAutoscalerList(items: List[HorizontalPodAutoscaler], apiVersion: str | None = 'autoscaling/v1', kind: str | None = 'HorizontalPodAutoscalerList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
list of horizontal pod autoscaler objects.
Full name: HorizontalPodAutoscalerList
Attributes: items: items is the list of horizontal pod autoscaler objects. apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
metadata: Standard list metadata.
- static listHorizontalPodAutoscalerForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[HorizontalPodAutoscalerList] ¶
list or watch objects of kind HorizontalPodAutoscaler
operationID: listHorizontalPodAutoscalerForAllNamespaces path: /apis/autoscaling/v1/horizontalpodautoscalers
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 HorizontalPodAutoscalerList OK 401 None Unauthorized
- static listNamespacedHorizontalPodAutoscaler(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[HorizontalPodAutoscalerList] ¶
list or watch objects of kind HorizontalPodAutoscaler
operationID: listNamespacedHorizontalPodAutoscaler path: /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 HorizontalPodAutoscalerList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.Scale(apiVersion: str | None = 'autoscaling/v1', kind: str | None = 'Scale', metadata: ObjectMeta | None = None, spec: ScaleSpec | None = None, status: ScaleStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
Scale represents a scaling request for a resource.
Full name: Scale
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object metadata; More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
- spec: spec defines the behavior of the scale. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
- status: status is the current status of the scale. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
- static readNamespacedReplicationControllerScale(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Scale] ¶
read scale of the specified ReplicationController
operationID: readNamespacedReplicationControllerScale path: /api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Scale OK 401 None Unauthorized
- patchNamespacedReplicationControllerScale(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Scale] ¶
partially update scale of the specified ReplicationController
operationID: patchNamespacedReplicationControllerScale path: /api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Scale OK 201 Scale Created 401 None Unauthorized
- replaceNamespacedReplicationControllerScale(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Scale] ¶
replace scale of the specified ReplicationController
operationID: replaceNamespacedReplicationControllerScale path: /api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Scale OK 201 Scale Created 401 None Unauthorized
- static readNamespacedDeploymentScale(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Scale] ¶
read scale of the specified Deployment
operationID: readNamespacedDeploymentScale path: /apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Scale OK 401 None Unauthorized
- patchNamespacedDeploymentScale(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Scale] ¶
partially update scale of the specified Deployment
operationID: patchNamespacedDeploymentScale path: /apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Scale OK 201 Scale Created 401 None Unauthorized
- replaceNamespacedDeploymentScale(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Scale] ¶
replace scale of the specified Deployment
operationID: replaceNamespacedDeploymentScale path: /apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Scale OK 201 Scale Created 401 None Unauthorized
- static readNamespacedReplicaSetScale(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Scale] ¶
read scale of the specified ReplicaSet
operationID: readNamespacedReplicaSetScale path: /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Scale OK 401 None Unauthorized
- patchNamespacedReplicaSetScale(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Scale] ¶
partially update scale of the specified ReplicaSet
operationID: patchNamespacedReplicaSetScale path: /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Scale OK 201 Scale Created 401 None Unauthorized
- replaceNamespacedReplicaSetScale(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Scale] ¶
replace scale of the specified ReplicaSet
operationID: replaceNamespacedReplicaSetScale path: /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Scale OK 201 Scale Created 401 None Unauthorized
- static readNamespacedStatefulSetScale(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Scale] ¶
read scale of the specified StatefulSet
operationID: readNamespacedStatefulSetScale path: /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Scale OK 401 None Unauthorized
- patchNamespacedStatefulSetScale(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Scale] ¶
partially update scale of the specified StatefulSet
operationID: patchNamespacedStatefulSetScale path: /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Scale OK 201 Scale Created 401 None Unauthorized
- replaceNamespacedStatefulSetScale(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Scale] ¶
replace scale of the specified StatefulSet
operationID: replaceNamespacedStatefulSetScale path: /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Scale OK 201 Scale Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.CronJob(apiVersion: str | None = 'batch/v1', kind: str | None = 'CronJob', metadata: ObjectMeta | None = None, spec: CronJobSpec | None = None, status: CronJobStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
CronJob represents the configuration of a single cron job.
Full name: CronJob
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- spec: Specification of the desired behavior of a cron job, including the schedule.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- status: Current status of a cron job. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- static deleteCollectionNamespacedCronJob(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CronJob] ¶
delete collection of CronJob
operationID: deleteCollectionNamespacedCronJob path: /apis/batch/v1/namespaces/{namespace}/cronjobs
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedCronJob(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CronJob] ¶
create a CronJob
operationID: createNamespacedCronJob path: /apis/batch/v1/namespaces/{namespace}/cronjobs
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CronJob OK 201 CronJob Created 202 CronJob Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) CronJob ¶
create a CronJob
operationID: createNamespacedCronJob path: /apis/batch/v1/namespaces/{namespace}/cronjobs
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedCronJob(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CronJob] ¶
delete a CronJob
operationID: deleteNamespacedCronJob path: /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) CronJob ¶
delete a CronJob
operationID: deleteNamespacedCronJob path: /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedCronJob(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CronJob] ¶
read the specified CronJob
operationID: readNamespacedCronJob path: /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CronJob OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) CronJob ¶
read the specified CronJob
operationID: readNamespacedCronJob path: /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedCronJob(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CronJob] ¶
partially update the specified CronJob
operationID: patchNamespacedCronJob path: /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CronJob OK 201 CronJob Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) CronJob ¶
partially update the specified CronJob
operationID: patchNamespacedCronJob path: /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedCronJob(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CronJob] ¶
replace the specified CronJob
operationID: replaceNamespacedCronJob path: /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CronJob OK 201 CronJob Created 401 None Unauthorized
- replaceNamespacedCronJobStatus(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CronJob] ¶
replace status of the specified CronJob
operationID: replaceNamespacedCronJobStatus path: /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CronJob OK 201 CronJob Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.CronJobList(items: List[CronJob], apiVersion: str | None = 'batch/v1', kind: str | None = 'CronJobList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
CronJobList is a collection of cron jobs.
Full name: CronJobList
Attributes: items: items is the list of CronJobs. apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- static listCronJobForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CronJobList] ¶
list or watch objects of kind CronJob
operationID: listCronJobForAllNamespaces path: /apis/batch/v1/cronjobs
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CronJobList OK 401 None Unauthorized
- static listNamespacedCronJob(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CronJobList] ¶
list or watch objects of kind CronJob
operationID: listNamespacedCronJob path: /apis/batch/v1/namespaces/{namespace}/cronjobs
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CronJobList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.Job(apiVersion: str | None = 'batch/v1', kind: str | None = 'Job', metadata: ObjectMeta | None = None, spec: JobSpec | None = None, status: JobStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
Job represents the configuration of a single job.
Full name: Job
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- spec: Specification of the desired behavior of a job. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- status: Current status of a job. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- static deleteCollectionNamespacedJob(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Job] ¶
delete collection of Job
operationID: deleteCollectionNamespacedJob path: /apis/batch/v1/namespaces/{namespace}/jobs
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedJob(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Job] ¶
create a Job
operationID: createNamespacedJob path: /apis/batch/v1/namespaces/{namespace}/jobs
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Job OK 201 Job Created 202 Job Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) Job ¶
create a Job
operationID: createNamespacedJob path: /apis/batch/v1/namespaces/{namespace}/jobs
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedJob(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Job] ¶
delete a Job
operationID: deleteNamespacedJob path: /apis/batch/v1/namespaces/{namespace}/jobs/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) Job ¶
delete a Job
operationID: deleteNamespacedJob path: /apis/batch/v1/namespaces/{namespace}/jobs/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedJob(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Job] ¶
read the specified Job
operationID: readNamespacedJob path: /apis/batch/v1/namespaces/{namespace}/jobs/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Job OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) Job ¶
read the specified Job
operationID: readNamespacedJob path: /apis/batch/v1/namespaces/{namespace}/jobs/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedJob(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Job] ¶
partially update the specified Job
operationID: patchNamespacedJob path: /apis/batch/v1/namespaces/{namespace}/jobs/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Job OK 201 Job Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) Job ¶
partially update the specified Job
operationID: patchNamespacedJob path: /apis/batch/v1/namespaces/{namespace}/jobs/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedJob(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Job] ¶
replace the specified Job
operationID: replaceNamespacedJob path: /apis/batch/v1/namespaces/{namespace}/jobs/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Job OK 201 Job Created 401 None Unauthorized
- replaceNamespacedJobStatus(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Job] ¶
replace status of the specified Job
operationID: replaceNamespacedJobStatus path: /apis/batch/v1/namespaces/{namespace}/jobs/{name}/status
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Job OK 201 Job Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.JobList(items: List[Job], apiVersion: str | None = 'batch/v1', kind: str | None = 'JobList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
JobList is a collection of jobs.
Full name: JobList
Attributes: items: items is the list of Jobs. apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- static listJobForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[JobList] ¶
list or watch objects of kind Job
operationID: listJobForAllNamespaces path: /apis/batch/v1/jobs
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 JobList OK 401 None Unauthorized
- static listNamespacedJob(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[JobList] ¶
list or watch objects of kind Job
operationID: listNamespacedJob path: /apis/batch/v1/namespaces/{namespace}/jobs
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 JobList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.CertificateSigningRequest(spec: CertificateSigningRequestSpec, apiVersion: str | None = 'certificates.k8s.io/v1', kind: str | None = 'CertificateSigningRequest', metadata: ObjectMeta | None = None, status: CertificateSigningRequestStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
CertificateSigningRequest objects provide a mechanism to obtain x509 certificates by submitting a certificate signing request, and having it asynchronously approved and issued. Kubelets use this API to obtain: 1. client certificates to authenticate to kube-apiserver (with the “kubernetes.io/kube-apiserver-client-kubelet” signerName). 2. serving certificates for TLS endpoints kube-apiserver can connect to securely (with the “kubernetes.io/kubelet-serving” signerName). This API can be used to request client certificates to authenticate to kube-apiserver (with the “kubernetes.io/kube-apiserver-client” signerName), or to obtain certificates from custom non-Kubernetes signers.
Full name: CertificateSigningRequest
Attributes: spec: spec contains the certificate request, and is immutable after creation. Only the
request, signerName, expirationSeconds, and usages fields can be set on creation. Other fields are derived by Kubernetes and cannot be modified by users.
- apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
metadata: status: status contains information about whether the request is approved or denied,
and the certificate issued by the signer, or the failure condition indicating signer failure.
- static deleteCollectionCertificateSigningRequest(continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CertificateSigningRequest] ¶
delete collection of CertificateSigningRequest
operationID: deleteCollectionCertificateSigningRequest path: /apis/certificates.k8s.io/v1/certificatesigningrequests
- Parameters:
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createCertificateSigningRequest(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CertificateSigningRequest] ¶
create a CertificateSigningRequest
operationID: createCertificateSigningRequest path: /apis/certificates.k8s.io/v1/certificatesigningrequests
- Parameters:
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CertificateSigningRequest OK 201 CertificateSigningRequest Created 202 CertificateSigningRequest Accepted 401 None Unauthorized
- create(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) CertificateSigningRequest ¶
create a CertificateSigningRequest
operationID: createCertificateSigningRequest path: /apis/certificates.k8s.io/v1/certificatesigningrequests
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteCertificateSigningRequest(name: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CertificateSigningRequest] ¶
delete a CertificateSigningRequest
operationID: deleteCertificateSigningRequest path: /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) CertificateSigningRequest ¶
delete a CertificateSigningRequest
operationID: deleteCertificateSigningRequest path: /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readCertificateSigningRequest(name: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CertificateSigningRequest] ¶
read the specified CertificateSigningRequest
operationID: readCertificateSigningRequest path: /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}
- Parameters:
name – name for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CertificateSigningRequest OK 401 None Unauthorized
- read(name: str | None = None, pretty: str | None = None, client: ApiClient | None = None) CertificateSigningRequest ¶
read the specified CertificateSigningRequest
operationID: readCertificateSigningRequest path: /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchCertificateSigningRequest(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CertificateSigningRequest] ¶
partially update the specified CertificateSigningRequest
operationID: patchCertificateSigningRequest path: /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CertificateSigningRequest OK 201 CertificateSigningRequest Created 401 None Unauthorized
- update(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) CertificateSigningRequest ¶
partially update the specified CertificateSigningRequest
operationID: patchCertificateSigningRequest path: /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceCertificateSigningRequest(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CertificateSigningRequest] ¶
replace the specified CertificateSigningRequest
operationID: replaceCertificateSigningRequest path: /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CertificateSigningRequest OK 201 CertificateSigningRequest Created 401 None Unauthorized
- static readCertificateSigningRequestApproval(name: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CertificateSigningRequest] ¶
read approval of the specified CertificateSigningRequest
operationID: readCertificateSigningRequestApproval path: /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval
- Parameters:
name – name for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CertificateSigningRequest OK 401 None Unauthorized
- patchCertificateSigningRequestApproval(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CertificateSigningRequest] ¶
partially update approval of the specified CertificateSigningRequest
operationID: patchCertificateSigningRequestApproval path: /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CertificateSigningRequest OK 201 CertificateSigningRequest Created 401 None Unauthorized
- replaceCertificateSigningRequestApproval(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CertificateSigningRequest] ¶
replace approval of the specified CertificateSigningRequest
operationID: replaceCertificateSigningRequestApproval path: /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CertificateSigningRequest OK 201 CertificateSigningRequest Created 401 None Unauthorized
- replaceCertificateSigningRequestStatus(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CertificateSigningRequest] ¶
replace status of the specified CertificateSigningRequest
operationID: replaceCertificateSigningRequestStatus path: /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CertificateSigningRequest OK 201 CertificateSigningRequest Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.CertificateSigningRequestList(items: List[CertificateSigningRequest], apiVersion: str | None = 'certificates.k8s.io/v1', kind: str | None = 'CertificateSigningRequestList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
CertificateSigningRequestList is a collection of CertificateSigningRequest objects
Full name: CertificateSigningRequestList
Attributes: items: items is a collection of CertificateSigningRequest objects apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
metadata:
- static listCertificateSigningRequest(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CertificateSigningRequestList] ¶
list or watch objects of kind CertificateSigningRequest
operationID: listCertificateSigningRequest path: /apis/certificates.k8s.io/v1/certificatesigningrequests
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CertificateSigningRequestList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.Lease(apiVersion: str | None = 'coordination.k8s.io/v1', kind: str | None = 'Lease', metadata: ObjectMeta | None = None, spec: LeaseSpec | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
Lease defines a lease concept.
Full name: Lease
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- spec: spec contains the specification of the Lease. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- static deleteCollectionNamespacedLease(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Lease] ¶
delete collection of Lease
operationID: deleteCollectionNamespacedLease path: /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedLease(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Lease] ¶
create a Lease
operationID: createNamespacedLease path: /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Lease OK 201 Lease Created 202 Lease Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) Lease ¶
create a Lease
operationID: createNamespacedLease path: /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedLease(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Lease] ¶
delete a Lease
operationID: deleteNamespacedLease path: /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) Lease ¶
delete a Lease
operationID: deleteNamespacedLease path: /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedLease(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Lease] ¶
read the specified Lease
operationID: readNamespacedLease path: /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Lease OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) Lease ¶
read the specified Lease
operationID: readNamespacedLease path: /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedLease(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Lease] ¶
partially update the specified Lease
operationID: patchNamespacedLease path: /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Lease OK 201 Lease Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) Lease ¶
partially update the specified Lease
operationID: patchNamespacedLease path: /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedLease(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Lease] ¶
replace the specified Lease
operationID: replaceNamespacedLease path: /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Lease OK 201 Lease Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.LeaseList(items: List[Lease], apiVersion: str | None = 'coordination.k8s.io/v1', kind: str | None = 'LeaseList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
LeaseList is a list of Lease objects.
Full name: LeaseList
Attributes: items: items is a list of schema objects. apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- static listLeaseForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[LeaseList] ¶
list or watch objects of kind Lease
operationID: listLeaseForAllNamespaces path: /apis/coordination.k8s.io/v1/leases
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 LeaseList OK 401 None Unauthorized
- static listNamespacedLease(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[LeaseList] ¶
list or watch objects of kind Lease
operationID: listNamespacedLease path: /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 LeaseList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.Binding(target: ObjectReference, apiVersion: str | None = 'v1', kind: str | None = 'Binding', metadata: ObjectMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
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.
Full name: Binding
Attributes: target: The target object that you want to bind to the standard object. apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- createNamespacedBinding(namespace: str, client: ApiClient | None = None, async_req: bool = False) Response[Binding] ¶
create a Binding
operationID: createNamespacedBinding path: /api/v1/namespaces/{namespace}/bindings
- Parameters:
namespace – namespace for the resource
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Binding OK 201 Binding Created 202 Binding Accepted 401 None Unauthorized
- create(namespace: str | None = None, client: ApiClient | None = None) Binding ¶
create a Binding
operationID: createNamespacedBinding path: /api/v1/namespaces/{namespace}/bindings
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- createNamespacedPodBinding(name: str, namespace: str, client: ApiClient | None = None, async_req: bool = False) Response[Binding] ¶
create binding of a Pod
operationID: createNamespacedPodBinding path: /api/v1/namespaces/{namespace}/pods/{name}/binding
- Parameters:
name – name for the resource
namespace – namespace for the resource
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Binding OK 201 Binding Created 202 Binding Accepted 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.ComponentStatus(apiVersion: str | None = 'v1', kind: str | None = 'ComponentStatus', metadata: ObjectMeta | None = None, conditions: ~typing.List[ComponentCondition] | None = <factory>, client: dataclasses.InitVar[typing.Optional[kubernetes.client.api_client.ApiClient]] = None)¶
ComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+
Full name: ComponentStatus
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
conditions: List of component conditions observed
- static readComponentStatus(name: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ComponentStatus] ¶
read the specified ComponentStatus
operationID: readComponentStatus path: /api/v1/componentstatuses/{name}
- Parameters:
name – name for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ComponentStatus OK 401 None Unauthorized
- read(name: str | None = None, pretty: str | None = None, client: ApiClient | None = None) ComponentStatus ¶
read the specified ComponentStatus
operationID: readComponentStatus path: /api/v1/componentstatuses/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- class hikaru.model.rel_1_27.v1.documents.ComponentStatusList(items: List[ComponentStatus], apiVersion: str | None = 'v1', kind: str | None = 'ComponentStatusList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
Status of all the conditions for the component as a list of ComponentStatus objects. Deprecated: This API is deprecated in v1.19+
Full name: ComponentStatusList
Attributes: items: List of ComponentStatus objects. apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- static listComponentStatus(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ComponentStatusList] ¶
list objects of kind ComponentStatus
operationID: listComponentStatus path: /api/v1/componentstatuses
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ComponentStatusList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.ConfigMap(apiVersion: str | None = 'v1', immutable: bool | None = None, kind: str | None = 'ConfigMap', metadata: ObjectMeta | None = None, binaryData: ~typing.Dict[str, str] | None = <factory>, data: ~typing.Dict[str, str] | None = <factory>, client: dataclasses.InitVar[typing.Optional[kubernetes.client.api_client.ApiClient]] = None)¶
ConfigMap holds configuration data for pods to consume.
Full name: ConfigMap
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- immutable: Immutable, if set to true, ensures that data stored in the ConfigMap cannot
be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil.
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- binaryData: BinaryData contains the binary data. Each key must consist of alphanumeric
characters, ‘-’, ‘_’ or ‘.’. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet.
- data: Data contains the configuration data. Each key must consist of alphanumeric
characters, ‘-’, ‘_’ or ‘.’. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process.
- static deleteCollectionNamespacedConfigMap(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ConfigMap] ¶
delete collection of ConfigMap
operationID: deleteCollectionNamespacedConfigMap path: /api/v1/namespaces/{namespace}/configmaps
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedConfigMap(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ConfigMap] ¶
create a ConfigMap
operationID: createNamespacedConfigMap path: /api/v1/namespaces/{namespace}/configmaps
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ConfigMap OK 201 ConfigMap Created 202 ConfigMap Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) ConfigMap ¶
create a ConfigMap
operationID: createNamespacedConfigMap path: /api/v1/namespaces/{namespace}/configmaps
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedConfigMap(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ConfigMap] ¶
delete a ConfigMap
operationID: deleteNamespacedConfigMap path: /api/v1/namespaces/{namespace}/configmaps/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) ConfigMap ¶
delete a ConfigMap
operationID: deleteNamespacedConfigMap path: /api/v1/namespaces/{namespace}/configmaps/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedConfigMap(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ConfigMap] ¶
read the specified ConfigMap
operationID: readNamespacedConfigMap path: /api/v1/namespaces/{namespace}/configmaps/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ConfigMap OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) ConfigMap ¶
read the specified ConfigMap
operationID: readNamespacedConfigMap path: /api/v1/namespaces/{namespace}/configmaps/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedConfigMap(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ConfigMap] ¶
partially update the specified ConfigMap
operationID: patchNamespacedConfigMap path: /api/v1/namespaces/{namespace}/configmaps/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ConfigMap OK 201 ConfigMap Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) ConfigMap ¶
partially update the specified ConfigMap
operationID: patchNamespacedConfigMap path: /api/v1/namespaces/{namespace}/configmaps/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedConfigMap(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ConfigMap] ¶
replace the specified ConfigMap
operationID: replaceNamespacedConfigMap path: /api/v1/namespaces/{namespace}/configmaps/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ConfigMap OK 201 ConfigMap Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.ConfigMapList(items: List[ConfigMap], apiVersion: str | None = 'v1', kind: str | None = 'ConfigMapList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
ConfigMapList is a resource containing a list of ConfigMap objects.
Full name: ConfigMapList
Attributes: items: Items is the list of ConfigMaps. apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- static listConfigMapForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ConfigMapList] ¶
list or watch objects of kind ConfigMap
operationID: listConfigMapForAllNamespaces path: /api/v1/configmaps
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ConfigMapList OK 401 None Unauthorized
- static listNamespacedConfigMap(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ConfigMapList] ¶
list or watch objects of kind ConfigMap
operationID: listNamespacedConfigMap path: /api/v1/namespaces/{namespace}/configmaps
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ConfigMapList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.Endpoints(apiVersion: str | None = 'v1', kind: str | None = 'Endpoints', metadata: ObjectMeta | None = None, subsets: ~typing.List[EndpointSubset] | None = <factory>, client: dataclasses.InitVar[typing.Optional[kubernetes.client.api_client.ApiClient]] = None)¶
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}] }, ]
Full name: Endpoints
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- 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.
- static deleteCollectionNamespacedEndpoints(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Endpoints] ¶
delete collection of Endpoints
operationID: deleteCollectionNamespacedEndpoints path: /api/v1/namespaces/{namespace}/endpoints
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedEndpoints(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Endpoints] ¶
create Endpoints
operationID: createNamespacedEndpoints path: /api/v1/namespaces/{namespace}/endpoints
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Endpoints OK 201 Endpoints Created 202 Endpoints Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) Endpoints ¶
create Endpoints
operationID: createNamespacedEndpoints path: /api/v1/namespaces/{namespace}/endpoints
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedEndpoints(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Endpoints] ¶
delete Endpoints
operationID: deleteNamespacedEndpoints path: /api/v1/namespaces/{namespace}/endpoints/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) Endpoints ¶
delete Endpoints
operationID: deleteNamespacedEndpoints path: /api/v1/namespaces/{namespace}/endpoints/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedEndpoints(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Endpoints] ¶
read the specified Endpoints
operationID: readNamespacedEndpoints path: /api/v1/namespaces/{namespace}/endpoints/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Endpoints OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) Endpoints ¶
read the specified Endpoints
operationID: readNamespacedEndpoints path: /api/v1/namespaces/{namespace}/endpoints/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedEndpoints(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Endpoints] ¶
partially update the specified Endpoints
operationID: patchNamespacedEndpoints path: /api/v1/namespaces/{namespace}/endpoints/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Endpoints OK 201 Endpoints Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) Endpoints ¶
partially update the specified Endpoints
operationID: patchNamespacedEndpoints path: /api/v1/namespaces/{namespace}/endpoints/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedEndpoints(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Endpoints] ¶
replace the specified Endpoints
operationID: replaceNamespacedEndpoints path: /api/v1/namespaces/{namespace}/endpoints/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Endpoints OK 201 Endpoints Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.EndpointsList(items: List[Endpoints], apiVersion: str | None = 'v1', kind: str | None = 'EndpointsList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
EndpointsList is a list of endpoints.
Full name: EndpointsList
Attributes: items: List of endpoints. apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- static listEndpointsForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[EndpointsList] ¶
list or watch objects of kind Endpoints
operationID: listEndpointsForAllNamespaces path: /api/v1/endpoints
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 EndpointsList OK 401 None Unauthorized
- static listNamespacedEndpoints(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[EndpointsList] ¶
list or watch objects of kind Endpoints
operationID: listNamespacedEndpoints path: /api/v1/namespaces/{namespace}/endpoints
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 EndpointsList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.LimitRange(apiVersion: str | None = 'v1', kind: str | None = 'LimitRange', metadata: ObjectMeta | None = None, spec: LimitRangeSpec | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
LimitRange sets resource usage limits for each kind of resource in a Namespace.
Full name: LimitRange
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- spec: Spec defines the limits enforced. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- static deleteCollectionNamespacedLimitRange(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[LimitRange] ¶
delete collection of LimitRange
operationID: deleteCollectionNamespacedLimitRange path: /api/v1/namespaces/{namespace}/limitranges
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedLimitRange(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[LimitRange] ¶
create a LimitRange
operationID: createNamespacedLimitRange path: /api/v1/namespaces/{namespace}/limitranges
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 LimitRange OK 201 LimitRange Created 202 LimitRange Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) LimitRange ¶
create a LimitRange
operationID: createNamespacedLimitRange path: /api/v1/namespaces/{namespace}/limitranges
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedLimitRange(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[LimitRange] ¶
delete a LimitRange
operationID: deleteNamespacedLimitRange path: /api/v1/namespaces/{namespace}/limitranges/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) LimitRange ¶
delete a LimitRange
operationID: deleteNamespacedLimitRange path: /api/v1/namespaces/{namespace}/limitranges/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedLimitRange(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[LimitRange] ¶
read the specified LimitRange
operationID: readNamespacedLimitRange path: /api/v1/namespaces/{namespace}/limitranges/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 LimitRange OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) LimitRange ¶
read the specified LimitRange
operationID: readNamespacedLimitRange path: /api/v1/namespaces/{namespace}/limitranges/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedLimitRange(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[LimitRange] ¶
partially update the specified LimitRange
operationID: patchNamespacedLimitRange path: /api/v1/namespaces/{namespace}/limitranges/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 LimitRange OK 201 LimitRange Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) LimitRange ¶
partially update the specified LimitRange
operationID: patchNamespacedLimitRange path: /api/v1/namespaces/{namespace}/limitranges/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedLimitRange(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[LimitRange] ¶
replace the specified LimitRange
operationID: replaceNamespacedLimitRange path: /api/v1/namespaces/{namespace}/limitranges/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 LimitRange OK 201 LimitRange Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.LimitRangeList(items: List[LimitRange], apiVersion: str | None = 'v1', kind: str | None = 'LimitRangeList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
LimitRangeList is a list of LimitRange items.
Full name: LimitRangeList
Attributes: items: Items is a list of LimitRange objects. More info:
- apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- static listLimitRangeForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[LimitRangeList] ¶
list or watch objects of kind LimitRange
operationID: listLimitRangeForAllNamespaces path: /api/v1/limitranges
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 LimitRangeList OK 401 None Unauthorized
- static listNamespacedLimitRange(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[LimitRangeList] ¶
list or watch objects of kind LimitRange
operationID: listNamespacedLimitRange path: /api/v1/namespaces/{namespace}/limitranges
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 LimitRangeList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.Namespace(apiVersion: str | None = 'v1', kind: str | None = 'Namespace', metadata: ObjectMeta | None = None, spec: NamespaceSpec | None = None, status: NamespaceStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
Namespace provides a scope for Names. Use of multiple namespaces is optional.
Full name: Namespace
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- spec: Spec defines the behavior of the Namespace. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- status: Status describes the current status of a Namespace. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- createNamespace(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Namespace] ¶
create a Namespace
operationID: createNamespace path: /api/v1/namespaces
- Parameters:
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Namespace OK 201 Namespace Created 202 Namespace Accepted 401 None Unauthorized
- create(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) Namespace ¶
create a Namespace
operationID: createNamespace path: /api/v1/namespaces
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespace(name: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Namespace] ¶
delete a Namespace
operationID: deleteNamespace path: /api/v1/namespaces/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) Namespace ¶
delete a Namespace
operationID: deleteNamespace path: /api/v1/namespaces/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespace(name: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Namespace] ¶
read the specified Namespace
operationID: readNamespace path: /api/v1/namespaces/{name}
- Parameters:
name – name for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Namespace OK 401 None Unauthorized
- read(name: str | None = None, pretty: str | None = None, client: ApiClient | None = None) Namespace ¶
read the specified Namespace
operationID: readNamespace path: /api/v1/namespaces/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespace(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Namespace] ¶
partially update the specified Namespace
operationID: patchNamespace path: /api/v1/namespaces/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Namespace OK 201 Namespace Created 401 None Unauthorized
- update(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) Namespace ¶
partially update the specified Namespace
operationID: patchNamespace path: /api/v1/namespaces/{name}
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespace(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Namespace] ¶
replace the specified Namespace
operationID: replaceNamespace path: /api/v1/namespaces/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Namespace OK 201 Namespace Created 401 None Unauthorized
- replaceNamespaceFinalize(name: str, client: ApiClient | None = None, async_req: bool = False) Response[Namespace] ¶
replace finalize of the specified Namespace
operationID: replaceNamespaceFinalize path: /api/v1/namespaces/{name}/finalize
- Parameters:
name – name for the resource
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Namespace OK 201 Namespace Created 401 None Unauthorized
- replaceNamespaceStatus(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Namespace] ¶
replace status of the specified Namespace
operationID: replaceNamespaceStatus path: /api/v1/namespaces/{name}/status
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Namespace OK 201 Namespace Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.NamespaceList(items: List[Namespace], apiVersion: str | None = 'v1', kind: str | None = 'NamespaceList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
NamespaceList is a list of Namespaces.
Full name: NamespaceList
Attributes: items: Items is the list of Namespace objects in the list. More info:
- apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- static listNamespace(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[NamespaceList] ¶
list or watch objects of kind Namespace
operationID: listNamespace path: /api/v1/namespaces
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 NamespaceList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.Node(apiVersion: str | None = 'v1', kind: str | None = 'Node', metadata: ObjectMeta | None = None, spec: NodeSpec | None = None, status: NodeStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd).
Full name: Node
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- spec: Spec defines the behavior of a node.
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- status: Most recently observed status of the node. Populated by the system. Read-only.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- static deleteCollectionNode(continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Node] ¶
delete collection of Node
operationID: deleteCollectionNode path: /api/v1/nodes
- Parameters:
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNode(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Node] ¶
create a Node
operationID: createNode path: /api/v1/nodes
- Parameters:
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Node OK 201 Node Created 202 Node Accepted 401 None Unauthorized
- create(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) Node ¶
create a Node
operationID: createNode path: /api/v1/nodes
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNode(name: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Node] ¶
delete a Node
operationID: deleteNode path: /api/v1/nodes/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) Node ¶
delete a Node
operationID: deleteNode path: /api/v1/nodes/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNode(name: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Node] ¶
read the specified Node
operationID: readNode path: /api/v1/nodes/{name}
- Parameters:
name – name for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Node OK 401 None Unauthorized
- read(name: str | None = None, pretty: str | None = None, client: ApiClient | None = None) Node ¶
read the specified Node
operationID: readNode path: /api/v1/nodes/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNode(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Node] ¶
partially update the specified Node
operationID: patchNode path: /api/v1/nodes/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Node OK 201 Node Created 401 None Unauthorized
- update(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) Node ¶
partially update the specified Node
operationID: patchNode path: /api/v1/nodes/{name}
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNode(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Node] ¶
replace the specified Node
operationID: replaceNode path: /api/v1/nodes/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Node OK 201 Node Created 401 None Unauthorized
- replaceNodeStatus(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Node] ¶
replace status of the specified Node
operationID: replaceNodeStatus path: /api/v1/nodes/{name}/status
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Node OK 201 Node Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.NodeList(items: List[Node], apiVersion: str | None = 'v1', kind: str | None = 'NodeList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
NodeList is the whole list of all Nodes which have been registered with master.
Full name: NodeList
Attributes: items: List of nodes apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- static listNode(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[NodeList] ¶
list or watch objects of kind Node
operationID: listNode path: /api/v1/nodes
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 NodeList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.PersistentVolume(apiVersion: str | None = 'v1', kind: str | None = 'PersistentVolume', metadata: ObjectMeta | None = None, spec: PersistentVolumeSpec | None = None, status: PersistentVolumeStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
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
Full name: PersistentVolume
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- spec: 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
- status: status represents the current information/status for the persistent volume.
Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes
- static deleteCollectionPersistentVolume(continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PersistentVolume] ¶
delete collection of PersistentVolume
operationID: deleteCollectionPersistentVolume path: /api/v1/persistentvolumes
- Parameters:
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createPersistentVolume(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PersistentVolume] ¶
create a PersistentVolume
operationID: createPersistentVolume path: /api/v1/persistentvolumes
- Parameters:
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PersistentVolume OK 201 PersistentVolume Created 202 PersistentVolume Accepted 401 None Unauthorized
- create(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) PersistentVolume ¶
create a PersistentVolume
operationID: createPersistentVolume path: /api/v1/persistentvolumes
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deletePersistentVolume(name: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PersistentVolume] ¶
delete a PersistentVolume
operationID: deletePersistentVolume path: /api/v1/persistentvolumes/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PersistentVolume OK 202 PersistentVolume Accepted 401 None Unauthorized
- delete(name: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) PersistentVolume ¶
delete a PersistentVolume
operationID: deletePersistentVolume path: /api/v1/persistentvolumes/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readPersistentVolume(name: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PersistentVolume] ¶
read the specified PersistentVolume
operationID: readPersistentVolume path: /api/v1/persistentvolumes/{name}
- Parameters:
name – name for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PersistentVolume OK 401 None Unauthorized
- read(name: str | None = None, pretty: str | None = None, client: ApiClient | None = None) PersistentVolume ¶
read the specified PersistentVolume
operationID: readPersistentVolume path: /api/v1/persistentvolumes/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchPersistentVolume(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PersistentVolume] ¶
partially update the specified PersistentVolume
operationID: patchPersistentVolume path: /api/v1/persistentvolumes/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PersistentVolume OK 201 PersistentVolume Created 401 None Unauthorized
- update(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) PersistentVolume ¶
partially update the specified PersistentVolume
operationID: patchPersistentVolume path: /api/v1/persistentvolumes/{name}
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replacePersistentVolume(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PersistentVolume] ¶
replace the specified PersistentVolume
operationID: replacePersistentVolume path: /api/v1/persistentvolumes/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PersistentVolume OK 201 PersistentVolume Created 401 None Unauthorized
- replacePersistentVolumeStatus(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PersistentVolume] ¶
replace status of the specified PersistentVolume
operationID: replacePersistentVolumeStatus path: /api/v1/persistentvolumes/{name}/status
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PersistentVolume OK 201 PersistentVolume Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.PersistentVolumeClaim(apiVersion: str | None = 'v1', kind: str | None = 'PersistentVolumeClaim', metadata: ObjectMeta | None = None, spec: PersistentVolumeClaimSpec | None = None, status: PersistentVolumeClaimStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
PersistentVolumeClaim is a user’s request for and claim to a persistent volume
Full name: PersistentVolumeClaim
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- spec: spec defines the desired characteristics of a volume requested by a pod author.
More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
- status: status represents the current information/status of a persistent volume claim.
Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
- static deleteCollectionNamespacedPersistentVolumeClaim(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PersistentVolumeClaim] ¶
delete collection of PersistentVolumeClaim
operationID: deleteCollectionNamespacedPersistentVolumeClaim path: /api/v1/namespaces/{namespace}/persistentvolumeclaims
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedPersistentVolumeClaim(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PersistentVolumeClaim] ¶
create a PersistentVolumeClaim
operationID: createNamespacedPersistentVolumeClaim path: /api/v1/namespaces/{namespace}/persistentvolumeclaims
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PersistentVolumeClaim OK 201 PersistentVolumeClaim Created 202 PersistentVolumeClaim Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) PersistentVolumeClaim ¶
create a PersistentVolumeClaim
operationID: createNamespacedPersistentVolumeClaim path: /api/v1/namespaces/{namespace}/persistentvolumeclaims
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedPersistentVolumeClaim(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PersistentVolumeClaim] ¶
delete a PersistentVolumeClaim
operationID: deleteNamespacedPersistentVolumeClaim path: /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PersistentVolumeClaim OK 202 PersistentVolumeClaim Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) PersistentVolumeClaim ¶
delete a PersistentVolumeClaim
operationID: deleteNamespacedPersistentVolumeClaim path: /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedPersistentVolumeClaim(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PersistentVolumeClaim] ¶
read the specified PersistentVolumeClaim
operationID: readNamespacedPersistentVolumeClaim path: /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PersistentVolumeClaim OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) PersistentVolumeClaim ¶
read the specified PersistentVolumeClaim
operationID: readNamespacedPersistentVolumeClaim path: /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedPersistentVolumeClaim(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PersistentVolumeClaim] ¶
partially update the specified PersistentVolumeClaim
operationID: patchNamespacedPersistentVolumeClaim path: /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PersistentVolumeClaim OK 201 PersistentVolumeClaim Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) PersistentVolumeClaim ¶
partially update the specified PersistentVolumeClaim
operationID: patchNamespacedPersistentVolumeClaim path: /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedPersistentVolumeClaim(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PersistentVolumeClaim] ¶
replace the specified PersistentVolumeClaim
operationID: replaceNamespacedPersistentVolumeClaim path: /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PersistentVolumeClaim OK 201 PersistentVolumeClaim Created 401 None Unauthorized
- replaceNamespacedPersistentVolumeClaimStatus(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PersistentVolumeClaim] ¶
replace status of the specified PersistentVolumeClaim
operationID: replaceNamespacedPersistentVolumeClaimStatus path: /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PersistentVolumeClaim OK 201 PersistentVolumeClaim Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.PersistentVolumeClaimList(items: List[PersistentVolumeClaim], apiVersion: str | None = 'v1', kind: str | None = 'PersistentVolumeClaimList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
PersistentVolumeClaimList is a list of PersistentVolumeClaim items.
Full name: PersistentVolumeClaimList
Attributes: items: items is a list of persistent volume claims. More info:
- apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- static listNamespacedPersistentVolumeClaim(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PersistentVolumeClaimList] ¶
list or watch objects of kind PersistentVolumeClaim
operationID: listNamespacedPersistentVolumeClaim path: /api/v1/namespaces/{namespace}/persistentvolumeclaims
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PersistentVolumeClaimList OK 401 None Unauthorized
- static listPersistentVolumeClaimForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PersistentVolumeClaimList] ¶
list or watch objects of kind PersistentVolumeClaim
operationID: listPersistentVolumeClaimForAllNamespaces path: /api/v1/persistentvolumeclaims
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PersistentVolumeClaimList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.PersistentVolumeList(items: List[PersistentVolume], apiVersion: str | None = 'v1', kind: str | None = 'PersistentVolumeList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
PersistentVolumeList is a list of PersistentVolume items.
Full name: PersistentVolumeList
Attributes: items: items is a list of persistent volumes. More info:
- apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- static listPersistentVolume(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PersistentVolumeList] ¶
list or watch objects of kind PersistentVolume
operationID: listPersistentVolume path: /api/v1/persistentvolumes
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PersistentVolumeList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.Pod(apiVersion: str | None = 'v1', kind: str | None = 'Pod', metadata: ObjectMeta | None = None, spec: PodSpec | None = None, status: PodStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.
Full name: Pod
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- spec: Specification of the desired behavior of the pod. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- status: Most recently observed status of the pod. This data may not be up to date.
Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- static deleteCollectionNamespacedPod(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Pod] ¶
delete collection of Pod
operationID: deleteCollectionNamespacedPod path: /api/v1/namespaces/{namespace}/pods
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedPod(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Pod] ¶
create a Pod
operationID: createNamespacedPod path: /api/v1/namespaces/{namespace}/pods
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Pod OK 201 Pod Created 202 Pod Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) Pod ¶
create a Pod
operationID: createNamespacedPod path: /api/v1/namespaces/{namespace}/pods
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedPod(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Pod] ¶
delete a Pod
operationID: deleteNamespacedPod path: /api/v1/namespaces/{namespace}/pods/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Pod OK 202 Pod Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) Pod ¶
delete a Pod
operationID: deleteNamespacedPod path: /api/v1/namespaces/{namespace}/pods/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedPod(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Pod] ¶
read the specified Pod
operationID: readNamespacedPod path: /api/v1/namespaces/{namespace}/pods/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Pod OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) Pod ¶
read the specified Pod
operationID: readNamespacedPod path: /api/v1/namespaces/{namespace}/pods/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedPod(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Pod] ¶
partially update the specified Pod
operationID: patchNamespacedPod path: /api/v1/namespaces/{namespace}/pods/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Pod OK 201 Pod Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) Pod ¶
partially update the specified Pod
operationID: patchNamespacedPod path: /api/v1/namespaces/{namespace}/pods/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedPod(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Pod] ¶
replace the specified Pod
operationID: replaceNamespacedPod path: /api/v1/namespaces/{namespace}/pods/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Pod OK 201 Pod Created 401 None Unauthorized
- static readNamespacedPodEphemeralcontainers(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Pod] ¶
read ephemeralcontainers of the specified Pod
operationID: readNamespacedPodEphemeralcontainers path: /api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Pod OK 401 None Unauthorized
- patchNamespacedPodEphemeralcontainers(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Pod] ¶
partially update ephemeralcontainers of the specified Pod
operationID: patchNamespacedPodEphemeralcontainers path: /api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Pod OK 201 Pod Created 401 None Unauthorized
- replaceNamespacedPodEphemeralcontainers(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Pod] ¶
replace ephemeralcontainers of the specified Pod
operationID: replaceNamespacedPodEphemeralcontainers path: /api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Pod OK 201 Pod Created 401 None Unauthorized
- static readNamespacedPodLog(name: str, namespace: str, container: str | None = None, follow: bool | None = None, insecure_skip_tls_verify_backend: bool | None = None, limit_bytes: int | None = None, pretty: str | None = None, previous: bool | None = None, since_seconds: int | None = None, tail_lines: int | None = None, timestamps: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Pod] ¶
read log of the specified Pod
operationID: readNamespacedPodLog path: /api/v1/namespaces/{namespace}/pods/{name}/log
- Parameters:
name – name for the resource
namespace – namespace for the resource
container – The container for which to stream logs. Defaults to only container if there is one container in the pod.
follow – Follow the log stream of the pod. Defaults to false.
insecure_skip_tls_verify_backend – insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real kubelet. If the kubelet is configured to verify the apiserver’s TLS credentials, it does not mean the connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept the actual log data coming from the real kubelet).
limit_bytes – If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit.
pretty – If ‘true’, then the output is pretty printed.
previous – Return previous terminated container logs. Defaults to false.
since_seconds – A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.
tail_lines – If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime
timestamps – If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 str OK 401 None Unauthorized
- replaceNamespacedPodStatus(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Pod] ¶
replace status of the specified Pod
operationID: replaceNamespacedPodStatus path: /api/v1/namespaces/{namespace}/pods/{name}/status
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Pod OK 201 Pod Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.PodList(items: List[Pod], apiVersion: str | None = 'v1', kind: str | None = 'PodList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
PodList is a list of Pods.
Full name: PodList
Attributes: items: List of pods. More info:
- apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- static listNamespacedPod(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PodList] ¶
list or watch objects of kind Pod
operationID: listNamespacedPod path: /api/v1/namespaces/{namespace}/pods
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PodList OK 401 None Unauthorized
- static listPodForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PodList] ¶
list or watch objects of kind Pod
operationID: listPodForAllNamespaces path: /api/v1/pods
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PodList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.PodTemplate(apiVersion: str | None = 'v1', kind: str | None = 'PodTemplate', metadata: ObjectMeta | None = None, template: PodTemplateSpec | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
PodTemplate describes a template for creating copies of a predefined pod.
Full name: PodTemplate
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- template: Template defines the pods that will be created from this pod template.
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- static deleteCollectionNamespacedPodTemplate(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PodTemplate] ¶
delete collection of PodTemplate
operationID: deleteCollectionNamespacedPodTemplate path: /api/v1/namespaces/{namespace}/podtemplates
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedPodTemplate(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PodTemplate] ¶
create a PodTemplate
operationID: createNamespacedPodTemplate path: /api/v1/namespaces/{namespace}/podtemplates
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PodTemplate OK 201 PodTemplate Created 202 PodTemplate Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) PodTemplate ¶
create a PodTemplate
operationID: createNamespacedPodTemplate path: /api/v1/namespaces/{namespace}/podtemplates
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedPodTemplate(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PodTemplate] ¶
delete a PodTemplate
operationID: deleteNamespacedPodTemplate path: /api/v1/namespaces/{namespace}/podtemplates/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PodTemplate OK 202 PodTemplate Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) PodTemplate ¶
delete a PodTemplate
operationID: deleteNamespacedPodTemplate path: /api/v1/namespaces/{namespace}/podtemplates/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedPodTemplate(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PodTemplate] ¶
read the specified PodTemplate
operationID: readNamespacedPodTemplate path: /api/v1/namespaces/{namespace}/podtemplates/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PodTemplate OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) PodTemplate ¶
read the specified PodTemplate
operationID: readNamespacedPodTemplate path: /api/v1/namespaces/{namespace}/podtemplates/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedPodTemplate(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PodTemplate] ¶
partially update the specified PodTemplate
operationID: patchNamespacedPodTemplate path: /api/v1/namespaces/{namespace}/podtemplates/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PodTemplate OK 201 PodTemplate Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) PodTemplate ¶
partially update the specified PodTemplate
operationID: patchNamespacedPodTemplate path: /api/v1/namespaces/{namespace}/podtemplates/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedPodTemplate(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PodTemplate] ¶
replace the specified PodTemplate
operationID: replaceNamespacedPodTemplate path: /api/v1/namespaces/{namespace}/podtemplates/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PodTemplate OK 201 PodTemplate Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.PodTemplateList(items: List[PodTemplate], apiVersion: str | None = 'v1', kind: str | None = 'PodTemplateList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
PodTemplateList is a list of PodTemplates.
Full name: PodTemplateList
Attributes: items: List of pod templates apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- static listNamespacedPodTemplate(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PodTemplateList] ¶
list or watch objects of kind PodTemplate
operationID: listNamespacedPodTemplate path: /api/v1/namespaces/{namespace}/podtemplates
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PodTemplateList OK 401 None Unauthorized
- static listPodTemplateForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PodTemplateList] ¶
list or watch objects of kind PodTemplate
operationID: listPodTemplateForAllNamespaces path: /api/v1/podtemplates
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PodTemplateList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.ReplicationController(apiVersion: str | None = 'v1', kind: str | None = 'ReplicationController', metadata: ObjectMeta | None = None, spec: ReplicationControllerSpec | None = None, status: ReplicationControllerStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
ReplicationController represents the configuration of a replication controller.
Full name: ReplicationController
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: 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/sig-architecture/api-conventions.md#metadata
- spec: Spec defines the specification of the desired behavior of the replication
controller. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- status: Status is the most recently observed status of the replication controller.
This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- static deleteCollectionNamespacedReplicationController(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ReplicationController] ¶
delete collection of ReplicationController
operationID: deleteCollectionNamespacedReplicationController path: /api/v1/namespaces/{namespace}/replicationcontrollers
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedReplicationController(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ReplicationController] ¶
create a ReplicationController
operationID: createNamespacedReplicationController path: /api/v1/namespaces/{namespace}/replicationcontrollers
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ReplicationController OK 201 ReplicationController Created 202 ReplicationController Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) ReplicationController ¶
create a ReplicationController
operationID: createNamespacedReplicationController path: /api/v1/namespaces/{namespace}/replicationcontrollers
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedReplicationController(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ReplicationController] ¶
delete a ReplicationController
operationID: deleteNamespacedReplicationController path: /api/v1/namespaces/{namespace}/replicationcontrollers/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) ReplicationController ¶
delete a ReplicationController
operationID: deleteNamespacedReplicationController path: /api/v1/namespaces/{namespace}/replicationcontrollers/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedReplicationController(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ReplicationController] ¶
read the specified ReplicationController
operationID: readNamespacedReplicationController path: /api/v1/namespaces/{namespace}/replicationcontrollers/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ReplicationController OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) ReplicationController ¶
read the specified ReplicationController
operationID: readNamespacedReplicationController path: /api/v1/namespaces/{namespace}/replicationcontrollers/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedReplicationController(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ReplicationController] ¶
partially update the specified ReplicationController
operationID: patchNamespacedReplicationController path: /api/v1/namespaces/{namespace}/replicationcontrollers/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ReplicationController OK 201 ReplicationController Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) ReplicationController ¶
partially update the specified ReplicationController
operationID: patchNamespacedReplicationController path: /api/v1/namespaces/{namespace}/replicationcontrollers/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedReplicationController(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ReplicationController] ¶
replace the specified ReplicationController
operationID: replaceNamespacedReplicationController path: /api/v1/namespaces/{namespace}/replicationcontrollers/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ReplicationController OK 201 ReplicationController Created 401 None Unauthorized
- replaceNamespacedReplicationControllerStatus(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ReplicationController] ¶
replace status of the specified ReplicationController
operationID: replaceNamespacedReplicationControllerStatus path: /api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ReplicationController OK 201 ReplicationController Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.ReplicationControllerList(items: List[ReplicationController], apiVersion: str | None = 'v1', kind: str | None = 'ReplicationControllerList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
ReplicationControllerList is a collection of replication controllers.
Full name: ReplicationControllerList
Attributes: items: List of replication controllers. More info:
- apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- static listNamespacedReplicationController(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ReplicationControllerList] ¶
list or watch objects of kind ReplicationController
operationID: listNamespacedReplicationController path: /api/v1/namespaces/{namespace}/replicationcontrollers
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ReplicationControllerList OK 401 None Unauthorized
- static listReplicationControllerForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ReplicationControllerList] ¶
list or watch objects of kind ReplicationController
operationID: listReplicationControllerForAllNamespaces path: /api/v1/replicationcontrollers
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ReplicationControllerList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.ResourceQuota(apiVersion: str | None = 'v1', kind: str | None = 'ResourceQuota', metadata: ObjectMeta | None = None, spec: ResourceQuotaSpec | None = None, status: ResourceQuotaStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
ResourceQuota sets aggregate quota restrictions enforced per namespace
Full name: ResourceQuota
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- spec: Spec defines the desired quota.
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- status: Status defines the actual enforced quota and its current usage.
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- static deleteCollectionNamespacedResourceQuota(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ResourceQuota] ¶
delete collection of ResourceQuota
operationID: deleteCollectionNamespacedResourceQuota path: /api/v1/namespaces/{namespace}/resourcequotas
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedResourceQuota(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ResourceQuota] ¶
create a ResourceQuota
operationID: createNamespacedResourceQuota path: /api/v1/namespaces/{namespace}/resourcequotas
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ResourceQuota OK 201 ResourceQuota Created 202 ResourceQuota Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) ResourceQuota ¶
create a ResourceQuota
operationID: createNamespacedResourceQuota path: /api/v1/namespaces/{namespace}/resourcequotas
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedResourceQuota(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ResourceQuota] ¶
delete a ResourceQuota
operationID: deleteNamespacedResourceQuota path: /api/v1/namespaces/{namespace}/resourcequotas/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ResourceQuota OK 202 ResourceQuota Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) ResourceQuota ¶
delete a ResourceQuota
operationID: deleteNamespacedResourceQuota path: /api/v1/namespaces/{namespace}/resourcequotas/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedResourceQuota(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ResourceQuota] ¶
read the specified ResourceQuota
operationID: readNamespacedResourceQuota path: /api/v1/namespaces/{namespace}/resourcequotas/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ResourceQuota OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) ResourceQuota ¶
read the specified ResourceQuota
operationID: readNamespacedResourceQuota path: /api/v1/namespaces/{namespace}/resourcequotas/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedResourceQuota(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ResourceQuota] ¶
partially update the specified ResourceQuota
operationID: patchNamespacedResourceQuota path: /api/v1/namespaces/{namespace}/resourcequotas/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ResourceQuota OK 201 ResourceQuota Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) ResourceQuota ¶
partially update the specified ResourceQuota
operationID: patchNamespacedResourceQuota path: /api/v1/namespaces/{namespace}/resourcequotas/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedResourceQuota(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ResourceQuota] ¶
replace the specified ResourceQuota
operationID: replaceNamespacedResourceQuota path: /api/v1/namespaces/{namespace}/resourcequotas/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ResourceQuota OK 201 ResourceQuota Created 401 None Unauthorized
- replaceNamespacedResourceQuotaStatus(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ResourceQuota] ¶
replace status of the specified ResourceQuota
operationID: replaceNamespacedResourceQuotaStatus path: /api/v1/namespaces/{namespace}/resourcequotas/{name}/status
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ResourceQuota OK 201 ResourceQuota Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.ResourceQuotaList(items: List[ResourceQuota], apiVersion: str | None = 'v1', kind: str | None = 'ResourceQuotaList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
ResourceQuotaList is a list of ResourceQuota items.
Full name: ResourceQuotaList
Attributes: items: Items is a list of ResourceQuota objects. More info:
- apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- static listNamespacedResourceQuota(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ResourceQuotaList] ¶
list or watch objects of kind ResourceQuota
operationID: listNamespacedResourceQuota path: /api/v1/namespaces/{namespace}/resourcequotas
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ResourceQuotaList OK 401 None Unauthorized
- static listResourceQuotaForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ResourceQuotaList] ¶
list or watch objects of kind ResourceQuota
operationID: listResourceQuotaForAllNamespaces path: /api/v1/resourcequotas
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ResourceQuotaList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.Secret(apiVersion: str | None = 'v1', immutable: bool | None = None, kind: str | None = 'Secret', metadata: ObjectMeta | None = None, type: str | None = None, data: ~typing.Dict[str, str] | None = <factory>, stringData: ~typing.Dict[str, str] | None = <factory>, client: dataclasses.InitVar[typing.Optional[kubernetes.client.api_client.ApiClient]] = None)¶
Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.
Full name: Secret
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- immutable: Immutable, if set to true, ensures that data stored in the Secret cannot be
updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil.
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- type: Used to facilitate programmatic handling of secret data. More info:
https://kubernetes.io/docs/concepts/configuration/secret/#secret-types
- 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
- stringData: stringData allows specifying non-binary secret data in string form. It is
provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API.
- static deleteCollectionNamespacedSecret(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Secret] ¶
delete collection of Secret
operationID: deleteCollectionNamespacedSecret path: /api/v1/namespaces/{namespace}/secrets
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedSecret(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Secret] ¶
create a Secret
operationID: createNamespacedSecret path: /api/v1/namespaces/{namespace}/secrets
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Secret OK 201 Secret Created 202 Secret Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) Secret ¶
create a Secret
operationID: createNamespacedSecret path: /api/v1/namespaces/{namespace}/secrets
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedSecret(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Secret] ¶
delete a Secret
operationID: deleteNamespacedSecret path: /api/v1/namespaces/{namespace}/secrets/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) Secret ¶
delete a Secret
operationID: deleteNamespacedSecret path: /api/v1/namespaces/{namespace}/secrets/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedSecret(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Secret] ¶
read the specified Secret
operationID: readNamespacedSecret path: /api/v1/namespaces/{namespace}/secrets/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Secret OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) Secret ¶
read the specified Secret
operationID: readNamespacedSecret path: /api/v1/namespaces/{namespace}/secrets/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedSecret(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Secret] ¶
partially update the specified Secret
operationID: patchNamespacedSecret path: /api/v1/namespaces/{namespace}/secrets/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Secret OK 201 Secret Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) Secret ¶
partially update the specified Secret
operationID: patchNamespacedSecret path: /api/v1/namespaces/{namespace}/secrets/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedSecret(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Secret] ¶
replace the specified Secret
operationID: replaceNamespacedSecret path: /api/v1/namespaces/{namespace}/secrets/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Secret OK 201 Secret Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.SecretList(items: List[Secret], apiVersion: str | None = 'v1', kind: str | None = 'SecretList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
SecretList is a list of Secret.
Full name: SecretList
Attributes: items: Items is a list of secret objects. More info:
- apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- static listNamespacedSecret(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[SecretList] ¶
list or watch objects of kind Secret
operationID: listNamespacedSecret path: /api/v1/namespaces/{namespace}/secrets
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 SecretList OK 401 None Unauthorized
- static listSecretForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[SecretList] ¶
list or watch objects of kind Secret
operationID: listSecretForAllNamespaces path: /api/v1/secrets
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 SecretList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.Service(apiVersion: str | None = 'v1', kind: str | None = 'Service', metadata: ObjectMeta | None = None, spec: ServiceSpec | None = None, status: ServiceStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
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.
Full name: Service
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- spec: Spec defines the behavior of a service.
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- status: Most recently observed status of the service. Populated by the system.
Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- static deleteCollectionNamespacedService(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Service] ¶
delete collection of Service
operationID: deleteCollectionNamespacedService path: /api/v1/namespaces/{namespace}/services
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedService(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Service] ¶
create a Service
operationID: createNamespacedService path: /api/v1/namespaces/{namespace}/services
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Service OK 201 Service Created 202 Service Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) Service ¶
create a Service
operationID: createNamespacedService path: /api/v1/namespaces/{namespace}/services
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedService(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Service] ¶
delete a Service
operationID: deleteNamespacedService path: /api/v1/namespaces/{namespace}/services/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Service OK 202 Service Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) Service ¶
delete a Service
operationID: deleteNamespacedService path: /api/v1/namespaces/{namespace}/services/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedService(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Service] ¶
read the specified Service
operationID: readNamespacedService path: /api/v1/namespaces/{namespace}/services/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Service OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) Service ¶
read the specified Service
operationID: readNamespacedService path: /api/v1/namespaces/{namespace}/services/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedService(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Service] ¶
partially update the specified Service
operationID: patchNamespacedService path: /api/v1/namespaces/{namespace}/services/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Service OK 201 Service Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) Service ¶
partially update the specified Service
operationID: patchNamespacedService path: /api/v1/namespaces/{namespace}/services/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedService(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Service] ¶
replace the specified Service
operationID: replaceNamespacedService path: /api/v1/namespaces/{namespace}/services/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Service OK 201 Service Created 401 None Unauthorized
- replaceNamespacedServiceStatus(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Service] ¶
replace status of the specified Service
operationID: replaceNamespacedServiceStatus path: /api/v1/namespaces/{namespace}/services/{name}/status
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Service OK 201 Service Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.ServiceAccount(apiVersion: str | None = 'v1', automountServiceAccountToken: bool | None = None, kind: str | None = 'ServiceAccount', metadata: ObjectMeta | None = None, imagePullSecrets: ~typing.List[LocalObjectReference] | None = <factory>, secrets: ~typing.List[ObjectReference] | None = <factory>, client: dataclasses.InitVar[typing.Optional[kubernetes.client.api_client.ApiClient]] = None)¶
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
Full name: ServiceAccount
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- automountServiceAccountToken: AutomountServiceAccountToken indicates whether pods
running as this service account should have an API token automatically mounted. Can be overridden at the pod level.
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- 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
- secrets: Secrets is a list of the secrets in the same namespace that pods running
using this ServiceAccount are allowed to use. Pods are only limited to this list if this service account has a “kubernetes.io/enforce-mountable-secrets” annotation set to “true”. This field should not be used to find auto-generated service account token secrets for use outside of pods. Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. More info: https://kubernetes.io/docs/concepts/configuration/secret
- static deleteCollectionNamespacedServiceAccount(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ServiceAccount] ¶
delete collection of ServiceAccount
operationID: deleteCollectionNamespacedServiceAccount path: /api/v1/namespaces/{namespace}/serviceaccounts
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedServiceAccount(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ServiceAccount] ¶
create a ServiceAccount
operationID: createNamespacedServiceAccount path: /api/v1/namespaces/{namespace}/serviceaccounts
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ServiceAccount OK 201 ServiceAccount Created 202 ServiceAccount Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) ServiceAccount ¶
create a ServiceAccount
operationID: createNamespacedServiceAccount path: /api/v1/namespaces/{namespace}/serviceaccounts
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedServiceAccount(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ServiceAccount] ¶
delete a ServiceAccount
operationID: deleteNamespacedServiceAccount path: /api/v1/namespaces/{namespace}/serviceaccounts/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ServiceAccount OK 202 ServiceAccount Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) ServiceAccount ¶
delete a ServiceAccount
operationID: deleteNamespacedServiceAccount path: /api/v1/namespaces/{namespace}/serviceaccounts/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedServiceAccount(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ServiceAccount] ¶
read the specified ServiceAccount
operationID: readNamespacedServiceAccount path: /api/v1/namespaces/{namespace}/serviceaccounts/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ServiceAccount OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) ServiceAccount ¶
read the specified ServiceAccount
operationID: readNamespacedServiceAccount path: /api/v1/namespaces/{namespace}/serviceaccounts/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedServiceAccount(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ServiceAccount] ¶
partially update the specified ServiceAccount
operationID: patchNamespacedServiceAccount path: /api/v1/namespaces/{namespace}/serviceaccounts/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ServiceAccount OK 201 ServiceAccount Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) ServiceAccount ¶
partially update the specified ServiceAccount
operationID: patchNamespacedServiceAccount path: /api/v1/namespaces/{namespace}/serviceaccounts/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedServiceAccount(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ServiceAccount] ¶
replace the specified ServiceAccount
operationID: replaceNamespacedServiceAccount path: /api/v1/namespaces/{namespace}/serviceaccounts/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ServiceAccount OK 201 ServiceAccount Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.ServiceAccountList(items: List[ServiceAccount], apiVersion: str | None = 'v1', kind: str | None = 'ServiceAccountList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
ServiceAccountList is a list of ServiceAccount objects
Full name: ServiceAccountList
Attributes: items: List of ServiceAccounts. More info:
- apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- static listNamespacedServiceAccount(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ServiceAccountList] ¶
list or watch objects of kind ServiceAccount
operationID: listNamespacedServiceAccount path: /api/v1/namespaces/{namespace}/serviceaccounts
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ServiceAccountList OK 401 None Unauthorized
- static listServiceAccountForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ServiceAccountList] ¶
list or watch objects of kind ServiceAccount
operationID: listServiceAccountForAllNamespaces path: /api/v1/serviceaccounts
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ServiceAccountList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.ServiceList(items: List[Service], apiVersion: str | None = 'v1', kind: str | None = 'ServiceList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
ServiceList holds a list of services.
Full name: ServiceList
Attributes: items: List of services apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- static listNamespacedService(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ServiceList] ¶
list or watch objects of kind Service
operationID: listNamespacedService path: /api/v1/namespaces/{namespace}/services
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ServiceList OK 401 None Unauthorized
- static listServiceForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ServiceList] ¶
list or watch objects of kind Service
operationID: listServiceForAllNamespaces path: /api/v1/services
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ServiceList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.EndpointSlice(addressType: str, endpoints: ~typing.List[Endpoint], apiVersion: str | None = 'discovery.k8s.io/v1', kind: str | None = 'EndpointSlice', metadata: ObjectMeta | None = None, ports: ~typing.List[EndpointPort] | None = <factory>, client: dataclasses.InitVar[typing.Optional[kubernetes.client.api_client.ApiClient]] = None)¶
EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.
Full name: EndpointSlice
Attributes: addressType: addressType specifies the type of address carried by this EndpointSlice.
All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name.
- endpoints: endpoints is a list of unique endpoints in this slice. Each slice may
include a maximum of 1000 endpoints.
- apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
metadata: Standard object’s metadata. ports: ports specifies the list of network ports exposed by each endpoint in this
slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates “all ports”. Each slice may include a maximum of 100 ports.
- static deleteCollectionNamespacedEndpointSlice(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[EndpointSlice] ¶
delete collection of EndpointSlice
operationID: deleteCollectionNamespacedEndpointSlice path: /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedEndpointSlice(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[EndpointSlice] ¶
create an EndpointSlice
operationID: createNamespacedEndpointSlice path: /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 EndpointSlice OK 201 EndpointSlice Created 202 EndpointSlice Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) EndpointSlice ¶
create an EndpointSlice
operationID: createNamespacedEndpointSlice path: /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedEndpointSlice(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[EndpointSlice] ¶
delete an EndpointSlice
operationID: deleteNamespacedEndpointSlice path: /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) EndpointSlice ¶
delete an EndpointSlice
operationID: deleteNamespacedEndpointSlice path: /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedEndpointSlice(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[EndpointSlice] ¶
read the specified EndpointSlice
operationID: readNamespacedEndpointSlice path: /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 EndpointSlice OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) EndpointSlice ¶
read the specified EndpointSlice
operationID: readNamespacedEndpointSlice path: /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedEndpointSlice(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[EndpointSlice] ¶
partially update the specified EndpointSlice
operationID: patchNamespacedEndpointSlice path: /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 EndpointSlice OK 201 EndpointSlice Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) EndpointSlice ¶
partially update the specified EndpointSlice
operationID: patchNamespacedEndpointSlice path: /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedEndpointSlice(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[EndpointSlice] ¶
replace the specified EndpointSlice
operationID: replaceNamespacedEndpointSlice path: /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 EndpointSlice OK 201 EndpointSlice Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.EndpointSliceList(items: List[EndpointSlice], apiVersion: str | None = 'discovery.k8s.io/v1', kind: str | None = 'EndpointSliceList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
EndpointSliceList represents a list of endpoint slices
Full name: EndpointSliceList
Attributes: items: items is the list of endpoint slices apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
metadata: Standard list metadata.
- static listEndpointSliceForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[EndpointSliceList] ¶
list or watch objects of kind EndpointSlice
operationID: listEndpointSliceForAllNamespaces path: /apis/discovery.k8s.io/v1/endpointslices
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 EndpointSliceList OK 401 None Unauthorized
- static listNamespacedEndpointSlice(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[EndpointSliceList] ¶
list or watch objects of kind EndpointSlice
operationID: listNamespacedEndpointSlice path: /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 EndpointSliceList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.Ingress(apiVersion: str | None = 'networking.k8s.io/v1', kind: str | None = 'Ingress', metadata: ObjectMeta | None = None, spec: IngressSpec | None = None, status: IngressStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
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.
Full name: Ingress
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- spec: spec is the desired state of the Ingress. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- status: status is the current state of the Ingress. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- static deleteCollectionNamespacedIngress(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Ingress] ¶
delete collection of Ingress
operationID: deleteCollectionNamespacedIngress path: /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedIngress(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Ingress] ¶
create an Ingress
operationID: createNamespacedIngress path: /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Ingress OK 201 Ingress Created 202 Ingress Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) Ingress ¶
create an Ingress
operationID: createNamespacedIngress path: /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedIngress(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Ingress] ¶
delete an Ingress
operationID: deleteNamespacedIngress path: /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) Ingress ¶
delete an Ingress
operationID: deleteNamespacedIngress path: /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedIngress(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Ingress] ¶
read the specified Ingress
operationID: readNamespacedIngress path: /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Ingress OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) Ingress ¶
read the specified Ingress
operationID: readNamespacedIngress path: /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedIngress(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Ingress] ¶
partially update the specified Ingress
operationID: patchNamespacedIngress path: /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Ingress OK 201 Ingress Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) Ingress ¶
partially update the specified Ingress
operationID: patchNamespacedIngress path: /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedIngress(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Ingress] ¶
replace the specified Ingress
operationID: replaceNamespacedIngress path: /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Ingress OK 201 Ingress Created 401 None Unauthorized
- replaceNamespacedIngressStatus(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Ingress] ¶
replace status of the specified Ingress
operationID: replaceNamespacedIngressStatus path: /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Ingress OK 201 Ingress Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.IngressClass(apiVersion: str | None = 'networking.k8s.io/v1', kind: str | None = 'IngressClass', metadata: ObjectMeta | None = None, spec: IngressClassSpec | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The ingressclass.kubernetes.io/is-default-class annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class.
Full name: IngressClass
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- spec: spec is the desired state of the IngressClass. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- static deleteCollectionIngressClass(continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[IngressClass] ¶
delete collection of IngressClass
operationID: deleteCollectionIngressClass path: /apis/networking.k8s.io/v1/ingressclasses
- Parameters:
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createIngressClass(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[IngressClass] ¶
create an IngressClass
operationID: createIngressClass path: /apis/networking.k8s.io/v1/ingressclasses
- Parameters:
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 IngressClass OK 201 IngressClass Created 202 IngressClass Accepted 401 None Unauthorized
- create(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) IngressClass ¶
create an IngressClass
operationID: createIngressClass path: /apis/networking.k8s.io/v1/ingressclasses
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteIngressClass(name: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[IngressClass] ¶
delete an IngressClass
operationID: deleteIngressClass path: /apis/networking.k8s.io/v1/ingressclasses/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) IngressClass ¶
delete an IngressClass
operationID: deleteIngressClass path: /apis/networking.k8s.io/v1/ingressclasses/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readIngressClass(name: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[IngressClass] ¶
read the specified IngressClass
operationID: readIngressClass path: /apis/networking.k8s.io/v1/ingressclasses/{name}
- Parameters:
name – name for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 IngressClass OK 401 None Unauthorized
- read(name: str | None = None, pretty: str | None = None, client: ApiClient | None = None) IngressClass ¶
read the specified IngressClass
operationID: readIngressClass path: /apis/networking.k8s.io/v1/ingressclasses/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchIngressClass(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[IngressClass] ¶
partially update the specified IngressClass
operationID: patchIngressClass path: /apis/networking.k8s.io/v1/ingressclasses/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 IngressClass OK 201 IngressClass Created 401 None Unauthorized
- update(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) IngressClass ¶
partially update the specified IngressClass
operationID: patchIngressClass path: /apis/networking.k8s.io/v1/ingressclasses/{name}
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceIngressClass(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[IngressClass] ¶
replace the specified IngressClass
operationID: replaceIngressClass path: /apis/networking.k8s.io/v1/ingressclasses/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 IngressClass OK 201 IngressClass Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.IngressClassList(items: List[IngressClass], apiVersion: str | None = 'networking.k8s.io/v1', kind: str | None = 'IngressClassList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
IngressClassList is a collection of IngressClasses.
Full name: IngressClassList
Attributes: items: items is the list of IngressClasses. apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
metadata: Standard list metadata.
- static listIngressClass(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[IngressClassList] ¶
list or watch objects of kind IngressClass
operationID: listIngressClass path: /apis/networking.k8s.io/v1/ingressclasses
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 IngressClassList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.IngressList(items: List[Ingress], apiVersion: str | None = 'networking.k8s.io/v1', kind: str | None = 'IngressList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
IngressList is a collection of Ingress.
Full name: IngressList
Attributes: items: items is the list of Ingress. apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- static listIngressForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[IngressList] ¶
list or watch objects of kind Ingress
operationID: listIngressForAllNamespaces path: /apis/networking.k8s.io/v1/ingresses
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 IngressList OK 401 None Unauthorized
- static listNamespacedIngress(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[IngressList] ¶
list or watch objects of kind Ingress
operationID: listNamespacedIngress path: /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 IngressList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.NetworkPolicy(apiVersion: str | None = 'networking.k8s.io/v1', kind: str | None = 'NetworkPolicy', metadata: ObjectMeta | None = None, spec: NetworkPolicySpec | None = None, status: NetworkPolicyStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
NetworkPolicy describes what network traffic is allowed for a set of Pods
Full name: NetworkPolicy
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- spec: spec represents the specification of the desired behavior for this
NetworkPolicy.
- status: status represents the current state of the NetworkPolicy. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- static deleteCollectionNamespacedNetworkPolicy(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[NetworkPolicy] ¶
delete collection of NetworkPolicy
operationID: deleteCollectionNamespacedNetworkPolicy path: /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedNetworkPolicy(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[NetworkPolicy] ¶
create a NetworkPolicy
operationID: createNamespacedNetworkPolicy path: /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 NetworkPolicy OK 201 NetworkPolicy Created 202 NetworkPolicy Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) NetworkPolicy ¶
create a NetworkPolicy
operationID: createNamespacedNetworkPolicy path: /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedNetworkPolicy(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[NetworkPolicy] ¶
delete a NetworkPolicy
operationID: deleteNamespacedNetworkPolicy path: /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) NetworkPolicy ¶
delete a NetworkPolicy
operationID: deleteNamespacedNetworkPolicy path: /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedNetworkPolicy(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[NetworkPolicy] ¶
read the specified NetworkPolicy
operationID: readNamespacedNetworkPolicy path: /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 NetworkPolicy OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) NetworkPolicy ¶
read the specified NetworkPolicy
operationID: readNamespacedNetworkPolicy path: /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedNetworkPolicy(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[NetworkPolicy] ¶
partially update the specified NetworkPolicy
operationID: patchNamespacedNetworkPolicy path: /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 NetworkPolicy OK 201 NetworkPolicy Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) NetworkPolicy ¶
partially update the specified NetworkPolicy
operationID: patchNamespacedNetworkPolicy path: /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedNetworkPolicy(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[NetworkPolicy] ¶
replace the specified NetworkPolicy
operationID: replaceNamespacedNetworkPolicy path: /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 NetworkPolicy OK 201 NetworkPolicy Created 401 None Unauthorized
- replaceNamespacedNetworkPolicyStatus(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[NetworkPolicy] ¶
replace status of the specified NetworkPolicy
operationID: replaceNamespacedNetworkPolicyStatus path: /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}/status
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 NetworkPolicy OK 201 NetworkPolicy Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.NetworkPolicyList(items: List[NetworkPolicy], apiVersion: str | None = 'networking.k8s.io/v1', kind: str | None = 'NetworkPolicyList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
NetworkPolicyList is a list of NetworkPolicy objects.
Full name: NetworkPolicyList
Attributes: items: items is a list of schema objects. apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- static listNamespacedNetworkPolicy(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[NetworkPolicyList] ¶
list or watch objects of kind NetworkPolicy
operationID: listNamespacedNetworkPolicy path: /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 NetworkPolicyList OK 401 None Unauthorized
- static listNetworkPolicyForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[NetworkPolicyList] ¶
list or watch objects of kind NetworkPolicy
operationID: listNetworkPolicyForAllNamespaces path: /apis/networking.k8s.io/v1/networkpolicies
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 NetworkPolicyList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.RuntimeClass(handler: str, apiVersion: str | None = 'node.k8s.io/v1', kind: str | None = 'RuntimeClass', metadata: ObjectMeta | None = None, overhead: Overhead | None = None, scheduling: Scheduling | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://kubernetes.io/docs/concepts/containers/runtime-class/
Full name: RuntimeClass
Attributes: handler: handler specifies the underlying runtime and configuration that the CRI
implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called “runc” might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.
- apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- overhead: overhead represents the resource overhead associated with running a pod for
a given RuntimeClass. For more details, see https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/
- scheduling: scheduling holds the scheduling constraints to ensure that pods running
with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.
- static deleteCollectionRuntimeClass(continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[RuntimeClass] ¶
delete collection of RuntimeClass
operationID: deleteCollectionRuntimeClass path: /apis/node.k8s.io/v1/runtimeclasses
- Parameters:
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createRuntimeClass(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[RuntimeClass] ¶
create a RuntimeClass
operationID: createRuntimeClass path: /apis/node.k8s.io/v1/runtimeclasses
- Parameters:
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 RuntimeClass OK 201 RuntimeClass Created 202 RuntimeClass Accepted 401 None Unauthorized
- create(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) RuntimeClass ¶
create a RuntimeClass
operationID: createRuntimeClass path: /apis/node.k8s.io/v1/runtimeclasses
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteRuntimeClass(name: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[RuntimeClass] ¶
delete a RuntimeClass
operationID: deleteRuntimeClass path: /apis/node.k8s.io/v1/runtimeclasses/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) RuntimeClass ¶
delete a RuntimeClass
operationID: deleteRuntimeClass path: /apis/node.k8s.io/v1/runtimeclasses/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readRuntimeClass(name: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[RuntimeClass] ¶
read the specified RuntimeClass
operationID: readRuntimeClass path: /apis/node.k8s.io/v1/runtimeclasses/{name}
- Parameters:
name – name for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 RuntimeClass OK 401 None Unauthorized
- read(name: str | None = None, pretty: str | None = None, client: ApiClient | None = None) RuntimeClass ¶
read the specified RuntimeClass
operationID: readRuntimeClass path: /apis/node.k8s.io/v1/runtimeclasses/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchRuntimeClass(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[RuntimeClass] ¶
partially update the specified RuntimeClass
operationID: patchRuntimeClass path: /apis/node.k8s.io/v1/runtimeclasses/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 RuntimeClass OK 201 RuntimeClass Created 401 None Unauthorized
- update(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) RuntimeClass ¶
partially update the specified RuntimeClass
operationID: patchRuntimeClass path: /apis/node.k8s.io/v1/runtimeclasses/{name}
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceRuntimeClass(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[RuntimeClass] ¶
replace the specified RuntimeClass
operationID: replaceRuntimeClass path: /apis/node.k8s.io/v1/runtimeclasses/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 RuntimeClass OK 201 RuntimeClass Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.RuntimeClassList(items: List[RuntimeClass], apiVersion: str | None = 'node.k8s.io/v1', kind: str | None = 'RuntimeClassList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
RuntimeClassList is a list of RuntimeClass objects.
Full name: RuntimeClassList
Attributes: items: items is a list of schema objects. apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- static listRuntimeClass(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[RuntimeClassList] ¶
list or watch objects of kind RuntimeClass
operationID: listRuntimeClass path: /apis/node.k8s.io/v1/runtimeclasses
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 RuntimeClassList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.Eviction(apiVersion: str | None = 'policy/v1', deleteOptions: DeleteOptions | None = None, kind: str | None = 'Eviction', metadata: ObjectMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
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/<pod name>/evictions.
Full name: Eviction
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
deleteOptions: DeleteOptions may be provided kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
metadata: ObjectMeta describes the pod that is being evicted.
- createNamespacedPodEviction(name: str, namespace: str, client: ApiClient | None = None, async_req: bool = False) Response[Eviction] ¶
create eviction of a Pod
operationID: createNamespacedPodEviction path: /api/v1/namespaces/{namespace}/pods/{name}/eviction
- Parameters:
name – name for the resource
namespace – namespace for the resource
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Eviction OK 201 Eviction Created 202 Eviction Accepted 401 None Unauthorized
- create(namespace: str | None = None, client: ApiClient | None = None) Eviction ¶
create eviction of a Pod
operationID: createNamespacedPodEviction path: /api/v1/namespaces/{namespace}/pods/{name}/eviction
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- class hikaru.model.rel_1_27.v1.documents.PodDisruptionBudget(apiVersion: str | None = 'policy/v1', kind: str | None = 'PodDisruptionBudget', metadata: ObjectMeta | None = None, spec: PodDisruptionBudgetSpec | None = None, status: PodDisruptionBudgetStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
Full name: PodDisruptionBudget
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
spec: Specification of the desired behavior of the PodDisruptionBudget. status: Most recently observed status of the PodDisruptionBudget.
- static deleteCollectionNamespacedPodDisruptionBudget(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PodDisruptionBudget] ¶
delete collection of PodDisruptionBudget
operationID: deleteCollectionNamespacedPodDisruptionBudget path: /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedPodDisruptionBudget(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PodDisruptionBudget] ¶
create a PodDisruptionBudget
operationID: createNamespacedPodDisruptionBudget path: /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PodDisruptionBudget OK 201 PodDisruptionBudget Created 202 PodDisruptionBudget Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) PodDisruptionBudget ¶
create a PodDisruptionBudget
operationID: createNamespacedPodDisruptionBudget path: /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedPodDisruptionBudget(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PodDisruptionBudget] ¶
delete a PodDisruptionBudget
operationID: deleteNamespacedPodDisruptionBudget path: /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) PodDisruptionBudget ¶
delete a PodDisruptionBudget
operationID: deleteNamespacedPodDisruptionBudget path: /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedPodDisruptionBudget(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PodDisruptionBudget] ¶
read the specified PodDisruptionBudget
operationID: readNamespacedPodDisruptionBudget path: /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PodDisruptionBudget OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) PodDisruptionBudget ¶
read the specified PodDisruptionBudget
operationID: readNamespacedPodDisruptionBudget path: /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedPodDisruptionBudget(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PodDisruptionBudget] ¶
partially update the specified PodDisruptionBudget
operationID: patchNamespacedPodDisruptionBudget path: /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PodDisruptionBudget OK 201 PodDisruptionBudget Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) PodDisruptionBudget ¶
partially update the specified PodDisruptionBudget
operationID: patchNamespacedPodDisruptionBudget path: /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedPodDisruptionBudget(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PodDisruptionBudget] ¶
replace the specified PodDisruptionBudget
operationID: replaceNamespacedPodDisruptionBudget path: /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PodDisruptionBudget OK 201 PodDisruptionBudget Created 401 None Unauthorized
- replaceNamespacedPodDisruptionBudgetStatus(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PodDisruptionBudget] ¶
replace status of the specified PodDisruptionBudget
operationID: replaceNamespacedPodDisruptionBudgetStatus path: /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PodDisruptionBudget OK 201 PodDisruptionBudget Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.PodDisruptionBudgetList(items: List[PodDisruptionBudget], apiVersion: str | None = 'policy/v1', kind: str | None = 'PodDisruptionBudgetList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
PodDisruptionBudgetList is a collection of PodDisruptionBudgets.
Full name: PodDisruptionBudgetList
Attributes: items: Items is a list of PodDisruptionBudgets apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- static listNamespacedPodDisruptionBudget(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PodDisruptionBudgetList] ¶
list or watch objects of kind PodDisruptionBudget
operationID: listNamespacedPodDisruptionBudget path: /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PodDisruptionBudgetList OK 401 None Unauthorized
- static listPodDisruptionBudgetForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PodDisruptionBudgetList] ¶
list or watch objects of kind PodDisruptionBudget
operationID: listPodDisruptionBudgetForAllNamespaces path: /apis/policy/v1/poddisruptionbudgets
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PodDisruptionBudgetList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.ClusterRole(aggregationRule: AggregationRule | None = None, apiVersion: str | None = 'rbac.authorization.k8s.io/v1', kind: str | None = 'ClusterRole', metadata: ObjectMeta | None = None, rules: ~typing.List[PolicyRule] | None = <factory>, client: dataclasses.InitVar[typing.Optional[kubernetes.client.api_client.ApiClient]] = None)¶
ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
Full name: ClusterRole
Attributes: aggregationRule: AggregationRule is an optional field that describes how to build the
Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.
- apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
metadata: Standard object’s metadata. rules: Rules holds all the PolicyRules for this ClusterRole
- static deleteCollectionClusterRole(continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ClusterRole] ¶
delete collection of ClusterRole
operationID: deleteCollectionClusterRole path: /apis/rbac.authorization.k8s.io/v1/clusterroles
- Parameters:
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createClusterRole(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ClusterRole] ¶
create a ClusterRole
operationID: createClusterRole path: /apis/rbac.authorization.k8s.io/v1/clusterroles
- Parameters:
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ClusterRole OK 201 ClusterRole Created 202 ClusterRole Accepted 401 None Unauthorized
- create(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) ClusterRole ¶
create a ClusterRole
operationID: createClusterRole path: /apis/rbac.authorization.k8s.io/v1/clusterroles
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteClusterRole(name: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ClusterRole] ¶
delete a ClusterRole
operationID: deleteClusterRole path: /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) ClusterRole ¶
delete a ClusterRole
operationID: deleteClusterRole path: /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readClusterRole(name: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ClusterRole] ¶
read the specified ClusterRole
operationID: readClusterRole path: /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}
- Parameters:
name – name for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ClusterRole OK 401 None Unauthorized
- read(name: str | None = None, pretty: str | None = None, client: ApiClient | None = None) ClusterRole ¶
read the specified ClusterRole
operationID: readClusterRole path: /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchClusterRole(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ClusterRole] ¶
partially update the specified ClusterRole
operationID: patchClusterRole path: /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ClusterRole OK 201 ClusterRole Created 401 None Unauthorized
- update(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) ClusterRole ¶
partially update the specified ClusterRole
operationID: patchClusterRole path: /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceClusterRole(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ClusterRole] ¶
replace the specified ClusterRole
operationID: replaceClusterRole path: /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ClusterRole OK 201 ClusterRole Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.ClusterRoleBinding(roleRef: RoleRef, apiVersion: str | None = 'rbac.authorization.k8s.io/v1', kind: str | None = 'ClusterRoleBinding', metadata: ObjectMeta | None = None, subjects: ~typing.List[Subject] | None = <factory>, client: dataclasses.InitVar[typing.Optional[kubernetes.client.api_client.ApiClient]] = None)¶
ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.
Full name: ClusterRoleBinding
Attributes: roleRef: RoleRef can only reference a ClusterRole in the global namespace. If the
RoleRef cannot be resolved, the Authorizer must return an error.
- apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
metadata: Standard object’s metadata. subjects: Subjects holds references to the objects the role applies to.
- static deleteCollectionClusterRoleBinding(continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ClusterRoleBinding] ¶
delete collection of ClusterRoleBinding
operationID: deleteCollectionClusterRoleBinding path: /apis/rbac.authorization.k8s.io/v1/clusterrolebindings
- Parameters:
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createClusterRoleBinding(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ClusterRoleBinding] ¶
create a ClusterRoleBinding
operationID: createClusterRoleBinding path: /apis/rbac.authorization.k8s.io/v1/clusterrolebindings
- Parameters:
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ClusterRoleBinding OK 201 ClusterRoleBinding Created 202 ClusterRoleBinding Accepted 401 None Unauthorized
- create(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) ClusterRoleBinding ¶
create a ClusterRoleBinding
operationID: createClusterRoleBinding path: /apis/rbac.authorization.k8s.io/v1/clusterrolebindings
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteClusterRoleBinding(name: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ClusterRoleBinding] ¶
delete a ClusterRoleBinding
operationID: deleteClusterRoleBinding path: /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) ClusterRoleBinding ¶
delete a ClusterRoleBinding
operationID: deleteClusterRoleBinding path: /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readClusterRoleBinding(name: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ClusterRoleBinding] ¶
read the specified ClusterRoleBinding
operationID: readClusterRoleBinding path: /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}
- Parameters:
name – name for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ClusterRoleBinding OK 401 None Unauthorized
- read(name: str | None = None, pretty: str | None = None, client: ApiClient | None = None) ClusterRoleBinding ¶
read the specified ClusterRoleBinding
operationID: readClusterRoleBinding path: /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchClusterRoleBinding(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ClusterRoleBinding] ¶
partially update the specified ClusterRoleBinding
operationID: patchClusterRoleBinding path: /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ClusterRoleBinding OK 201 ClusterRoleBinding Created 401 None Unauthorized
- update(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) ClusterRoleBinding ¶
partially update the specified ClusterRoleBinding
operationID: patchClusterRoleBinding path: /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceClusterRoleBinding(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ClusterRoleBinding] ¶
replace the specified ClusterRoleBinding
operationID: replaceClusterRoleBinding path: /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ClusterRoleBinding OK 201 ClusterRoleBinding Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.ClusterRoleBindingList(items: List[ClusterRoleBinding], apiVersion: str | None = 'rbac.authorization.k8s.io/v1', kind: str | None = 'ClusterRoleBindingList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
ClusterRoleBindingList is a collection of ClusterRoleBindings
Full name: ClusterRoleBindingList
Attributes: items: Items is a list of ClusterRoleBindings apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
metadata: Standard object’s metadata.
- static listClusterRoleBinding(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ClusterRoleBindingList] ¶
list or watch objects of kind ClusterRoleBinding
operationID: listClusterRoleBinding path: /apis/rbac.authorization.k8s.io/v1/clusterrolebindings
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ClusterRoleBindingList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.ClusterRoleList(items: List[ClusterRole], apiVersion: str | None = 'rbac.authorization.k8s.io/v1', kind: str | None = 'ClusterRoleList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
ClusterRoleList is a collection of ClusterRoles
Full name: ClusterRoleList
Attributes: items: Items is a list of ClusterRoles apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
metadata: Standard object’s metadata.
- static listClusterRole(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[ClusterRoleList] ¶
list or watch objects of kind ClusterRole
operationID: listClusterRole path: /apis/rbac.authorization.k8s.io/v1/clusterroles
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 ClusterRoleList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.Role(apiVersion: str | None = 'rbac.authorization.k8s.io/v1', kind: str | None = 'Role', metadata: ObjectMeta | None = None, rules: ~typing.List[PolicyRule] | None = <factory>, client: dataclasses.InitVar[typing.Optional[kubernetes.client.api_client.ApiClient]] = None)¶
Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
Full name: Role
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
metadata: Standard object’s metadata. rules: Rules holds all the PolicyRules for this Role
- static deleteCollectionNamespacedRole(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Role] ¶
delete collection of Role
operationID: deleteCollectionNamespacedRole path: /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedRole(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Role] ¶
create a Role
operationID: createNamespacedRole path: /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Role OK 201 Role Created 202 Role Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) Role ¶
create a Role
operationID: createNamespacedRole path: /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedRole(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Role] ¶
delete a Role
operationID: deleteNamespacedRole path: /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) Role ¶
delete a Role
operationID: deleteNamespacedRole path: /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedRole(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Role] ¶
read the specified Role
operationID: readNamespacedRole path: /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Role OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) Role ¶
read the specified Role
operationID: readNamespacedRole path: /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedRole(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Role] ¶
partially update the specified Role
operationID: patchNamespacedRole path: /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Role OK 201 Role Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) Role ¶
partially update the specified Role
operationID: patchNamespacedRole path: /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedRole(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Role] ¶
replace the specified Role
operationID: replaceNamespacedRole path: /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Role OK 201 Role Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.RoleBinding(roleRef: RoleRef, apiVersion: str | None = 'rbac.authorization.k8s.io/v1', kind: str | None = 'RoleBinding', metadata: ObjectMeta | None = None, subjects: ~typing.List[Subject] | None = <factory>, client: dataclasses.InitVar[typing.Optional[kubernetes.client.api_client.ApiClient]] = None)¶
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.
Full name: RoleBinding
Attributes: roleRef: 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.
- apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
metadata: Standard object’s metadata. subjects: Subjects holds references to the objects the role applies to.
- static deleteCollectionNamespacedRoleBinding(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[RoleBinding] ¶
delete collection of RoleBinding
operationID: deleteCollectionNamespacedRoleBinding path: /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedRoleBinding(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[RoleBinding] ¶
create a RoleBinding
operationID: createNamespacedRoleBinding path: /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 RoleBinding OK 201 RoleBinding Created 202 RoleBinding Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) RoleBinding ¶
create a RoleBinding
operationID: createNamespacedRoleBinding path: /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedRoleBinding(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[RoleBinding] ¶
delete a RoleBinding
operationID: deleteNamespacedRoleBinding path: /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) RoleBinding ¶
delete a RoleBinding
operationID: deleteNamespacedRoleBinding path: /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedRoleBinding(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[RoleBinding] ¶
read the specified RoleBinding
operationID: readNamespacedRoleBinding path: /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 RoleBinding OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) RoleBinding ¶
read the specified RoleBinding
operationID: readNamespacedRoleBinding path: /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedRoleBinding(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[RoleBinding] ¶
partially update the specified RoleBinding
operationID: patchNamespacedRoleBinding path: /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 RoleBinding OK 201 RoleBinding Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) RoleBinding ¶
partially update the specified RoleBinding
operationID: patchNamespacedRoleBinding path: /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedRoleBinding(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[RoleBinding] ¶
replace the specified RoleBinding
operationID: replaceNamespacedRoleBinding path: /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 RoleBinding OK 201 RoleBinding Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.RoleBindingList(items: List[RoleBinding], apiVersion: str | None = 'rbac.authorization.k8s.io/v1', kind: str | None = 'RoleBindingList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
RoleBindingList is a collection of RoleBindings
Full name: RoleBindingList
Attributes: items: Items is a list of RoleBindings apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
metadata: Standard object’s metadata.
- static listNamespacedRoleBinding(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[RoleBindingList] ¶
list or watch objects of kind RoleBinding
operationID: listNamespacedRoleBinding path: /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 RoleBindingList OK 401 None Unauthorized
- static listRoleBindingForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[RoleBindingList] ¶
list or watch objects of kind RoleBinding
operationID: listRoleBindingForAllNamespaces path: /apis/rbac.authorization.k8s.io/v1/rolebindings
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 RoleBindingList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.RoleList(items: List[Role], apiVersion: str | None = 'rbac.authorization.k8s.io/v1', kind: str | None = 'RoleList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
RoleList is a collection of Roles
Full name: RoleList
Attributes: items: Items is a list of Roles apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
metadata: Standard object’s metadata.
- static listNamespacedRole(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[RoleList] ¶
list or watch objects of kind Role
operationID: listNamespacedRole path: /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 RoleList OK 401 None Unauthorized
- static listRoleForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[RoleList] ¶
list or watch objects of kind Role
operationID: listRoleForAllNamespaces path: /apis/rbac.authorization.k8s.io/v1/roles
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 RoleList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.PriorityClass(value: int, apiVersion: str | None = 'scheduling.k8s.io/v1', description: str | None = None, globalDefault: bool | None = None, kind: str | None = 'PriorityClass', metadata: ObjectMeta | None = None, preemptionPolicy: str | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.
Full name: PriorityClass
Attributes: value: value represents the integer 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.
- apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- description: description is an arbitrary string that usually provides guidelines on
when this priority class should be used.
- globalDefault: globalDefault specifies whether this PriorityClass should be considered
as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as globalDefault. However, if more than one PriorityClasses exists with their globalDefault field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- preemptionPolicy: preemptionPolicy is the Policy for preempting pods with lower
priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset.
- static deleteCollectionPriorityClass(continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PriorityClass] ¶
delete collection of PriorityClass
operationID: deleteCollectionPriorityClass path: /apis/scheduling.k8s.io/v1/priorityclasses
- Parameters:
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createPriorityClass(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PriorityClass] ¶
create a PriorityClass
operationID: createPriorityClass path: /apis/scheduling.k8s.io/v1/priorityclasses
- Parameters:
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PriorityClass OK 201 PriorityClass Created 202 PriorityClass Accepted 401 None Unauthorized
- create(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) PriorityClass ¶
create a PriorityClass
operationID: createPriorityClass path: /apis/scheduling.k8s.io/v1/priorityclasses
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deletePriorityClass(name: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PriorityClass] ¶
delete a PriorityClass
operationID: deletePriorityClass path: /apis/scheduling.k8s.io/v1/priorityclasses/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) PriorityClass ¶
delete a PriorityClass
operationID: deletePriorityClass path: /apis/scheduling.k8s.io/v1/priorityclasses/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readPriorityClass(name: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PriorityClass] ¶
read the specified PriorityClass
operationID: readPriorityClass path: /apis/scheduling.k8s.io/v1/priorityclasses/{name}
- Parameters:
name – name for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PriorityClass OK 401 None Unauthorized
- read(name: str | None = None, pretty: str | None = None, client: ApiClient | None = None) PriorityClass ¶
read the specified PriorityClass
operationID: readPriorityClass path: /apis/scheduling.k8s.io/v1/priorityclasses/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchPriorityClass(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PriorityClass] ¶
partially update the specified PriorityClass
operationID: patchPriorityClass path: /apis/scheduling.k8s.io/v1/priorityclasses/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PriorityClass OK 201 PriorityClass Created 401 None Unauthorized
- update(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) PriorityClass ¶
partially update the specified PriorityClass
operationID: patchPriorityClass path: /apis/scheduling.k8s.io/v1/priorityclasses/{name}
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replacePriorityClass(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PriorityClass] ¶
replace the specified PriorityClass
operationID: replacePriorityClass path: /apis/scheduling.k8s.io/v1/priorityclasses/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PriorityClass OK 201 PriorityClass Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.PriorityClassList(items: List[PriorityClass], apiVersion: str | None = 'scheduling.k8s.io/v1', kind: str | None = 'PriorityClassList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
PriorityClassList is a collection of priority classes.
Full name: PriorityClassList
Attributes: items: items is the list of PriorityClasses apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- static listPriorityClass(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[PriorityClassList] ¶
list or watch objects of kind PriorityClass
operationID: listPriorityClass path: /apis/scheduling.k8s.io/v1/priorityclasses
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 PriorityClassList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.CSIDriver(spec: CSIDriverSpec, apiVersion: str | None = 'storage.k8s.io/v1', kind: str | None = 'CSIDriver', metadata: ObjectMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced.
Full name: CSIDriver
Attributes: spec: spec represents the specification of the CSI Driver. apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object metadata. metadata.Name indicates the name of the CSI driver
that this object refers to; it MUST be the same name returned by the CSI GetPluginName() call for that driver. The driver name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- static deleteCollectionCSIDriver(continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CSIDriver] ¶
delete collection of CSIDriver
operationID: deleteCollectionCSIDriver path: /apis/storage.k8s.io/v1/csidrivers
- Parameters:
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createCSIDriver(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CSIDriver] ¶
create a CSIDriver
operationID: createCSIDriver path: /apis/storage.k8s.io/v1/csidrivers
- Parameters:
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CSIDriver OK 201 CSIDriver Created 202 CSIDriver Accepted 401 None Unauthorized
- create(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) CSIDriver ¶
create a CSIDriver
operationID: createCSIDriver path: /apis/storage.k8s.io/v1/csidrivers
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteCSIDriver(name: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CSIDriver] ¶
delete a CSIDriver
operationID: deleteCSIDriver path: /apis/storage.k8s.io/v1/csidrivers/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CSIDriver OK 202 CSIDriver Accepted 401 None Unauthorized
- delete(name: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) CSIDriver ¶
delete a CSIDriver
operationID: deleteCSIDriver path: /apis/storage.k8s.io/v1/csidrivers/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readCSIDriver(name: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CSIDriver] ¶
read the specified CSIDriver
operationID: readCSIDriver path: /apis/storage.k8s.io/v1/csidrivers/{name}
- Parameters:
name – name for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CSIDriver OK 401 None Unauthorized
- read(name: str | None = None, pretty: str | None = None, client: ApiClient | None = None) CSIDriver ¶
read the specified CSIDriver
operationID: readCSIDriver path: /apis/storage.k8s.io/v1/csidrivers/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchCSIDriver(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CSIDriver] ¶
partially update the specified CSIDriver
operationID: patchCSIDriver path: /apis/storage.k8s.io/v1/csidrivers/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CSIDriver OK 201 CSIDriver Created 401 None Unauthorized
- update(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) CSIDriver ¶
partially update the specified CSIDriver
operationID: patchCSIDriver path: /apis/storage.k8s.io/v1/csidrivers/{name}
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceCSIDriver(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CSIDriver] ¶
replace the specified CSIDriver
operationID: replaceCSIDriver path: /apis/storage.k8s.io/v1/csidrivers/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CSIDriver OK 201 CSIDriver Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.CSIDriverList(items: List[CSIDriver], apiVersion: str | None = 'storage.k8s.io/v1', kind: str | None = 'CSIDriverList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
CSIDriverList is a collection of CSIDriver objects.
Full name: CSIDriverList
Attributes: items: items is the list of CSIDriver apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- static listCSIDriver(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CSIDriverList] ¶
list or watch objects of kind CSIDriver
operationID: listCSIDriver path: /apis/storage.k8s.io/v1/csidrivers
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CSIDriverList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.CSINode(spec: CSINodeSpec, apiVersion: str | None = 'storage.k8s.io/v1', kind: str | None = 'CSINode', metadata: ObjectMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn’t create this object. CSINode has an OwnerReference that points to the corresponding node object.
Full name: CSINode
Attributes: spec: spec is the specification of CSINode apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
metadata: Standard object’s metadata. metadata.name must be the Kubernetes node name.
- static deleteCollectionCSINode(continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CSINode] ¶
delete collection of CSINode
operationID: deleteCollectionCSINode path: /apis/storage.k8s.io/v1/csinodes
- Parameters:
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createCSINode(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CSINode] ¶
create a CSINode
operationID: createCSINode path: /apis/storage.k8s.io/v1/csinodes
- Parameters:
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CSINode OK 201 CSINode Created 202 CSINode Accepted 401 None Unauthorized
- create(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) CSINode ¶
create a CSINode
operationID: createCSINode path: /apis/storage.k8s.io/v1/csinodes
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteCSINode(name: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CSINode] ¶
delete a CSINode
operationID: deleteCSINode path: /apis/storage.k8s.io/v1/csinodes/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CSINode OK 202 CSINode Accepted 401 None Unauthorized
- delete(name: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) CSINode ¶
delete a CSINode
operationID: deleteCSINode path: /apis/storage.k8s.io/v1/csinodes/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readCSINode(name: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CSINode] ¶
read the specified CSINode
operationID: readCSINode path: /apis/storage.k8s.io/v1/csinodes/{name}
- Parameters:
name – name for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CSINode OK 401 None Unauthorized
- read(name: str | None = None, pretty: str | None = None, client: ApiClient | None = None) CSINode ¶
read the specified CSINode
operationID: readCSINode path: /apis/storage.k8s.io/v1/csinodes/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchCSINode(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CSINode] ¶
partially update the specified CSINode
operationID: patchCSINode path: /apis/storage.k8s.io/v1/csinodes/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CSINode OK 201 CSINode Created 401 None Unauthorized
- update(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) CSINode ¶
partially update the specified CSINode
operationID: patchCSINode path: /apis/storage.k8s.io/v1/csinodes/{name}
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceCSINode(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CSINode] ¶
replace the specified CSINode
operationID: replaceCSINode path: /apis/storage.k8s.io/v1/csinodes/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CSINode OK 201 CSINode Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.CSINodeList(items: List[CSINode], apiVersion: str | None = 'storage.k8s.io/v1', kind: str | None = 'CSINodeList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
CSINodeList is a collection of CSINode objects.
Full name: CSINodeList
Attributes: items: items is the list of CSINode apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- static listCSINode(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CSINodeList] ¶
list or watch objects of kind CSINode
operationID: listCSINode path: /apis/storage.k8s.io/v1/csinodes
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CSINodeList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.CSIStorageCapacity(storageClassName: str, apiVersion: str | None = 'storage.k8s.io/v1', capacity: str | None = None, kind: str | None = 'CSIStorageCapacity', maximumVolumeSize: str | None = None, metadata: ObjectMeta | None = None, nodeTopology: LabelSelector | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. For example this can express things like: - StorageClass “standard” has “1234 GiB” available in “topology.kubernetes.io/zone=us-east1” - StorageClass “localssd” has “10 GiB” available in “kubernetes.io/hostname=knode-abc123” The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero The producer of these objects can decide which approach is more suitable. They are consumed by the kube-scheduler when a CSI driver opts into capacity-aware scheduling with CSIDriverSpec.StorageCapacity. The scheduler compares the MaximumVolumeSize against the requested size of pending volumes to filter out unsuitable nodes. If MaximumVolumeSize is unset, it falls back to a comparison against the less precise Capacity. If that is also unset, the scheduler assumes that capacity is insufficient and tries some other node.
Full name: CSIStorageCapacity
Attributes: storageClassName: storageClassName represents the name of the StorageClass that the
reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable.
- apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- capacity: capacity is the value reported by the CSI driver in its GetCapacityResponse
for a GetCapacityRequest with topology and parameters that match the previous fields. The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable.
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- maximumVolumeSize: maximumVolumeSize is the value reported by the CSI driver in its
GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim.
- metadata: Standard object’s metadata. The name has no particular meaning. It must be a
DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-<uuid>, a generated name, or a reverse-domain name which ends with the unique CSI driver name. Objects are namespaced. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- nodeTopology: nodeTopology defines which nodes have access to the storage for which
capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable.
- static deleteCollectionNamespacedCSIStorageCapacity(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CSIStorageCapacity] ¶
delete collection of CSIStorageCapacity
operationID: deleteCollectionNamespacedCSIStorageCapacity path: /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedCSIStorageCapacity(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CSIStorageCapacity] ¶
create a CSIStorageCapacity
operationID: createNamespacedCSIStorageCapacity path: /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CSIStorageCapacity OK 201 CSIStorageCapacity Created 202 CSIStorageCapacity Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) CSIStorageCapacity ¶
create a CSIStorageCapacity
operationID: createNamespacedCSIStorageCapacity path: /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedCSIStorageCapacity(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CSIStorageCapacity] ¶
delete a CSIStorageCapacity
operationID: deleteNamespacedCSIStorageCapacity path: /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) CSIStorageCapacity ¶
delete a CSIStorageCapacity
operationID: deleteNamespacedCSIStorageCapacity path: /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedCSIStorageCapacity(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CSIStorageCapacity] ¶
read the specified CSIStorageCapacity
operationID: readNamespacedCSIStorageCapacity path: /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CSIStorageCapacity OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) CSIStorageCapacity ¶
read the specified CSIStorageCapacity
operationID: readNamespacedCSIStorageCapacity path: /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedCSIStorageCapacity(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CSIStorageCapacity] ¶
partially update the specified CSIStorageCapacity
operationID: patchNamespacedCSIStorageCapacity path: /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CSIStorageCapacity OK 201 CSIStorageCapacity Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) CSIStorageCapacity ¶
partially update the specified CSIStorageCapacity
operationID: patchNamespacedCSIStorageCapacity path: /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedCSIStorageCapacity(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CSIStorageCapacity] ¶
replace the specified CSIStorageCapacity
operationID: replaceNamespacedCSIStorageCapacity path: /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CSIStorageCapacity OK 201 CSIStorageCapacity Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.CSIStorageCapacityList(items: List[CSIStorageCapacity], apiVersion: str | None = 'storage.k8s.io/v1', kind: str | None = 'CSIStorageCapacityList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
CSIStorageCapacityList is a collection of CSIStorageCapacity objects.
Full name: CSIStorageCapacityList
Attributes: items: items is the list of CSIStorageCapacity objects. apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- static listCSIStorageCapacityForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CSIStorageCapacityList] ¶
list or watch objects of kind CSIStorageCapacity
operationID: listCSIStorageCapacityForAllNamespaces path: /apis/storage.k8s.io/v1/csistoragecapacities
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CSIStorageCapacityList OK 401 None Unauthorized
- static listNamespacedCSIStorageCapacity(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CSIStorageCapacityList] ¶
list or watch objects of kind CSIStorageCapacity
operationID: listNamespacedCSIStorageCapacity path: /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CSIStorageCapacityList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.StorageClass(provisioner: str, allowVolumeExpansion: bool | None = None, apiVersion: str | None = 'storage.k8s.io/v1', kind: str | None = 'StorageClass', metadata: ObjectMeta | None = None, reclaimPolicy: str | None = None, volumeBindingMode: str | None = None, allowedTopologies: ~typing.List[TopologySelectorTerm] | None = <factory>, mountOptions: ~typing.List[str] | None = <factory>, parameters: ~typing.Dict[str, str] | None = <factory>, client: dataclasses.InitVar[typing.Optional[kubernetes.client.api_client.ApiClient]] = None)¶
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.
Full name: StorageClass
Attributes: provisioner: provisioner indicates the type of the provisioner. allowVolumeExpansion: allowVolumeExpansion shows whether the storage class allow
volume expand.
- apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- reclaimPolicy: reclaimPolicy controls the reclaimPolicy for dynamically provisioned
PersistentVolumes of this storage class. Defaults to Delete.
- volumeBindingMode: volumeBindingMode indicates how PersistentVolumeClaims should be
provisioned and bound. When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.
- allowedTopologies: allowedTopologies restrict the node topologies where volumes can be
dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.
- mountOptions: mountOptions controls the mountOptions for dynamically provisioned
PersistentVolumes of this storage class. e.g. [“ro”, “soft”]. Not validated - mount of the PVs will simply fail if one is invalid.
- parameters: parameters holds the parameters for the provisioner that should create
volumes of this storage class.
- static deleteCollectionStorageClass(continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[StorageClass] ¶
delete collection of StorageClass
operationID: deleteCollectionStorageClass path: /apis/storage.k8s.io/v1/storageclasses
- Parameters:
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createStorageClass(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[StorageClass] ¶
create a StorageClass
operationID: createStorageClass path: /apis/storage.k8s.io/v1/storageclasses
- Parameters:
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 StorageClass OK 201 StorageClass Created 202 StorageClass Accepted 401 None Unauthorized
- create(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) StorageClass ¶
create a StorageClass
operationID: createStorageClass path: /apis/storage.k8s.io/v1/storageclasses
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteStorageClass(name: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[StorageClass] ¶
delete a StorageClass
operationID: deleteStorageClass path: /apis/storage.k8s.io/v1/storageclasses/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 StorageClass OK 202 StorageClass Accepted 401 None Unauthorized
- delete(name: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) StorageClass ¶
delete a StorageClass
operationID: deleteStorageClass path: /apis/storage.k8s.io/v1/storageclasses/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readStorageClass(name: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[StorageClass] ¶
read the specified StorageClass
operationID: readStorageClass path: /apis/storage.k8s.io/v1/storageclasses/{name}
- Parameters:
name – name for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 StorageClass OK 401 None Unauthorized
- read(name: str | None = None, pretty: str | None = None, client: ApiClient | None = None) StorageClass ¶
read the specified StorageClass
operationID: readStorageClass path: /apis/storage.k8s.io/v1/storageclasses/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchStorageClass(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[StorageClass] ¶
partially update the specified StorageClass
operationID: patchStorageClass path: /apis/storage.k8s.io/v1/storageclasses/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 StorageClass OK 201 StorageClass Created 401 None Unauthorized
- update(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) StorageClass ¶
partially update the specified StorageClass
operationID: patchStorageClass path: /apis/storage.k8s.io/v1/storageclasses/{name}
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceStorageClass(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[StorageClass] ¶
replace the specified StorageClass
operationID: replaceStorageClass path: /apis/storage.k8s.io/v1/storageclasses/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 StorageClass OK 201 StorageClass Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.StorageClassList(items: List[StorageClass], apiVersion: str | None = 'storage.k8s.io/v1', kind: str | None = 'StorageClassList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
StorageClassList is a collection of storage classes.
Full name: StorageClassList
Attributes: items: items is the list of StorageClasses apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- static listStorageClass(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[StorageClassList] ¶
list or watch objects of kind StorageClass
operationID: listStorageClass path: /apis/storage.k8s.io/v1/storageclasses
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 StorageClassList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.VolumeAttachment(spec: VolumeAttachmentSpec, apiVersion: str | None = 'storage.k8s.io/v1', kind: str | None = 'VolumeAttachment', metadata: ObjectMeta | None = None, status: VolumeAttachmentStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node. VolumeAttachment objects are non-namespaced.
Full name: VolumeAttachment
Attributes: spec: spec represents specification of the desired attach/detach volume behavior.
Populated by the Kubernetes system.
- apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- status: status represents status of the VolumeAttachment request. Populated by the
entity completing the attach or detach operation, i.e. the external-attacher.
- static deleteCollectionVolumeAttachment(continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[VolumeAttachment] ¶
delete collection of VolumeAttachment
operationID: deleteCollectionVolumeAttachment path: /apis/storage.k8s.io/v1/volumeattachments
- Parameters:
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createVolumeAttachment(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[VolumeAttachment] ¶
create a VolumeAttachment
operationID: createVolumeAttachment path: /apis/storage.k8s.io/v1/volumeattachments
- Parameters:
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 VolumeAttachment OK 201 VolumeAttachment Created 202 VolumeAttachment Accepted 401 None Unauthorized
- create(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) VolumeAttachment ¶
create a VolumeAttachment
operationID: createVolumeAttachment path: /apis/storage.k8s.io/v1/volumeattachments
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteVolumeAttachment(name: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[VolumeAttachment] ¶
delete a VolumeAttachment
operationID: deleteVolumeAttachment path: /apis/storage.k8s.io/v1/volumeattachments/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 VolumeAttachment OK 202 VolumeAttachment Accepted 401 None Unauthorized
- delete(name: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) VolumeAttachment ¶
delete a VolumeAttachment
operationID: deleteVolumeAttachment path: /apis/storage.k8s.io/v1/volumeattachments/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readVolumeAttachment(name: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[VolumeAttachment] ¶
read the specified VolumeAttachment
operationID: readVolumeAttachment path: /apis/storage.k8s.io/v1/volumeattachments/{name}
- Parameters:
name – name for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 VolumeAttachment OK 401 None Unauthorized
- read(name: str | None = None, pretty: str | None = None, client: ApiClient | None = None) VolumeAttachment ¶
read the specified VolumeAttachment
operationID: readVolumeAttachment path: /apis/storage.k8s.io/v1/volumeattachments/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchVolumeAttachment(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[VolumeAttachment] ¶
partially update the specified VolumeAttachment
operationID: patchVolumeAttachment path: /apis/storage.k8s.io/v1/volumeattachments/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 VolumeAttachment OK 201 VolumeAttachment Created 401 None Unauthorized
- update(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) VolumeAttachment ¶
partially update the specified VolumeAttachment
operationID: patchVolumeAttachment path: /apis/storage.k8s.io/v1/volumeattachments/{name}
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceVolumeAttachment(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[VolumeAttachment] ¶
replace the specified VolumeAttachment
operationID: replaceVolumeAttachment path: /apis/storage.k8s.io/v1/volumeattachments/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 VolumeAttachment OK 201 VolumeAttachment Created 401 None Unauthorized
- replaceVolumeAttachmentStatus(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[VolumeAttachment] ¶
replace status of the specified VolumeAttachment
operationID: replaceVolumeAttachmentStatus path: /apis/storage.k8s.io/v1/volumeattachments/{name}/status
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 VolumeAttachment OK 201 VolumeAttachment Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.VolumeAttachmentList(items: List[VolumeAttachment], apiVersion: str | None = 'storage.k8s.io/v1', kind: str | None = 'VolumeAttachmentList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
VolumeAttachmentList is a collection of VolumeAttachment objects.
Full name: VolumeAttachmentList
Attributes: items: items is the list of VolumeAttachments apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- static listVolumeAttachment(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[VolumeAttachmentList] ¶
list or watch objects of kind VolumeAttachment
operationID: listVolumeAttachment path: /apis/storage.k8s.io/v1/volumeattachments
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 VolumeAttachmentList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.CustomResourceDefinition(spec: CustomResourceDefinitionSpec, apiVersion: str | None = 'apiextensions.k8s.io/v1', kind: str | None = 'CustomResourceDefinition', metadata: ObjectMeta | None = None, status: CustomResourceDefinitionStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>.
Full name: CustomResourceDefinition
Attributes: spec: spec describes how the user wants the resources to appear apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
status: status indicates the actual state of the CustomResourceDefinition
- static deleteCollectionCustomResourceDefinition(continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CustomResourceDefinition] ¶
delete collection of CustomResourceDefinition
operationID: deleteCollectionCustomResourceDefinition path: /apis/apiextensions.k8s.io/v1/customresourcedefinitions
- Parameters:
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createCustomResourceDefinition(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CustomResourceDefinition] ¶
create a CustomResourceDefinition
operationID: createCustomResourceDefinition path: /apis/apiextensions.k8s.io/v1/customresourcedefinitions
- Parameters:
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CustomResourceDefinition OK 201 CustomResourceDefinition Created 202 CustomResourceDefinition Accepted 401 None Unauthorized
- create(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) CustomResourceDefinition ¶
create a CustomResourceDefinition
operationID: createCustomResourceDefinition path: /apis/apiextensions.k8s.io/v1/customresourcedefinitions
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteCustomResourceDefinition(name: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CustomResourceDefinition] ¶
delete a CustomResourceDefinition
operationID: deleteCustomResourceDefinition path: /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) CustomResourceDefinition ¶
delete a CustomResourceDefinition
operationID: deleteCustomResourceDefinition path: /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readCustomResourceDefinition(name: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CustomResourceDefinition] ¶
read the specified CustomResourceDefinition
operationID: readCustomResourceDefinition path: /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}
- Parameters:
name – name for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CustomResourceDefinition OK 401 None Unauthorized
- read(name: str | None = None, pretty: str | None = None, client: ApiClient | None = None) CustomResourceDefinition ¶
read the specified CustomResourceDefinition
operationID: readCustomResourceDefinition path: /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchCustomResourceDefinition(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CustomResourceDefinition] ¶
partially update the specified CustomResourceDefinition
operationID: patchCustomResourceDefinition path: /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CustomResourceDefinition OK 201 CustomResourceDefinition Created 401 None Unauthorized
- update(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) CustomResourceDefinition ¶
partially update the specified CustomResourceDefinition
operationID: patchCustomResourceDefinition path: /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceCustomResourceDefinition(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CustomResourceDefinition] ¶
replace the specified CustomResourceDefinition
operationID: replaceCustomResourceDefinition path: /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CustomResourceDefinition OK 201 CustomResourceDefinition Created 401 None Unauthorized
- replaceCustomResourceDefinitionStatus(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CustomResourceDefinition] ¶
replace status of the specified CustomResourceDefinition
operationID: replaceCustomResourceDefinitionStatus path: /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CustomResourceDefinition OK 201 CustomResourceDefinition Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.CustomResourceDefinitionList(items: List[CustomResourceDefinition], apiVersion: str | None = 'apiextensions.k8s.io/v1', kind: str | None = 'CustomResourceDefinitionList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
CustomResourceDefinitionList is a list of CustomResourceDefinition objects.
Full name: CustomResourceDefinitionList
Attributes: items: items list individual CustomResourceDefinition objects apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- static listCustomResourceDefinition(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[CustomResourceDefinitionList] ¶
list or watch objects of kind CustomResourceDefinition
operationID: listCustomResourceDefinition path: /apis/apiextensions.k8s.io/v1/customresourcedefinitions
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 CustomResourceDefinitionList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.APIGroup(name: str, versions: ~typing.List[GroupVersionForDiscovery], apiVersion: str | None = 'v1', kind: str | None = 'APIGroup', preferredVersion: GroupVersionForDiscovery | None = None, serverAddressByClientCIDRs: ~typing.List[ServerAddressByClientCIDR] | None = <factory>, client: dataclasses.InitVar[typing.Optional[kubernetes.client.api_client.ApiClient]] = None)¶
APIGroup contains the name, the supported versions, and the preferred version of a group.
Full name: APIGroup
Attributes: name: name is the name of the group. versions: versions are the versions supported in this group. apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- preferredVersion: preferredVersion is the version preferred by the API server, which
probably is the storage version.
- 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.
- class hikaru.model.rel_1_27.v1.documents.APIGroupList(groups: List[APIGroup], apiVersion: str | None = 'v1', kind: str | None = 'APIGroupList', client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.
Full name: APIGroupList
Attributes: groups: groups is a list of APIGroup. apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- class hikaru.model.rel_1_27.v1.documents.APIResourceList(groupVersion: str, resources: List[APIResource], apiVersion: str | None = 'v1', kind: str | None = 'APIResourceList', client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
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.
Full name: APIResourceList
Attributes: groupVersion: groupVersion is the group and version this APIResourceList is for. resources: resources contains the name of the resources and if they are namespaced. apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- class hikaru.model.rel_1_27.v1.documents.APIVersions(serverAddressByClientCIDRs: List[ServerAddressByClientCIDR], versions: List[str], apiVersion: str | None = 'v1', kind: str | None = 'APIVersions', client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
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.
Full name: APIVersions
Attributes: 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.
versions: versions are the api versions that are available. apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- class hikaru.model.rel_1_27.v1.documents.DeleteOptions(apiVersion: str | None = 'v1', gracePeriodSeconds: int | None = None, kind: str | None = 'DeleteOptions', orphanDependents: bool | None = None, preconditions: Preconditions | None = None, propagationPolicy: str | None = None, dryRun: ~typing.List[str] | None = <factory>, client: dataclasses.InitVar[typing.Optional[kubernetes.client.api_client.ApiClient]] = None)¶
DeleteOptions may be provided when deleting an API object.
Full name: DeleteOptions
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- gracePeriodSeconds: 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.
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- orphanDependents: 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.
- preconditions: Must be fulfilled before a deletion is carried out. If not possible, a
409 Conflict status will be returned.
- propagationPolicy: 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- dryRun: When present, indicates that modifications should not be persisted. An invalid
or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- class hikaru.model.rel_1_27.v1.documents.Status(apiVersion: str | None = 'v1', code: int | None = None, details: StatusDetails | None = None, kind: str | None = 'Status', message: str | None = None, metadata: ListMeta | None = None, reason: str | None = None, status: str | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
Status is a return value for calls that don’t return other objects.
Full name: Status
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
code: Suggested HTTP return code for this status, 0 if not set. details: 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.
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
message: A human-readable description of the status of this operation. metadata: Standard list metadata. More info:
- reason: 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.
- status: Status of the operation. One of: “Success” or “Failure”. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- class hikaru.model.rel_1_27.v1.documents.APIService(apiVersion: str | None = 'apiregistration.k8s.io/v1', kind: str | None = 'APIService', metadata: ObjectMeta | None = None, spec: APIServiceSpec | None = None, status: APIServiceStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
APIService represents a server for a particular GroupVersion. Name must be “version.group”.
Full name: APIService
Attributes: apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
spec: Spec contains information for locating and communicating with a server status: Status contains derived information about an API server
- static deleteCollectionAPIService(continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[APIService] ¶
delete collection of APIService
operationID: deleteCollectionAPIService path: /apis/apiregistration.k8s.io/v1/apiservices
- Parameters:
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createAPIService(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[APIService] ¶
create an APIService
operationID: createAPIService path: /apis/apiregistration.k8s.io/v1/apiservices
- Parameters:
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 APIService OK 201 APIService Created 202 APIService Accepted 401 None Unauthorized
- create(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) APIService ¶
create an APIService
operationID: createAPIService path: /apis/apiregistration.k8s.io/v1/apiservices
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteAPIService(name: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[APIService] ¶
delete an APIService
operationID: deleteAPIService path: /apis/apiregistration.k8s.io/v1/apiservices/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) APIService ¶
delete an APIService
operationID: deleteAPIService path: /apis/apiregistration.k8s.io/v1/apiservices/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readAPIService(name: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[APIService] ¶
read the specified APIService
operationID: readAPIService path: /apis/apiregistration.k8s.io/v1/apiservices/{name}
- Parameters:
name – name for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 APIService OK 401 None Unauthorized
- read(name: str | None = None, pretty: str | None = None, client: ApiClient | None = None) APIService ¶
read the specified APIService
operationID: readAPIService path: /apis/apiregistration.k8s.io/v1/apiservices/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchAPIService(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[APIService] ¶
partially update the specified APIService
operationID: patchAPIService path: /apis/apiregistration.k8s.io/v1/apiservices/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 APIService OK 201 APIService Created 401 None Unauthorized
- update(dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) APIService ¶
partially update the specified APIService
operationID: patchAPIService path: /apis/apiregistration.k8s.io/v1/apiservices/{name}
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceAPIService(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[APIService] ¶
replace the specified APIService
operationID: replaceAPIService path: /apis/apiregistration.k8s.io/v1/apiservices/{name}
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 APIService OK 201 APIService Created 401 None Unauthorized
- replaceAPIServiceStatus(name: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[APIService] ¶
replace status of the specified APIService
operationID: replaceAPIServiceStatus path: /apis/apiregistration.k8s.io/v1/apiservices/{name}/status
- Parameters:
name – name for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 APIService OK 201 APIService Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.APIServiceList(items: List[APIService], apiVersion: str | None = 'apiregistration.k8s.io/v1', kind: str | None = 'APIServiceList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
APIServiceList is a list of APIService objects.
Full name: APIServiceList
Attributes: items: Items is the list of APIService apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- static listAPIService(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[APIServiceList] ¶
list or watch objects of kind APIService
operationID: listAPIService path: /apis/apiregistration.k8s.io/v1/apiservices
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 APIServiceList OK 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.TokenRequest(spec: TokenRequestSpec, apiVersion: str | None = 'authentication.k8s.io/v1', kind: str | None = 'TokenRequest', metadata: ObjectMeta | None = None, status: TokenRequestStatus | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
TokenRequest requests a token for a given service account.
Full name: TokenRequest
Attributes: spec: Spec holds information about the request being evaluated apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- status: Status is filled in by the server and indicates whether the token can be
authenticated.
- createNamespacedServiceAccountToken(name: str, namespace: str, client: ApiClient | None = None, async_req: bool = False) Response[TokenRequest] ¶
create token of a ServiceAccount
operationID: createNamespacedServiceAccountToken path: /api/v1/namespaces/{namespace}/serviceaccounts/{name}/token
- Parameters:
name – name for the resource
namespace – namespace for the resource
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 TokenRequest OK 201 TokenRequest Created 202 TokenRequest Accepted 401 None Unauthorized
- create(namespace: str | None = None, client: ApiClient | None = None) TokenRequest ¶
create token of a ServiceAccount
operationID: createNamespacedServiceAccountToken path: /api/v1/namespaces/{namespace}/serviceaccounts/{name}/token
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- class hikaru.model.rel_1_27.v1.documents.Event(eventTime: str, action: str | None = None, apiVersion: str | None = 'events.k8s.io/v1', deprecatedCount: int | None = None, deprecatedFirstTimestamp: str | None = None, deprecatedLastTimestamp: str | None = None, deprecatedSource: EventSource | None = None, kind: str | None = 'Event', metadata: ObjectMeta | None = None, note: str | None = None, reason: str | None = None, regarding: ObjectReference | None = None, related: ObjectReference | None = None, reportingController: str | None = None, reportingInstance: str | None = None, series: EventSeries | None = None, type: str | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.
Full name: Event
Attributes: eventTime: eventTime is the time when this Event was first observed. It is required. action: action is what action was taken/failed regarding to the regarding object. It
is machine-readable. This field cannot be empty for new Events and it can have at most 128 characters.
- apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- deprecatedCount: deprecatedCount is the deprecated field assuring backward
compatibility with core.v1 Event type.
- deprecatedFirstTimestamp: deprecatedFirstTimestamp is the deprecated field assuring
backward compatibility with core.v1 Event type.
- deprecatedLastTimestamp: deprecatedLastTimestamp is the deprecated field assuring
backward compatibility with core.v1 Event type.
- deprecatedSource: deprecatedSource is the deprecated field assuring backward
compatibility with core.v1 Event type.
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- note: note is a human-readable description of the status of this operation. Maximal
length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.
- reason: reason is why the action was taken. It is human-readable. This field cannot be
empty for new Events and it can have at most 128 characters.
- regarding: regarding contains the object this Event is about. In most cases it’s an
Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.
- related: related is the optional secondary object for more complex actions. E.g. when
regarding object triggers a creation or deletion of related object.
- reportingController: reportingController is the name of the controller that emitted
this Event, e.g. kubernetes.io/kubelet. This field cannot be empty for new Events.
- reportingInstance: reportingInstance is the ID of the controller instance, e.g.
kubelet-xyzf. This field cannot be empty for new Events and it can have at most 128 characters.
- series: series is data about the Event series this event represents or nil if it’s a
singleton Event.
- type: type is the type of this event (Normal, Warning), new types could be added in
the future. It is machine-readable. This field cannot be empty for new Events.
- static deleteCollectionNamespacedEvent(namespace: str, continue_: str | None = None, dry_run: str | None = None, field_selector: str | None = None, grace_period_seconds: int | None = None, label_selector: str | None = None, limit: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Event] ¶
delete collection of Event
operationID: deleteCollectionNamespacedEvent path: /apis/events.k8s.io/v1/namespaces/{namespace}/events
- Parameters:
namespace – namespace for the resource
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
grace_period_seconds – 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.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 401 None Unauthorized
- createNamespacedEvent(namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Event] ¶
create an Event
operationID: createNamespacedEvent path: /apis/events.k8s.io/v1/namespaces/{namespace}/events
- Parameters:
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Event OK 201 Event Created 202 Event Accepted 401 None Unauthorized
- create(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None) Event ¶
create an Event
operationID: createNamespacedEvent path: /apis/events.k8s.io/v1/namespaces/{namespace}/events
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static deleteNamespacedEvent(name: str, namespace: str, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, body: DeleteOptions | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Event] ¶
delete an Event
operationID: deleteNamespacedEvent path: /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_seconds – 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.
orphan_dependents – 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.
propagation_policy – 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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
body –
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Status OK 202 Status Accepted 401 None Unauthorized
- delete(name: str | None = None, namespace: str | None = None, dry_run: str | None = None, grace_period_seconds: int | None = None, orphan_dependents: bool | None = None, propagation_policy: str | None = None, client: ApiClient | None = None) Event ¶
delete an Event
operationID: deleteNamespacedEvent path: /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param grace_period_seconds:
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.
- param orphan_dependents:
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.
- param propagation_policy:
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. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- static readNamespacedEvent(name: str, namespace: str, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Event] ¶
read the specified Event
operationID: readNamespacedEvent path: /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Event OK 401 None Unauthorized
- read(name: str | None = None, namespace: str | None = None, pretty: str | None = None, client: ApiClient | None = None) Event ¶
read the specified Event
operationID: readNamespacedEvent path: /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}
- param name:
name for the resource. NOTE: if you leave out the name from the arguments you must have filled in the name attribute in the metadata for the resource!
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param pretty:
If ‘true’, then the output is pretty printed.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- patchNamespacedEvent(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Event] ¶
partially update the specified Event
operationID: patchNamespacedEvent path: /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
force – Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Event OK 201 Event Created 401 None Unauthorized
- update(namespace: str | None = None, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, force: bool | None = None, client: ApiClient | None = None) Event ¶
partially update the specified Event
operationID: patchNamespacedEvent path: /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}
- param namespace:
namespace for the resource. NOTE: if you leave out the namespace from the arguments you must have filled in the namespace attribute in the metadata for the resource!
- param dry_run:
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- param field_manager:
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- param field_validation:
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- param force:
Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- param client:
optional; instance of kubernetes.client.api_client.ApiClient
- return:
returns self; the state of self may be permuted with a returned HikaruDocumentBase object, whose values will be merged into self
- (if of the same type).
- raises:
KubernetesException. Raised only by the CRUD methods to signal that a return code of 400 or higher was returned by the underlying Kubernetes library.
- replaceNamespacedEvent(name: str, namespace: str, dry_run: str | None = None, field_manager: str | None = None, field_validation: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[Event] ¶
replace the specified Event
operationID: replaceNamespacedEvent path: /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}
- Parameters:
name – name for the resource
namespace – namespace for the resource
dry_run – When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
field_manager – fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
field_validation – fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 Event OK 201 Event Created 401 None Unauthorized
- class hikaru.model.rel_1_27.v1.documents.EventList(items: List[Event], apiVersion: str | None = 'events.k8s.io/v1', kind: str | None = 'EventList', metadata: ListMeta | None = None, client: dataclasses.InitVar[Optional[kubernetes.client.api_client.ApiClient]] = None)¶
EventList is a list of Event objects.
Full name: EventList
Attributes: items: items is a list of schema objects. apiVersion: APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind: Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata: Standard list metadata. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- static listEventForAllNamespaces(allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, pretty: str | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, client: ApiClient | None = None, async_req: bool = False) Response[EventList] ¶
list or watch objects of kind Event
operationID: listEventForAllNamespaces path: /apis/events.k8s.io/v1/events
- Parameters:
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
pretty – If ‘true’, then the output is pretty printed.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 EventList OK 401 None Unauthorized
- static listNamespacedEvent(namespace: str, allow_watch_bookmarks: bool | None = None, continue_: str | None = None, field_selector: str | None = None, label_selector: str | None = None, limit: int | None = None, resource_version: str | None = None, resource_version_match: str | None = None, send_initial_events: bool | None = None, timeout_seconds: int | None = None, watch: bool | None = None, pretty: str | None = None, client: ApiClient | None = None, async_req: bool = False) Response[EventList] ¶
list or watch objects of kind Event
operationID: listNamespacedEvent path: /apis/events.k8s.io/v1/namespaces/{namespace}/events
- Parameters:
namespace – namespace for the resource
allow_watch_bookmarks – allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
continue – The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
field_selector – A selector to restrict the list of returned objects by their fields. Defaults to everything.
label_selector – A selector to restrict the list of returned objects by their labels. Defaults to everything.
limit – limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
resource_version – resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
resource_version_match – resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
send_initial_events – sendInitialEvents=true may be set together with watch=true. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic “Bookmark” event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with “k8s.io/initial-events-end”: “true” annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When sendInitialEvents option is set, we require resourceVersionMatch option to also be set. The semantic of the watch request is as following: - resourceVersionMatch = NotOlderThan is interpreted as “data at least as new as the provided resourceVersion” and the bookmark event is send when the state is synced to a resourceVersion at least as fresh as the one provided by the ListOptions. If resourceVersion is unset, this is interpreted as “consistent read” and the bookmark event is send when the state is synced at least to the moment when request started being processed. - resourceVersionMatch set to any other value or unset Invalid error is returned. Defaults to true if resourceVersion=”” or resourceVersion=”0” (for backward compatibility reasons) and to false otherwise.
timeout_seconds – Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
watch – Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
pretty – If ‘true’, then the output is pretty printed.
client – optional; instance of kubernetes.client.api_client.ApiClient
async_req – bool; if True, call is async and the caller must invoke .get() on the returned Response object. Default is False, which makes the call blocking.
- Returns:
- hikaru.utils.Response[T] instance with the following codes and
obj value types:
200 EventList OK 401 None Unauthorized