Documentation
¶
Index ¶
- Constants
- Variables
- func IsPodInPdMembers(tc *v1alpha1.TidbCluster, pod *core.Pod, pdClient pdapi.PDClient) (bool, error)
- func IsPodWithPDDeferDeletingAnnotations(pod *core.Pod) bool
- type AdmiRequest
- type DBStatus
- type PodAdmissionControl
- func (pc *PodAdmissionControl) AdmitCreatePods(ar *admission.AdmissionRequest) *admission.AdmissionResponse
- func (pc *PodAdmissionControl) AdmitPods(ar *admission.AdmissionRequest) *admission.AdmissionResponse
- func (pc *PodAdmissionControl) MutatePods(ar *admission.AdmissionRequest) *admission.AdmissionResponse
Constants ¶
View Source
const ( // EvictLeaderBeginTime is the key of evict Leader begin time EvictLeaderBeginTime = label.AnnEvictLeaderBeginTime )
View Source
const RoleInstanceLabelKey string = "bcrds.cmss.com/role"
Variables ¶
View Source
var (
AstsControllerServiceAccounts string
)
Functions ¶
func IsPodInPdMembers ¶
func IsPodWithPDDeferDeletingAnnotations ¶
check whether this pod have PD DeferDeleting Annotations
Types ¶
type AdmiRequest ¶
type DBStatus ¶
type DBStatus struct { Cluster string `json:"cluster"` Address string `json:"address"` Type string `json:"type"` Status string `json:"status"` LastPing string `json:"laste_ping"` MaxConn int `json:"max_conn"` IdleConn int `json:"idle_conn"` CacheConn int `json:"cache_conn"` PushConnCount int64 `json:"push_conn_count"` PopConnCount int64 `json:"pop_conn_count"` UsingConnsCount int64 `json:"using_conn_count"` }
type PodAdmissionControl ¶
type PodAdmissionControl struct {
// contains filtered or unexported fields
}
func NewPodAdmissionControl ¶
func NewPodAdmissionControl(kubeCli kubernetes.Interface, operatorCli versioned.Interface, PdControl pdapi.PDControlInterface, extraServiceAccounts []string, recorder record.EventRecorder) *PodAdmissionControl
func (*PodAdmissionControl) AdmitCreatePods ¶
func (pc *PodAdmissionControl) AdmitCreatePods(ar *admission.AdmissionRequest) *admission.AdmissionResponse
Webhook server receive request to create pod if this pod wasn't member of tidbcluster, just let the request pass. Currently we only check with tikv pod
func (*PodAdmissionControl) AdmitPods ¶
func (pc *PodAdmissionControl) AdmitPods(ar *admission.AdmissionRequest) *admission.AdmissionResponse
func (*PodAdmissionControl) MutatePods ¶
func (pc *PodAdmissionControl) MutatePods(ar *admission.AdmissionRequest) *admission.AdmissionResponse
Click to show internal directories.
Click to hide internal directories.