flags

package
v0.0.0-...-7a29347 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 5 Imported by: 0

Documentation

Overview

* Copyright 2020-2023 Alibaba Group Holding Limited.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

* Copyright 2020-2023 Alibaba Group Holding Limited.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

* Copyright 2020-2023 Alibaba Group Holding Limited.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

* Copyright 2020-2023 Alibaba Group Holding Limited.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

* Copyright 2020-2023 Alibaba Group Holding Limited.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

* Copyright 2020-2023 Alibaba Group Holding Limited.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

* Copyright 2020-2023 Alibaba Group Holding Limited.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

* Copyright 2020-2023 Alibaba Group Holding Limited.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

* Copyright 2020-2023 Alibaba Group Holding Limited.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

* Copyright 2020-2023 Alibaba Group Holding Limited.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

* Copyright 2020-2023 Alibaba Group Holding Limited.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

* Copyright 2020-2023 Alibaba Group Holding Limited.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

* Copyright 2020-2023 Alibaba Group Holding Limited.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var (
	// BackupName is the name of backup job
	BackupName string

	// BackupOpts holds all configuration of backup Spec
	BackupOpts v1alpha1.BackupSpec

	// BackupPVandPVC is the string of PersistentVolume data and
	// PersistentVolumeClaim data
	BackupPVandPVC string

	// PVCName is the name of PersistentVolumeClaim
	PVCName string

	// VineyardDeploymentName is the name of vineyard deployment
	VineyardDeploymentName string

	// VineyardDeploymentNamespace is the namespace of vineyard deployment
	VineyardDeploymentNamespace string
)
View Source
var (
	// IPCSocket represents the vineyard IPC socket path
	IPCSocket string

	// RPCSocket represents the vineyard RPC socket path
	RPCSocket string

	// DeploymentName is the name of vineyard deployment
	DeploymentName string

	// Port represents the port of vineyard deployment
	Port int

	// ForwardPort is the forward port of vineyard deployment
	ForwardPort int
)

connect options

View Source
var (
	// The object id to get
	Object_id string

	// If the target object is a remote object, code_remote=True will force a meta synchronization on the vineyard server.
	SyncRemote bool

	// unsafe means getting the blob even the blob is not sealed yet. Default is False.
	Unsafe bool
)

get options

View Source
var (
	// Pattern string that will be matched against the object’s typenames
	Pattern string

	// Regex represents whether the pattern string will be considered as a regex expression
	Regex bool

	// Limit represents the maximum number of objects to return
	Limit int

	// SortedKey represents the key to sort the objects
	SortedKey string
)

ls options

View Source
var (
	// Endpoint is the endpoint of vineyard csi driver
	Endpoint string

	// NodeID is the node id of vineyard csi driver
	NodeID string

	// StateFilePath is the path of state file
	StateFilePath string
)
View Source
var (
	// CSIDriverOpts holds all configuration of CSIDriver Spec
	CSIDriverOpts v1alpha1.CSIDriverSpec

	// CSIDriverName is the name of the csi driver cr
	CSIDriverName string

	// VineyardClusters contains all the vineyard clusters
	VineyardClusters []string
)
View Source
var (
	// kubeconfig path
	KubeConfig string

	// Namespace for operation
	Namespace string

	// Wait indicates whether to wait for the kubernetes resource to be ready
	Wait bool

	// CreateNamespace indicates whether to create the namespace if it does not exist
	CreateNamespace bool

	// DeleteNamespace indicates whether to delete the namespace
	DeleteNamespace bool

	// DumpUsage
	DumpUsage bool

	// Verbose indicates whether to print verbose log
	Verbose bool

	GenDoc bool
)
View Source
var (
	// ArgoWorkflowFile is the name of argo workflow file
	ArgoWorkflowFile string

	// TemplateName is the name of workflow template which will be injected
	// with vineyard volumes
	WorkflowTemplates []string

	// MountPath is the mount path of vineyard volumes
	MountPath string

	// VineyardCluster is the name of vineyard cluster which the argo workflow
	// will use
	VineyardCluster string

	// Dag is the name of dag which will be injected with vineyard volumes
	Dag string

	// Tasks contains the set of task names under the dag
	Tasks []string

	// OutputAsFile means whether to output the injected workflow as a file
	OutputAsFile bool
)
View Source
var (
	// SidecarName is the name of sidecar
	// it is also the label selector value of sidecar
	SidecarName string

	// WorkloadYaml is the yaml of workload
	WorkloadYaml string

	// WorkloadResource is the resource of workload
	WorkloadResource string

	// OutputFormat is the output format of the command
	OutputFormat string

	// ApplyResources means whether to apply the resources
	// including the etcd cluster and the rpc service
	ApplyResources bool

	// OwnerReference is the owner reference of the workload
	OwnerReference string

	// SidecarOpts holds all configuration of sidecar Spec
	SidecarOpts v1alpha1.SidecarSpec
)
View Source
var (
	// MetricsAddr is the TCP address that the controller should bind to
	// for serving prometheus metrics.
	MetricsAddr string

	// ProbeAddr is the TCP address that the controller should bind to
	// for serving health probes.
	ProbeAddr string

	// EnableLeaderElection for controller manager.
	// Enabling this will ensure there is only one active controller manager.
	EnableLeaderElection bool

	// EnableWebhook will enable webhook for controller manager.
	EnableWebhook bool

	// EnableScheduler will enable scheduler for controller manager.
	EnableScheduler bool

	// SchedulerConfigFile is the location of scheduler plugin's configuration file.
	SchedulerConfigFile string

	// WebhookCertDir is the directory to store the generated certificates.
	WebhookCertDir string
)
View Source
var (
	// OperationOpts holds all configuration of operation Spec
	OperationOpts v1alpha1.OperationSpec

	// OperationName is the name of operation
	OperationName string
)
View Source
var (
	// RecoverName is the name of recover job
	RecoverName string

	// RecoverPath is the path of recover job
	RecoverPath string
)
View Source
var (
	// WorkflowFile is the path of workflow file
	WorkflowFile string

	// WithoutCRD is the flag to indicate whether the CRD is installed
	WithoutCRD bool
)
View Source
var (
	// Resource is the json string of kubernetes workload
	Resource string

	// the namespace of vineyard cluster
	VineyarddNamespace string

	// the output format for vineyardctl schedule workload command
	ScheduleOutputFormat string

	// the file path of workload
	WorkloadFile string
)
View Source
var (
	// DefaultVineyardSocket is the default vineyard socket path
	DefaultVineyardSocket = "/var/run/vineyard-kubernetes/{{.Namespace}}/{{.Name}}"

	// VineyarddName is the name of vineyardd
	VineyarddName string

	// VineyardSecurityContext is the json string of security context of vineyardd
	VineyardSecurityContext string

	// VineyarddOpts holds all configuration of vineyardd Spec
	VineyarddOpts v1alpha1.VineyarddSpec

	// VineyardContainerEnvs holds all the environment variables for the vineyardd container
	VineyardContainerEnvs []string

	// VineyardSpillPVAndPVC is PersistentVolume data and PersistentVolumeClaim data of vineyardd's spill mechanism
	VineyardSpillPVandPVC string

	// VineyardFile is the path of vineyardd file
	VineyarddFile string

	// The following variables are used for the vineyard client
	// VineyardIPCSocket is the path of vineyardd IPC socket
	VineyardIPCSocket string

	// VineyardRPCSocket is the path of vineyardd RPC socket
	VineyardRPCSocket string

	// VineyardVolume is the json string of vineyardd volume
	VineyardVolume string

	// VineyardVolumeMount is the json string of vineyardd volume mount
	VineyardVolumeMount string

	// NamespacedVineyardDeployment is the namespaced name of vineyard deployment
	NamespacedVineyardDeployment string
)
View Source
var (
	// Format represents the output format, support table or json, default is table
	Format string
)

output options

View Source
var (
	// The value to put
	Value string
)

put options

Functions

func ApplyBackupCommonOpts

func ApplyBackupCommonOpts(cmd *cobra.Command)

func ApplyBackupNameOpts

func ApplyBackupNameOpts(cmd *cobra.Command)

func ApplyCSIDriverClustersOpts

func ApplyCSIDriverClustersOpts(cmd *cobra.Command)

func ApplyCSIDriverNameOpts

func ApplyCSIDriverNameOpts(cmd *cobra.Command)

func ApplyCSIDriverOpts

func ApplyCSIDriverOpts(cmd *cobra.Command)

func ApplyCSIDriverSidecarOpts

func ApplyCSIDriverSidecarOpts(cmd *cobra.Command)

func ApplyConnectOpts

func ApplyConnectOpts(cmd *cobra.Command)

ApplyConnectOpts applies the connect options

func ApplyCreateBackupOpts

func ApplyCreateBackupOpts(cmd *cobra.Command)

func ApplyCreateRecoverOpts

func ApplyCreateRecoverOpts(cmd *cobra.Command)

func ApplyCsiOpts

func ApplyCsiOpts(cmd *cobra.Command)

func ApplyDeployBackupJobOpts

func ApplyDeployBackupJobOpts(cmd *cobra.Command)

func ApplyDeployRecoverJobOpts

func ApplyDeployRecoverJobOpts(cmd *cobra.Command)

func ApplyGetOpts

func ApplyGetOpts(cmd *cobra.Command)

func ApplyGlobalFlags

func ApplyGlobalFlags(cmd *cobra.Command)

func ApplyInjectArgoWorkflowOpts

func ApplyInjectArgoWorkflowOpts(cmd *cobra.Command)

func ApplyLimitOpt

func ApplyLimitOpt(cmd *cobra.Command)

func ApplyLsOpts

func ApplyLsOpts(cmd *cobra.Command)

func ApplyManagersOpts

func ApplyManagersOpts(cmd *cobra.Command)

func ApplyMetricContainerOpts

func ApplyMetricContainerOpts(m *v1alpha1.MetricConfig,
	prefix string, cmd *cobra.Command,
)

ApplyMetricContainerOpts represents the option of metric container configuration

func ApplyOperationName

func ApplyOperationName(cmd *cobra.Command)

func ApplyOperationOpts

func ApplyOperationOpts(cmd *cobra.Command)

func ApplyOutputOpts

func ApplyOutputOpts(cmd *cobra.Command)

ApplyOutputOpts applies the output options

func ApplyPluginImageOpts

func ApplyPluginImageOpts(cmd *cobra.Command)

ApplyPluginImageOpts represents the option of plugin image configuration

func ApplyPutOpts

func ApplyPutOpts(cmd *cobra.Command)

func ApplyRecoverNameOpts

func ApplyRecoverNameOpts(cmd *cobra.Command)

func ApplySchedulerWorkflowOpts

func ApplySchedulerWorkflowOpts(cmd *cobra.Command)

func ApplySchedulerWorkloadOpts

func ApplySchedulerWorkloadOpts(cmd *cobra.Command)

func ApplyServiceOpts

func ApplyServiceOpts(s *v1alpha1.ServiceConfig, prefix string, cmd *cobra.Command)

ApplyServiceOpts represents the option of service

func ApplySidecarOpts

func ApplySidecarOpts(cmd *cobra.Command)

func ApplyVineyardContainerOpts

func ApplyVineyardContainerOpts(c *v1alpha1.VineyardConfig,
	prefix string, cmd *cobra.Command,
)

ApplyVineyardContainerOpts applies the vineyard container options

func ApplyVineyardVolumeAndVolumeMountOpts

func ApplyVineyardVolumeAndVolumeMountOpts(cmd *cobra.Command)

ApplyVineyardVolumeAndVolumeMountOpts represents the option of vineyardd volume and volume mount

func ApplyVineyarddNameOpts

func ApplyVineyarddNameOpts(cmd *cobra.Command)

ApplyVineyarddNameOpts represents the option of vineyardd name

func ApplyVineyarddOpts

func ApplyVineyarddOpts(cmd *cobra.Command)

ApplyVineyarddOpts represents the option of vineyardd configuration

func ApplyVineyarddPrivilegedOpts

func ApplyVineyarddPrivilegedOpts(cmd *cobra.Command)

ApplyVineyarddSecurityContextOpts represents the option of vineyard security context

func ApplyVolumeOpts

func ApplyVolumeOpts(v *v1alpha1.VolumeConfig, prefix string, cmd *cobra.Command)

ApplyVolumeOpts represents the option of pvc volume configuration

func GetDefaultVineyardNamespace

func GetDefaultVineyardNamespace() string

GetDefaultVineyardNamespace return the default vineyard namespace

func GetIPCSocket

func GetIPCSocket() string

GetIPCSocket returns the vineyard IPC socket path

func GetRPCSocket

func GetRPCSocket() string

GetRPCSocket returns the vineyard RPC socket path

func RemoveVersionFlag

func RemoveVersionFlag(f *pflag.FlagSet)

func RestoreVersionFlag

func RestoreVersionFlag(f *pflag.FlagSet)

Types

type VolumeConfig

type VolumeConfig struct {
	Volumes      []corev1.Volume      `yaml:"volumes"`
	VolumeMounts []corev1.VolumeMount `yaml:"volumeMounts"`
}

Jump to

Keyboard shortcuts

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