Interface ExtensibleResource<T>

    • Method Detail

      • dryRun

        ExtensibleResource<T> dryRun​(boolean isDryRun)
        Description copied from interface: DryRunable
        Indicates whether modifications should not be persisted or not. If enabled, All dry run stages will be processed. the request is still processed as typical request: the fields are defaulted, the object is validated, it goes through the validation admission chain, and through the mutating admission chain, and then the final object is returned to the user as it normally would, without being persisted.
        Specified by:
        dryRun in interface DryRunable<T>
        Parameters:
        isDryRun - whether dry run is enabled or disabled
        Returns:
        write operations which are applicable for dry run
      • withGracePeriod

        ExtensibleResource<T> withGracePeriod​(long gracePeriodSeconds)
        Description copied from interface: GracePeriodConfigurable
        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.
        Specified by:
        withGracePeriod in interface GracePeriodConfigurable<T>
        Parameters:
        gracePeriodSeconds - grace period integer value in seconds
        Returns:
        the object for which grace period is configured
      • withPropagationPolicy

        ExtensibleResource<T> withPropagationPolicy​(io.fabric8.kubernetes.api.model.DeletionPropagation propagationPolicy)
        Description copied from interface: PropagationPolicyConfigurable
        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.

        Specified by:
        withPropagationPolicy in interface PropagationPolicyConfigurable<T>
        Parameters:
        propagationPolicy - propagation policy in form of string DeletionPropagation
        Returns:
        resource
      • inWriteContext

        <C extends Client> C inWriteContext​(Class<C> clazz)
        Should be used to obtain a client in the same write context as the given resource - dryRun, DeletionPropagation, etc.
        Parameters:
        clazz - client type
        Returns:
        the client in the write context
      • withLimit

        ExtensibleResource<T> withLimit​(Long limit)
        Description copied from interface: Informable
        Set the limit to the number of resources to list at one time. This means that longer lists will take multiple requests to fetch.

        If the list fails to complete it will be re-attempted with this limit, rather than falling back to the full list. You should ensure that your handlers are either async or fast acting to prevent long delays in list processing that may cause results to expire before reaching the end of the list.

        WARNING As noted in the go client: "paginated lists are always served directly from etcd, which is significantly less efficient and may lead to serious performance and scalability problems."

        Specified by:
        withLimit in interface Informable<T>
        Parameters:
        limit - of a items in a list fetch
        Returns:
        the current Informable
      • getItem

        T getItem()
        Return the current item, which may be null if the resource was created using Nameable.withName(String)
        Returns:
        the item
      • unlock

        ExtensibleResource<T> unlock()
        Description copied from interface: NonDeletingOperation
        Removes the resource version from the current item. If the operation context was created by name, and without an item, this will fetch the item from the api server first.
        Specified by:
        unlock in interface NonDeletingOperation<T>
        Returns:
        NonDeletingOperation that may act on the unlocked item
      • scale

        default T scale​(int count)
        Description copied from interface: Scalable
        Scale the resource to given count
        Specified by:
        scale in interface Scalable<T>
        Specified by:
        scale in interface TimeoutableScalable<T>
        Parameters:
        count - the desired instance count
        Returns:
        the resource