types

package
v0.8.0-beta.50 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CfgKeyClusterDefaultStorageSize = "CLUSTER_DEFAULT_STORAGE_SIZE"
	CfgKeyClusterDefaultReplicas    = "CLUSTER_DEFAULT_REPLICAS"
	CfgKeyClusterDefaultCPU         = "CLUSTER_DEFAULT_CPU"
	CfgKeyClusterDefaultMemory      = "CLUSTER_DEFAULT_MEMORY"
	CfgKeyHelmRepoURL               = "HELM_REPO_URL"
	CfgKeyImageRegistry             = "IMAGE_REGISTRY"
)

config keys

View Source
const (
	// CliDefaultHome defines kbcli default home name
	CliDefaultHome = ".kbcli"

	// CliClusterTypeConfigs defines kbcli cluster-type config file name
	CliClusterTypeConfigs = "cluster_types"

	//	CliChartsCache defines kbcli charts cache dir name
	CliChartsCache = "charts"

	// CliLogDir defines kbcli log dir name
	CliLogDir = "logs"

	// CliHomeEnv defines kbcli home system env
	CliHomeEnv = "KBCLI_HOME"

	// DefaultLogFilePrefix is the default log file prefix
	DefaultLogFilePrefix = "kbcli"

	// AddonIndexDirEnv defines kbcli addon index dir
	AddonIndexDirEnv = "KBCLI_ADDON_INDEX_DIR"

	// DefaultIndexName defines the kbcli addon default index name
	DefaultIndexName = "kubeblocks"

	// DefaultNamespace is the namespace where kubeblocks is installed if
	// no other namespace is specified
	DefaultNamespace = "kb-system"

	// GoosLinux is os.GOOS linux string
	GoosLinux = "linux"
	// GoosDarwin is os.GOOS darwin string
	GoosDarwin = "darwin"
	// GoosWindows is os.GOOS windows string
	GoosWindows = "windows"
)
View Source
const (
	K8sCoreAPIVersion    = "v1"
	ResourceDeployments  = "deployments"
	ResourceConfigmaps   = "configmaps"
	ResourceStatefulSets = "statefulsets"
	ResourceDaemonSets   = "daemonsets"
	ResourceSecrets      = "secrets"
)

K8s core API group

View Source
const (
	K8SBatchAPIGroup   = batchv1.GroupName
	K8sBatchAPIVersion = "v1"
	ResourceJobs       = "jobs"
	ResourceCronJobs   = "cronjobs"
)

K8s batch API group

View Source
const (
	WebhookAPIGroup                         = "admissionregistration.k8s.io"
	K8sWebhookAPIVersion                    = "v1"
	ResourceValidatingWebhookConfigurations = "validatingwebhookconfigurations"
	ResourceMutatingWebhookConfigurations   = "mutatingwebhookconfigurations"
)

K8s webhook API group

View Source
const (
	AppsAPIGroup                        = "apps.kubeblocks.io"
	AppsAPIVersion                      = "v1alpha1"
	ResourcePods                        = "pods"
	ResourceClusters                    = "clusters"
	ResourceClusterDefs                 = "clusterdefinitions"
	ResourceClusterVersions             = "clusterversions"
	ResourceComponentDefs               = "componentdefinitions"
	ResourceComponents                  = "components"
	ResourceOpsRequests                 = "opsrequests"
	ResourceOpsDefinitions              = "opsdefinitions"
	ResourceConfigConstraintVersions    = "configconstraints"
	ResourceConfigurationVersions       = "configurations"
	ResourceComponentResourceConstraint = "componentresourceconstraints"
	ResourceComponentClassDefinition    = "componentclassdefinitions"
	KindCluster                         = "Cluster"
	KindComponentClassDefinition        = "ComponentClassDefinition"
	KindClusterDef                      = "ClusterDefinition"
	KindClusterVersion                  = "ClusterVersion"
	KindConfigConstraint                = "ConfigConstraint"
	KindBackup                          = "Backup"
	KindRestore                         = "Restore"
	KindBackupPolicy                    = "BackupPolicy"
	KindOps                             = "OpsRequest"
	KindBackupSchedule                  = "BackupSchedule"
	KindBackupPolicyTemplate            = "BackupPolicyTemplate"
	KindStatefulSet                     = "StatefulSet"
	KindDeployment                      = "Deployment"
	KindRSM                             = "ReplicatedStateMachine"
	KindConfigMap                       = "ConfigMap"
)

Apps API group

View Source
const (
	RBACAPIGroup        = rbacv1.GroupName
	RBACAPIVersion      = "v1"
	ClusterRoles        = "clusterroles"
	ClusterRoleBindings = "clusterrolebindings"
	Roles               = "roles"
	RoleBindings        = "rolebindings"
	ServiceAccounts     = "serviceaccounts"
)

K8S rbac API group

View Source
const (
	ServiceHAVIPTypeAnnotationKey   = "service.kubernetes.io/kubeblocks-havip-type"
	ServiceHAVIPTypeAnnotationValue = "private-ip"
	ServiceFloatingIPAnnotationKey  = "service.kubernetes.io/kubeblocks-havip-floating-ip"

	ReloadConfigMapAnnotationKey = "kubeblocks.io/reload-configmap" // mark an annotation to load configmap

	KBVersionValidateAnnotationKey = "addon.kubeblocks.io/kubeblocks-version"
)

Annotations

View Source
const (
	ClassProviderLabelKey = "class.kubeblocks.io/provider"

	AddonProviderLabelKey = "addon.kubeblocks.io/provider"
	// ProviderLabelKey was used as the label for addon providers before version 0.8.0
	ProviderLabelKey     = "kubeblocks.io/provider"
	AddonVersionLabelKey = "addon.kubeblocks.io/version"
	AddonNameLabelKey    = "addon.kubeblocks.io/name"
)

Labels

View Source
const (
	DPAPIGroup              = "dataprotection.kubeblocks.io"
	DPAPIVersion            = "v1alpha1"
	ResourceBackups         = "backups"
	ResourceActionSets      = "actionsets"
	ResourceRestores        = "restores"
	ResourceBackupPolicies  = "backuppolicies"
	ResourceBackupRepos     = "backuprepos"
	ResourceBackupSchedules = "backupschedules"
	ResourceBackupTemplates = "backuppolicytemplates"
)

DataProtection API group

View Source
const (
	ExtensionsAPIGroup   = "extensions.kubeblocks.io"
	ExtensionsAPIVersion = "v1alpha1"
	ResourceAddons       = "addons"
)

Extensions API group

View Source
const (
	StorageAPIGroup          = "storage.kubeblocks.io"
	StorageAPIVersion        = "v1alpha1"
	ResourceStorageProviders = "storageproviders"
)

Storage API group

View Source
const (
	MigrationAPIGroup          = "datamigration.apecloud.io"
	MigrationAPIVersion        = "v1alpha1"
	ResourceMigrationTasks     = "migrationtasks"
	ResourceMigrationTemplates = "migrationtemplates"
)

Migration API group

View Source
const (
	CustomResourceDefinitionAPIGroup   = "apiextensions.k8s.io"
	CustomResourceDefinitionAPIVersion = "v1"
	ResourceCustomResourceDefinition   = "customresourcedefinitions"
)

Crd Api group

View Source
const (
	KubebenchAPIGroup   = "benchmark.apecloud.io"
	KubebenchAPIVersion = "v1alpha1"
	ResourcePgBench     = "pgbenches"
	ResourceSysBench    = "sysbenches"
	ResourceYcsb        = "ycsbs"
	ResourceTpcc        = "tpccs"
	ResourceTpch        = "tpches"
)

Kubebench API group

View Source
const (
	None = "<none>"

	// AddonReleasePrefix is the prefix of addon release name
	AddonReleasePrefix = "kb-addon"

	// AddonResourceNamePrefix is the prefix for the names of all K8s resources rendered by the addon.
	AddonResourceNamePrefix = "resourceNamePrefix"
	// ImageRegistryKey is the image registry key in KB resource helm chart values.yaml
	ImageRegistryKey = "image.registry"
)
View Source
const (
	ResourceRSM = "replicatedstatemachines"
)

Workload API group

Variables

View Source
var (
	// KubeBlocksRepoName helm repo name for kubeblocks
	KubeBlocksRepoName = "kubeblocks"

	// KubeBlocksChartName helm chart name for kubeblocks
	KubeBlocksChartName = "kubeblocks"

	// KubeBlocksReleaseName helm release name for kubeblocks
	KubeBlocksReleaseName = "kubeblocks"

	// KubeBlocksChartURL the helm chart repo for installing kubeblocks
	KubeBlocksChartURL = "https://apecloud.github.io/helm-charts"

	// GitLabHelmChartRepo the helm chart repo in GitLab
	GitLabHelmChartRepo = "https://jihulab.com/api/v4/projects/85949/packages/helm/stable"

	// KubeBlocksHelmLabel name=kubeblocks,owner-helm, for helm secret
	KubeBlocksHelmLabel = fmt.Sprintf("%s=%s,%s=%s", "name", KubeBlocksChartName, "owner", "helm")

	// KubeBlocksManagerConfigMapName the kubeblocks manager configMap name
	KubeBlocksManagerConfigMapName = fmt.Sprintf("%s-manager-config", KubeBlocksChartName)

	// DefaultAddonIndexURL points to the upstream index.
	DefaultAddonIndexURL = "https://github.com/apecloud/block-index.git"

	// AddonIndexDir is the default addon index dir
	AddonIndexDir = filepath.Join("addon", "index")
)
View Source
var (
	// K3dClusterName is the k3d cluster name for playground
	K3dClusterName = "kb-playground"
)

Playground

Functions

func ActionSetGVR

func ActionSetGVR() schema.GroupVersionResource

func AddonGVR

func AddonGVR() schema.GroupVersionResource

func BackupGVR

func BackupGVR() schema.GroupVersionResource

func BackupPolicyGVR

func BackupPolicyGVR() schema.GroupVersionResource

func BackupPolicyTemplateGVR

func BackupPolicyTemplateGVR() schema.GroupVersionResource

func BackupRepoGVR

func BackupRepoGVR() schema.GroupVersionResource

func BackupScheduleGVR

func BackupScheduleGVR() schema.GroupVersionResource

func CRDGVR

func ClusterDefGVR

func ClusterDefGVR() schema.GroupVersionResource

func ClusterGVR

func ClusterGVR() schema.GroupVersionResource

func ClusterRoleBindingGVR

func ClusterRoleBindingGVR() schema.GroupVersionResource

func ClusterRoleGVR

func ClusterRoleGVR() schema.GroupVersionResource

func ClusterVersionGVR

func ClusterVersionGVR() schema.GroupVersionResource

func CompDefGVR added in v0.7.2

func CompDefGVR() schema.GroupVersionResource

func ComponentClassDefinitionGVR

func ComponentClassDefinitionGVR() schema.GroupVersionResource

func ComponentGVR added in v0.7.3

func ComponentGVR() schema.GroupVersionResource

func ComponentResourceConstraintGVR

func ComponentResourceConstraintGVR() schema.GroupVersionResource

func ConfigConstraintGVR

func ConfigConstraintGVR() schema.GroupVersionResource

func ConfigmapGVR

func ConfigmapGVR() schema.GroupVersionResource

func ConfigurationGVR added in v0.7.2

func ConfigurationGVR() schema.GroupVersionResource

func CronJobGVR

func CronJobGVR() schema.GroupVersionResource

func CustomResourceDefinitionGVR

func CustomResourceDefinitionGVR() schema.GroupVersionResource

func DaemonSetGVR

func DaemonSetGVR() schema.GroupVersionResource

func DeployGVR

func DeployGVR() schema.GroupVersionResource

func JobGVR

func MigrationTaskGVR

func MigrationTaskGVR() schema.GroupVersionResource

func MigrationTemplateGVR

func MigrationTemplateGVR() schema.GroupVersionResource

func MutatingWebhookConfigurationGVR

func MutatingWebhookConfigurationGVR() schema.GroupVersionResource

func OpsDefinitionGVR added in v0.7.2

func OpsDefinitionGVR() schema.GroupVersionResource

func OpsGVR

func PVCGVR

func PVGVR

func PgBenchGVR

func PgBenchGVR() schema.GroupVersionResource

func PodGVR

func RSMGVR

func RestoreGVR

func RestoreGVR() schema.GroupVersionResource

func RoleBindingGVR

func RoleBindingGVR() schema.GroupVersionResource

func RoleGVR

func RoleGVR() schema.GroupVersionResource

func SecretGVR

func SecretGVR() schema.GroupVersionResource

func ServiceAccountGVR

func ServiceAccountGVR() schema.GroupVersionResource

func ServiceGVR

func ServiceGVR() schema.GroupVersionResource

func StatefulSetGVR

func StatefulSetGVR() schema.GroupVersionResource

func StorageClassGVR

func StorageClassGVR() schema.GroupVersionResource

func StorageProviderGVR

func StorageProviderGVR() schema.GroupVersionResource

func SysbenchGVR

func SysbenchGVR() schema.GroupVersionResource

func TpccGVR

func TpccGVR() schema.GroupVersionResource

func TpchGVR

func TpchGVR() schema.GroupVersionResource

func ValidatingWebhookConfigurationGVR

func ValidatingWebhookConfigurationGVR() schema.GroupVersionResource

func VolumeSnapshotClassGVR

func VolumeSnapshotClassGVR() schema.GroupVersionResource

func YcsbGVR

func YcsbGVR() schema.GroupVersionResource

Types

type ConfigTemplateInfo

type ConfigTemplateInfo struct {
	Name  string
	TPL   appsv1alpha1.ComponentConfigSpec
	CMObj *corev1.ConfigMap
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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