Class CustomResource<S,​T>

    • Field Detail

      • spec

        protected S spec
      • status

        protected T status
    • Constructor Detail

      • CustomResource

        public CustomResource()
    • Method Detail

      • getServed

        public static boolean getServed​(Class<?> clazz)
      • getStorage

        public static boolean getStorage​(Class<?> clazz)
      • getDeprecated

        public static boolean getDeprecated​(Class<?> clazz)
      • getDeprecationWarning

        public static String getDeprecationWarning​(Class<?> clazz)
      • initSpec

        protected S initSpec()
        Override to provide your own Spec instance
        Returns:
        a new Spec instance or null if the responsibility of instantiating the Spec is left to users of this CustomResource
      • initStatus

        protected T initStatus()
        Override to provide your own Status instance
        Returns:
        a new Status instance or null if the responsibility of instantiating the Status is left to users of this CustomResource
      • setKind

        public void setKind​(String kind)
      • getCRDName

        public static String getCRDName​(Class<?> clazz)
        Computes the name of the Custom Resource Definition (CRD) associated with the specified CustomResource. See https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/ for more details.
        Parameters:
        clazz - the CustomResource whose CRD name we want to compute
        Returns:
        the CRD name associated with the CustomResource
      • getCRDName

        public String getCRDName()
      • getShortNames

        public static String[] getShortNames​(Class<?> clazz)
        Retrieves the short names associated with this CustomResource or an empty array if none was provided
        Parameters:
        clazz - the CustomResource class which short names we want to retrieve
        Returns:
        the short names associated with this CustomResource or an empty array if none was provided
      • getCategories

        public static String[] getCategories​(Class<?> clazz)
        Retrieves the categories associated with this CustomResource or an empty array if none was provided
        Parameters:
        clazz - the CustomResource class for which the categories are to be retrieved
        Returns:
        the categories associated with this CustomResource or an empty array if none was provided
      • getScope

        public String getScope()
        Retrieves the scope that this CustomResource targets
        Returns:
        the scope that this CustomResource targets. Possible values are Scope.CLUSTER or Scope.NAMESPACED.
      • getGroup

        public String getGroup()
      • getVersion

        public String getVersion()
      • isServed

        public boolean isServed()
      • isStorage

        public boolean isStorage()
      • isDeprecated

        public boolean isDeprecated()
      • getDeprecationWarning

        public String getDeprecationWarning()
      • getSpec

        public S getSpec()
      • setSpec

        public void setSpec​(S spec)
      • getStatus

        public T getStatus()
      • setStatus

        public void setStatus​(T status)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object