types

package
v1.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: AGPL-3.0 Imports: 8 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"
	OpsAPIGroup                      = "operations.kubeblocks.io"
	WorkloadsAPIGroup                = "workloads.kubeblocks.io"
	WorkloadsAPIVersion              = "v1"
	OpsAPIVersion                    = "v1alpha1"
	AppsAPIVersion                   = "v1alpha1"
	AppsV1APIVersion                 = "v1"
	AppsAPIBetaVersion               = "v1beta1"
	ResourcePods                     = "pods"
	ResourceClusters                 = "clusters"
	ResourceClusterDefs              = "clusterdefinitions"
	ResourceComponentDefs            = "componentdefinitions"
	ResourceComponentVersions        = "componentversions"
	ResourceComponents               = "components"
	ResourceOpsRequests              = "opsrequests"
	ResourceInstanceSets             = "instancesets"
	ResourceOpsDefinitions           = "opsdefinitions"
	ResourceConfigConstraintVersions = "configconstraints"
	ResourceConfigurationVersions    = "configurations"
	KindCluster                      = "Cluster"
	KindClusterDef                   = "ClusterDefinition"
	KindConfigConstraint             = "ConfigConstraint"
	KindConfiguration                = "Configuration"
	KindBackup                       = "Backup"
	KindRestore                      = "Restore"
	KindBackupPolicy                 = "BackupPolicy"
	KindOps                          = "OpsRequest"
	KindBackupSchedule               = "BackupSchedule"
	KindBackupPolicyTemplate         = "BackupPolicyTemplate"
	KindStatefulSet                  = "StatefulSet"
	KindDeployment                   = "Deployment"
	KindConfigMap                    = "ConfigMap"
	KindCronJob                      = "CronJob"
)

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 (
	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"
	AddonModelLabelKey   = "addon.kubeblocks.io/model"
)

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 (
	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"
	ResourceTpcds       = "tpcds"
	ResourceRedisBench  = "redisbenches"
)

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 (
	// KBAddonProviderLabelKey marks the addon provider
	KBAddonProviderLabelKey = "kubeblocks.io/provider"
)

Migrate some const from kubeblocks to kbcli

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")

	// ClusterChartsRepoName helm chart repo for installing cluster chart
	ClusterChartsRepoName = "kubeblocks-addons"

	// ClusterChartsRepoURL the default helm chart repo for installing cluster chart
	ClusterChartsRepoURL = "https://jihulab.com/api/v4/projects/150246/packages/helm/stable"
)
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 CompDefGVR added in v0.7.2

func CompDefGVR() schema.GroupVersionResource

func ComponentGVR added in v0.7.3

func ComponentGVR() schema.GroupVersionResource

func ComponentVersionsGVR

func ComponentVersionsGVR() schema.GroupVersionResource

func ConfigConstraintGVR

func ConfigConstraintGVR() schema.GroupVersionResource

func ConfigConstraintOldGVR added in v0.9.0

func ConfigConstraintOldGVR() 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 InstanceSetGVR

func InstanceSetGVR() schema.GroupVersionResource

func JobGVR

func LegacyStorageProviderGVR added in v0.9.0

func LegacyStorageProviderGVR() 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 PodGVR

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 ValidatingWebhookConfigurationGVR

func ValidatingWebhookConfigurationGVR() schema.GroupVersionResource

func VolumeSnapshotClassGVR

func VolumeSnapshotClassGVR() schema.GroupVersionResource

Types

type ConfigTemplateInfo

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

Jump to

Keyboard shortcuts

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