Class ClientAdapter<C extends ClientAdapter<C>>

    • Constructor Detail

      • ClientAdapter

        public ClientAdapter()
    • Method Detail

      • getClient

        public Client getClient()
      • init

        public void init​(Client client)
      • supports

        public <T extends io.fabric8.kubernetes.api.model.KubernetesResource> boolean supports​(Class<T> type)
        Description copied from interface: Client
        Checks the Kubernetes server for support for the given KubernetesResource type.

        The response is not cached, a new check will be performed for each method invocation. In case custom resource definition is installed in between invocations, this method might return different values.

        Specified by:
        supports in interface Client
        Parameters:
        type - to check for support
        Returns:
        boolean value indicating whether this type is supported
      • supports

        public boolean supports​(String apiVersion,
                                String kind)
        Description copied from interface: Client
        Checks the Kubernetes server for support for the given type.

        The response is not cached, a new check will be performed for each method invocation. In case custom resource definition is installed in between invocations, this method might return different values.

        Specified by:
        supports in interface Client
        Parameters:
        apiVersion - the api/version. This should be fully qualified - that is for openshift, please include the api.
        kind - the resource kind
        Returns:
        boolean value indicating whether this type is supported
      • hasApiGroup

        public boolean hasApiGroup​(String apiGroup,
                                   boolean exact)
        Description copied from interface: Client
        Checks for the api group. exact = false will scan all groups for a suffix match. exact = true will look only for that apiGroup.
        Specified by:
        hasApiGroup in interface Client
        Parameters:
        apiGroup - to check for
        exact - true for an exact match
        Returns:
        true if there is a match
      • adapt

        public <A extends Client> A adapt​(Class<A> type)
        Description copied from interface: Client
        Adapt the client to another type. This will not perform any check of whether the new client type is supported. It may even return the same object if it already supports the given client type.
        Specified by:
        adapt in interface Client
        Parameters:
        type - the instance of Client to adapt.
        Returns:
        The refined instance of the Client.
      • rootPaths

        public io.fabric8.kubernetes.api.model.RootPaths rootPaths()
        Specified by:
        rootPaths in interface Client
      • supportsApiPath

        public boolean supportsApiPath​(String path)
        Description copied from interface: Client
        Returns true if this cluster supports the given API path or API Group ID
        Specified by:
        supportsApiPath in interface Client
        Parameters:
        path - Path as string
        Returns:
        returns boolean value indicating whether it supports.
      • getApiGroups

        public io.fabric8.kubernetes.api.model.APIGroupList getApiGroups()
        Description copied from interface: Client
        Returns the api groups. This does not include the core/legacy v1 apiVersion.
        Specified by:
        getApiGroups in interface Client
        Returns:
        the APIGroupList metadata
      • getAPIVersions

        public io.fabric8.kubernetes.api.model.APIVersions getAPIVersions()
        Description copied from interface: Client
        Get the available APIversions. 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.
        Specified by:
        getAPIVersions in interface Client
        Returns:
        the APIVersions object
      • getApiGroup

        public io.fabric8.kubernetes.api.model.APIGroup getApiGroup​(String name)
        Description copied from interface: Client
        Return a single api group
        Specified by:
        getApiGroup in interface Client
        Parameters:
        name - of the group
        Returns:
        the APIGroup metadata
      • getApiResources

        public io.fabric8.kubernetes.api.model.APIResourceList getApiResources​(String groupVersion)
        Description copied from interface: Client
        Return the api resource metadata for the given groupVersion

        Use v1 to indicate the core/legacy resources

        Specified by:
        getApiResources in interface Client
        Parameters:
        groupVersion - the groupVersion - group/version
        Returns:
        the APIResourceList for the groupVersion
      • resources

        public <T extends io.fabric8.kubernetes.api.model.HasMetadata,​L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>,​R extends Resource<T>> MixedOperation<T,​L,​R> resources​(Class<T> resourceType,
                                                                                                                                                                                                                         Class<L> listClass,
                                                                                                                                                                                                                         Class<R> resourceClass)
        Description copied from interface: Client
        Typed API for managing resources. Any properly annotated POJO can be utilized as a resource.
        Note: this call is generally for use internally within the DSL, not by end users

        Note: your resource POJO (T in this context) must implement Namespaced if it is a namespace-scoped resource.

        Specified by:
        resources in interface Client
        Type Parameters:
        T - represents resource type. If it's a namespaced resource, it must implement Namespaced
        L - represents resource list type
        R - represents the Resource operation type
        Parameters:
        resourceType - Class for resource
        Returns:
        returns a MixedOperation object with which you can do basic resource operations. If the class is a known type the dsl operation logic will be used.
      • inAnyNamespace

        public C inAnyNamespace()
      • inNamespace

        public C inNamespace​(String namespace)
      • newClient

        public Client newClient​(RequestConfig requestConfig)
        Description copied from interface: Client
        Creates a new client based upon the current except with a different RequestConfig. It uses the same resources as the current client, thus closing it will close the original client.
        Specified by:
        newClient in interface Client
        Returns:
        a new client
      • newInstance

        public abstract C newInstance()
      • raw

        public String raw​(String uri,
                          String method,
                          Object payload)
        Description copied from interface: Client
        The response from the given uri as a String
        Specified by:
        raw in interface Client
        Parameters:
        uri - must start with / if relative
        method - an http method verb such as GET, DELETE, PUT, POST
        payload - a non-String value will be converted to json
        Returns:
        the response