helmrequest

package
v0.9.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CRD = &extensionsobj.CustomResourceDefinition{
	ObjectMeta: metav1.ObjectMeta{
		Name: "helmrequests." + v1alpha1.SchemeGroupVersion.Group,
	},
	TypeMeta: metav1.TypeMeta{
		Kind:       "CustomResourceDefinition",
		APIVersion: "apiextensions.k8s.io/v1beta1",
	},
	Spec: extensionsobj.CustomResourceDefinitionSpec{
		Group:   v1alpha1.SchemeGroupVersion.Group,
		Version: v1alpha1.SchemeGroupVersion.Version,
		Scope:   extensionsobj.ResourceScope("Namespaced"),
		Names: extensionsobj.CustomResourceDefinitionNames{
			Plural:     "helmrequests",
			Singular:   "helmrequest",
			Kind:       "HelmRequest",
			ListKind:   "HelmRequestList",
			ShortNames: []string{"hr"},
			Categories: []string{"all"},
		},
		AdditionalPrinterColumns: []extensionsobj.CustomResourceColumnDefinition{
			{
				Name:     "Chart",
				Type:     "string",
				JSONPath: ".spec.chart",
			},
			{
				Name:     "Version",
				Type:     "string",
				JSONPath: ".spec.version",
			},
			{
				Name:     "Namespace",
				Type:     "string",
				JSONPath: ".spec.namespace",
			},
			{
				Name:     "AllCluster",
				Type:     "boolean",
				JSONPath: ".spec.installToAllClusters",
			},
			{
				Name:     "Age",
				Type:     "date",
				JSONPath: ".metadata.creationTimestamp",
			},
			{
				Name:     "Phase",
				Type:     "string",
				JSONPath: ".status.phase",
			},
		},
		Subresources: &extensionsobj.CustomResourceSubresources{
			Status: &extensionsobj.CustomResourceSubresourceStatus{},
		},
		Validation: &extensionsobj.CustomResourceValidation{
			OpenAPIV3Schema: &extensionsobj.JSONSchemaProps{
				Properties: map[string]extensionsobj.JSONSchemaProps{
					"spec": {
						Required: []string{
							"chart",
						},
					},
				},
			},
		},
	},
}

CRD is the CRD definition for HelmRequest CRD file and example is in $CAPTAIN_ROOT/artifacts/crd/*.yaml

Functions

func EnsureCRDCreated

func EnsureCRDCreated(cfg *rest.Config) (created bool, err error)

EnsureCRDCreated tries to create/update CRD, returns (true, nil) if succeeding, otherwise returns (false, nil). 'err' should always be nil, because it is used by wait.PollUntil(), and it will exit if it is not nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL