types

package
v0.5.2-beta.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CliDefaultHome defines kbcli default home name
	CliDefaultHome = ".kbcli"
	// CliHomeEnv defines kbcli home system env
	CliHomeEnv = "KBCLI_HOME"

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

	// 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"
	ResourceClusters                    = "clusters"
	ResourceClusterDefs                 = "clusterdefinitions"
	ResourceClusterVersions             = "clusterversions"
	ResourceOpsRequests                 = "opsrequests"
	ResourceConfigConstraintVersions    = "configconstraints"
	ResourceComponentResourceConstraint = "componentresourceconstraints"
	ResourceComponentClassDefinition    = "componentclassdefinitions"
	KindCluster                         = "Cluster"
	KindComponentClassDefinition        = "ComponentClassDefinition"
	KindClusterDef                      = "ClusterDefinition"
	KindClusterVersion                  = "ClusterVersion"
	KindConfigConstraint                = "ConfigConstraint"
	KindBackup                          = "Backup"
	KindRestoreJob                      = "RestoreJob"
	KindBackupPolicy                    = "BackupPolicy"
	KindOps                             = "OpsRequest"
)

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"

	ClassProviderLabelKey              = "class.kubeblocks.io/provider"
	ResourceConstraintProviderLabelKey = "resourceconstraint.kubeblocks.io/provider"
	ReloadConfigMapAnnotationKey       = "kubeblocks.io/reload-configmap" // mark an annotation to load configmap
)

Annotations

View Source
const (
	DPAPIGroup             = "dataprotection.kubeblocks.io"
	DPAPIVersion           = "v1alpha1"
	ResourceBackups        = "backups"
	ResourceBackupTools    = "backuptools"
	ResourceRestoreJobs    = "restorejobs"
	ResourceBackupPolicies = "backuppolicies"
)

DataProtection API group

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

Extensions 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 (
	None = "<none>"

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

Variables

View Source
var (
	// KubeBlocksName is the name of KubeBlocks project
	KubeBlocksName = "kubeblocks"

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

	// InstanceLabelSelector app.kubernetes.io/instance=kubeblocks, hit most workloads and configuration
	InstanceLabelSelector = fmt.Sprintf("%s=%s", constant.AppInstanceLabelKey, KubeBlocksChartName)

	// ReleaseLabelSelector release=kubeblocks, for prometheus-alertmanager and prometheus-server
	ReleaseLabelSelector = fmt.Sprintf("release=%s", KubeBlocksChartName)

	// KubeBlocksHelmLabel name=kubeblocks,owner-helm, for helm secret
	KubeBlocksHelmLabel = fmt.Sprintf("%s=%s,%s=%s", "name", KubeBlocksChartName, "owner", "helm")
)
View Source
var (
	// K3dClusterName is the k3d cluster name for playground
	K3dClusterName = "kb-playground"
)

Playground

Functions

func AddonGVR

func AddonGVR() schema.GroupVersionResource

func BackupGVR

func BackupGVR() schema.GroupVersionResource

func BackupPolicyGVR

func BackupPolicyGVR() schema.GroupVersionResource

func BackupToolGVR

func BackupToolGVR() 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 ComponentClassDefinitionGVR

func ComponentClassDefinitionGVR() schema.GroupVersionResource

func ComponentResourceConstraintGVR

func ComponentResourceConstraintGVR() schema.GroupVersionResource

func ConfigConstraintGVR

func ConfigConstraintGVR() schema.GroupVersionResource

func ConfigmapGVR

func ConfigmapGVR() 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 OpsGVR

func PVCGVR

func PVGVR

func RestoreJobGVR

func RestoreJobGVR() 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 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
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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