Package crd handles the creation and updating of our CRDs in the cluster



    This section is empty.


    This section is empty.


    func ApplyCRD

    func ApplyCRD(ctx context.Context, client extv1client.ApiextensionsV1beta1Interface, crdName, kind, plural string, shortNames []string, groupVersion schema.GroupVersion, validation *extv1.CustomResourceValidation) error

      ApplyCRD creates or updates the CRD - old func for compatibility

      func WaitForCRDReady

      func WaitForCRDReady(ctx context.Context, client extv1client.ApiextensionsV1beta1Interface, crdName string) error

        WaitForCRDReady blocks until the CRD is ready.


        type Builder

        type Builder struct {
        	CRD *extv1.CustomResourceDefinition
        	// contains filtered or unexported fields

          Builder builds CRDs

          func New

          func New(
          	crdName string,
          	names extv1.CustomResourceDefinitionNames,
          	groupVersion schema.GroupVersion,
          ) *Builder

            New returns a new CRD builder

            func (*Builder) Apply

              Apply CRD to cluster

              func (*Builder) Build

              func (b *Builder) Build() *Builder

                Build the CRD

                func (*Builder) WithAdditionalPrinterColumns

                func (b *Builder) WithAdditionalPrinterColumns(cols []extv1.CustomResourceColumnDefinition) *Builder

                  WithAdditionalPrinterColumns add additional printer columns to the kubectl output

                  func (*Builder) WithValidation

                  func (b *Builder) WithValidation(validation *extv1.CustomResourceValidation) *Builder

                    WithValidation add validation struct to the CRDs field

                    Source Files