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", }, Properties: map[string]extensionsobj.JSONSchemaProps{ "values": { Type: "object", Nullable: true, }, }, }, }, }, }, }, }
CRD is the CRD definition for HelmRequest CRD file and example is in $CAPTAIN_ROOT/artifacts/crd/*.yaml
Functions ¶
func EnsureCRDCreated ¶
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.
Click to show internal directories.
Click to hide internal directories.