Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NodesTaskCustomResourceDefinition = apiextensionsv1.CustomResourceDefinition{ ObjectMeta: metav1.ObjectMeta{ Name: "nodetasks.nodetask.apps.superedge.io", }, Spec: apiextensionsv1.CustomResourceDefinitionSpec{ Group: v1beta1.SchemeGroupVersion.Group, Names: apiextensionsv1.CustomResourceDefinitionNames{ Kind: "NodeTask", Plural: "nodetasks", ShortNames: []string{"nt"}, }, Versions: []apiextensionsv1.CustomResourceDefinitionVersion{ { Name: "v1beta1", Storage: true, Served: true, Schema: &apiextensionsv1.CustomResourceValidation{ OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{ Type: "object", Properties: map[string]apiextensionsv1.JSONSchemaProps{ "spec": { Type: "object", Properties: map[string]apiextensionsv1.JSONSchemaProps{ "nodeNamePrefix": { Type: "string", Description: "Node name prefix", }, "targetMachines": { Type: "array", Items: &apiextensionsv1.JSONSchemaPropsOrArray{ Schema: &apiextensionsv1.JSONSchemaProps{ Type: "string", Format: "ipv4", }, }, Description: "Install the ip list of the node", }, "nodeNamesOverride": { Type: "object", AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{ Schema: &apiextensionsv1.JSONSchemaProps{ Type: "string", }, }, Description: "Specify the node name and ip mapping", }, "proxyNode": { Type: "string", Description: "The name of the node in the cluster running the add node job", }, "sshCredential": { Type: "string", Description: "The name of the secret that stores the ssh password or private key", }, "sshPort": { Type: "integer", Description: "SSH login port", Default: &apiextensionsv1.JSON{[]byte("22")}, }, }, Required: []string{ "sshCredential", "proxyNode", }, }, "status": { Type: "object", Properties: map[string]apiextensionsv1.JSONSchemaProps{ "nodeStatus": { Type: "object", AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{ Schema: &apiextensionsv1.JSONSchemaProps{ Type: "string", }, }, Description: "Nodes that have not been installed", }, "nodetaskStatus": { Type: "string", Enum: []apiextensionsv1.JSON{ {Raw: []byte(`"creating"`)}, {Raw: []byte(`"ready"`)}, }, Description: "The execution status of nodetask", }, }, }, }, }, }, Subresources: &apiextensionsv1.CustomResourceSubresources{ Status: &apiextensionsv1.CustomResourceSubresourceStatus{}, }, }, }, Scope: apiextensionsv1.ClusterScoped, }, Status: apiextensionsv1.CustomResourceDefinitionStatus{ Conditions: []apiextensionsv1.CustomResourceDefinitionCondition{}, }, } )
Functions ¶
func Install ¶
func Install(ctx *context.NodeTaskContext, client clientset.Interface, crd *apiextensionsv1.CustomResourceDefinition) error
func InstallWithMaxRetry ¶
func InstallWithMaxRetry(ctx *context.NodeTaskContext, client clientset.Interface, crd *apiextensionsv1.CustomResourceDefinition, maxRetry int) error
Create crd when operator starts
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.