Documentation
¶
Overview ¶
* Tencent is pleased to support the open source community by making TKEStack * available. * * Copyright (C) 2012-2019 Tencent. All Rights Reserved. * * 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 * * https://opensource.org/licenses/Apache-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 OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License.
* Tencent is pleased to support the open source community by making TKEStack * available. * * Copyright (C) 2012-2019 Tencent. All Rights Reserved. * * 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 * * https://opensource.org/licenses/Apache-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 OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
const ( ComponentApiserver = "kube-apiserver" ComponentScheduler = "kube-scheduler" ComponentControllerManager = "kube-controller-manager" ComponentETCD = "etcd" ComponentKubeProxy = "kube-proxy" ComponentCoreDNS = "coredns" ComponentKubeDNS = "kube-dns" ComponentKubelet = "kubelet" ComponentDockerd = "dockerd" ComponentContainerd = "containerd" )
core components of cluster
Variables ¶
var Factories = map[string]Factory{}
Factories store all registered Cluster Creator
Functions ¶
Types ¶
type Cluster ¶
type Cluster interface { // Complete check and complete config items Complete() error // Init do Initialization for cluster, and fetching Resources Init(ctx context.Context, progress *plugins.Progress) error // CloudType return the cloud type of Cluster CloudType() string // Resources just return fetched resources Resources() *Resources // Finish will be called once diagnostic done Finish() error }
Cluster is the abstract of target cluster plugins can get Resources from Cluster
type Component ¶
type Component struct { // Name is the full name of the component Name string // Node is the node name that this component run at Node string // Args is the command line of the component Args map[string]string // IsRunning is true if Component run normally IsRunning bool // Error if not nil if fetching this Component failed Error error // Pod is not nil if this Component run as pod Pod *corev1.Pod }
Component is the com�mon data of a component like kube-apiserver, etcd, schedule....
type Factory ¶
type Factory struct { // Creator is a factory function to create Cluster Creator func(log logger.Logger, cli kubernetes.Interface, config *rest.Config) Cluster }
Factory create a new Cluster
type FilterTable ¶
type FilterTable struct { Count int InputPolicy IPTablesChainPolicy ForwardPolicy IPTablesChainPolicy OutputPolicy IPTablesChainPolicy }
type IPTablesChainPolicy ¶
type IPTablesChainPolicy string
var ( AcceptPolicy IPTablesChainPolicy = "ACCEPT" DropPolicy IPTablesChainPolicy = "DROP" )
type IPTablesInfo ¶
type IPTablesInfo struct { Filter FilterTable NAT NATTable }
IPTablesInfo is the iptables information of a node
type Machine ¶
type Machine struct { // SysCtl is the OS system param from command "sysctl -a" SysCtl map[string]string IPTables IPTablesInfo // Error is not nil if any error appear Error error }
Machine is the contains low level system information of a node
type NATTable ¶
type NATTable struct { Count int PreRoutingPolicy IPTablesChainPolicy InputPolicy IPTablesChainPolicy OutputPolicy IPTablesChainPolicy PostRoutingPolicy IPTablesChainPolicy }
type Resources ¶
type Resources struct { Deployments *appv1.DeploymentList DaemonSets *appv1.DaemonSetList StatefulSets *appv1.StatefulSetList ReplicaSets *appv1.ReplicaSetList ReplicationControllers *corev1.ReplicationControllerList Jobs *batchv1.JobList CronJobs *v1beta12.CronJobList Nodes *corev1.NodeList PersistentVolumes *corev1.PersistentVolumeList ComponentStatuses *corev1.ComponentStatusList Pods *corev1.PodList PodTemplates *corev1.PodTemplateList PersistentVolumeClaims *corev1.PersistentVolumeClaimList ConfigMaps *corev1.ConfigMapList Services *corev1.ServiceList Secrets *corev1.SecretList ServiceAccounts *corev1.ServiceAccountList ResourceQuotas *corev1.ResourceQuotaList LimitRanges *corev1.LimitRangeList MutatingWebhookConfigurations *ar.MutatingWebhookConfigurationList ValidatingWebhookConfigurations *ar.ValidatingWebhookConfigurationList Namespaces *corev1.NamespaceList HPAs *asv1.HorizontalPodAutoscalerList PodDisruptionBudgets *policyv1beta1.PodDisruptionBudgetList CoreComponents map[string][]Component Machines map[string]Machine // Extra is a CloudType special resources Extra interface{} }
Resources containers all cluster information from k8s , machine or process
type ResourcesFilter ¶
type ResourcesFilter []*ResourcesFilterItem
ResourcesFilter is a set of ResourcesFilterItem
func (ResourcesFilter) Compile ¶
func (r ResourcesFilter) Compile() error
Compile compile regular expressions an error will be returned if regular expressions is wrong
func (ResourcesFilter) Filtered ¶
func (r ResourcesFilter) Filtered(ns, kind, name string) bool
Filtered indicate whether the target workload is filtered
type ResourcesFilterItem ¶
type ResourcesFilterItem struct { // Namespace,Kind,Name support regular expressions Namespace string Kind string Name string // contains filtered or unexported fields }
ResourcesFilterItem shows what workloads will be filtered out
Directories
¶
Path | Synopsis |
---|---|
* Tencent is pleased to support the open source community by making TKEStack * available.
|
* Tencent is pleased to support the open source community by making TKEStack * available. |
* Tencent is pleased to support the open source community by making TKEStack * available.
|
* Tencent is pleased to support the open source community by making TKEStack * available. |
compexplorer
* Tencent is pleased to support the open source community by making TKEStack * available.
|
* Tencent is pleased to support the open source community by making TKEStack * available. |
nodeexec
* Tencent is pleased to support the open source community by making TKEStack * available.
|
* Tencent is pleased to support the open source community by making TKEStack * available. |
* Tencent is pleased to support the open source community by making TKEStack * available.
|
* Tencent is pleased to support the open source community by making TKEStack * available. |