Package io.fabric8.crd.generator.v1beta1
Class CustomResourceHandler
- java.lang.Object
-
- io.fabric8.crd.generator.AbstractCustomResourceHandler
-
- io.fabric8.crd.generator.v1beta1.CustomResourceHandler
-
public class CustomResourceHandler extends AbstractCustomResourceHandler
-
-
Field Summary
-
Fields inherited from class io.fabric8.crd.generator.AbstractCustomResourceHandler
resources
-
-
Constructor Summary
Constructors Constructor Description CustomResourceHandler(Resources resources)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddDecorators(CustomResourceInfo config, io.sundr.codegen.model.TypeDef def, Optional<String> specReplicasPath, Optional<String> statusReplicasPath, Optional<String> labelSelectorPath, boolean statusExists)Adds all the necessary decorators to build the specific CRD version.protected DecoratorgetPrinterColumnDecorator(String name, String version, String path, String type, String column, String description, String format)Provides the decorator implementation associated with the CRD generation version.-
Methods inherited from class io.fabric8.crd.generator.AbstractCustomResourceHandler
handle
-
-
-
-
Constructor Detail
-
CustomResourceHandler
public CustomResourceHandler(Resources resources)
-
-
Method Detail
-
getPrinterColumnDecorator
protected Decorator getPrinterColumnDecorator(String name, String version, String path, String type, String column, String description, String format)
Description copied from class:AbstractCustomResourceHandlerProvides the decorator implementation associated with the CRD generation version.- Specified by:
getPrinterColumnDecoratorin classAbstractCustomResourceHandler- Parameters:
name- the resource nameversion- the associated versionpath- the path from which the printer column is extractedtype- the data type of the printer columncolumn- the name of the columndescription- the description of the columnformat- the format of the printer column- Returns:
- the concrete decorator implementing the addition of a printer column to the currently built CRD
-
addDecorators
protected void addDecorators(CustomResourceInfo config, io.sundr.codegen.model.TypeDef def, Optional<String> specReplicasPath, Optional<String> statusReplicasPath, Optional<String> labelSelectorPath, boolean statusExists)
Description copied from class:AbstractCustomResourceHandlerAdds all the necessary decorators to build the specific CRD version. For optional paths, see https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#customresourcesubresourcescale-v1-apiextensions-k8s-io These paths- Specified by:
addDecoratorsin classAbstractCustomResourceHandler- Parameters:
config- the gatheredCustomResourceInfoused as basis for the CRD generationdef- theTypeDefassociated with theCustomResourcefrom which the CRD is generatedspecReplicasPath- an optionally detected path of field defining spec replicasstatusReplicasPath- an optionally detected path of field defining status replicaslabelSelectorPath- an optionally detected path of field defining `status.selector`statusExists-trueif theCustomResourcefrom which the CRD is generated defines a status field,falseotherwise
-
-