Documentation
¶
Index ¶
- Variables
- type CHClusterPod
- type Chi
- type ChiPutParams
- type ChiResource
- type Container
- type Dashboard
- type DashboardResource
- type Namespace
- type NamespaceResource
- type Operator
- type OperatorPod
- type OperatorPutParams
- type OperatorResource
- type PersistentVolume
- type PersistentVolumeClaim
- type Pod
- type ResourceSpec
- type ResourceSpecMetadata
- type WebService
- type WebServiceInfo
Constants ¶
This section is empty.
Variables ¶
var ErrNameRequired = errors.New("name is required")
var ErrNamespaceRequired = errors.New("namespace is required")
var ErrStillHaveCHIs = errors.New("cannot delete the last clickhouse-operator while CHI resources still exist")
var ErrYAMLMustBeCHI = errors.New("YAML document must contain a single ClickhouseInstallation definition")
var ErrorsToConsole bool
Functions ¶
This section is empty.
Types ¶
type CHClusterPod ¶
type Chi ¶
type Chi struct {
Name string `json:"name" description:"name of the ClickHouse installation"`
Namespace string `json:"namespace" description:"namespace the installation is in"`
Status string `json:"status" description:"status of the installation"`
Clusters int `json:"clusters" description:"number of clusters in the installation"`
Hosts int `json:"hosts" description:"number of hosts in the installation"`
ExternalURL string `json:"external_url" description:"external URL of the loadbalancer service"`
ResourceYAML string `json:"resource_yaml" description:"Kubernetes YAML spec of the CHI resource"`
CHClusterPods []CHClusterPod `json:"ch_cluster_pods" description:"ClickHouse cluster pods"`
}
type ChiPutParams ¶
type ChiPutParams struct {
YAML string `json:"yaml" description:"YAML of the CHI custom resource"`
}
ChiPutParams is the object for parameters to a CHI PUT request
type ChiResource ¶
type ChiResource struct {
}
ChiResource is the REST layer to ClickHouse Installations
func (*ChiResource) Name ¶
func (c *ChiResource) Name() string
Name returns the name of the web service
func (*ChiResource) WebService ¶
func (c *ChiResource) WebService(_ *WebServiceInfo) (*restful.WebService, error)
WebService creates a new service that can handle REST requests
type Dashboard ¶
type Dashboard struct {
KubeCluster string `json:"kube_cluster" description:"kubernetes cluster name"`
KubeVersion string `json:"kube_version" description:"kubernetes cluster version"`
ChopCount int `json:"chop_count" description:"number of clickhouse-operators deployed"`
ChopCountAvailable int `json:"chop_count_available" description:"number of clickhouse-operators available"`
ChiCount int `json:"chi_count" description:"number of ClickHouse Installations deployed"`
ChiCountComplete int `json:"chi_count_complete" description:"number of ClickHouse Installations completed"`
}
type DashboardResource ¶
type DashboardResource struct {
}
DashboardResource is the REST layer to the dashboard
func (*DashboardResource) Name ¶
func (d *DashboardResource) Name() string
Name returns the name of the web service
func (*DashboardResource) WebService ¶
func (d *DashboardResource) WebService(_ *WebServiceInfo) (*restful.WebService, error)
WebService creates a new service that can handle REST requests
type Namespace ¶
type Namespace struct {
Name string `json:"name" description:"name of the namespace"`
}
type NamespaceResource ¶
type NamespaceResource struct {
}
NamespaceResource is the REST layer to Namespaces
func (*NamespaceResource) Name ¶
func (n *NamespaceResource) Name() string
Name returns the name of the web service
func (*NamespaceResource) WebService ¶
func (n *NamespaceResource) WebService(_ *WebServiceInfo) (*restful.WebService, error)
WebService creates a new service that can handle REST requests
type Operator ¶
type Operator struct {
Name string `json:"name" description:"name of the operator"`
Namespace string `json:"namespace" description:"namespace the operator is in"`
Conditions string `json:"conditions" description:"conditions of the operator"`
Version string `json:"version" description:"version of the operator"`
ConfigYaml string `json:"config_yaml" description:"operator config as a YAML string"`
Pods []OperatorPod `json:"pods" description:"pods managed by the operator"`
}
type OperatorPod ¶
type OperatorPutParams ¶
type OperatorPutParams struct {
Version string `json:"version" description:"version of clickhouse-operator to deploy"`
}
OperatorPutParams is the object for parameters to an operator PUT request
type OperatorResource ¶
type OperatorResource struct {
// contains filtered or unexported fields
}
OperatorResource is the REST layer to Pods
func (*OperatorResource) Name ¶
func (o *OperatorResource) Name() string
Name returns the name of the web service
func (*OperatorResource) WebService ¶
func (o *OperatorResource) WebService(wsi *WebServiceInfo) (*restful.WebService, error)
WebService creates a new service that can handle REST requests
type PersistentVolume ¶
type PersistentVolume struct {
Name string `json:"name" description:"name of the PV"`
Phase string `json:"phase" description:"status of the PV"`
StorageClass string `json:"storage_class" description:"storage class name of the PV"`
Capacity int64 `json:"capacity" description:"capacity of the PV"`
ReclaimPolicy string `json:"reclaim_policy" description:"reclaim policy of the PV"`
}
type PersistentVolumeClaim ¶
type PersistentVolumeClaim struct {
Name string `json:"name" description:"name of the PVC"`
Namespace string `json:"namespace" description:"namespace the PVC is in"`
Phase string `json:"phase" description:"phase of the PVC"`
StorageClass string `json:"storage_class" description:"requested storage class name of the PVC"`
Capacity int64 `json:"capacity" description:"requested capacity of the PVC"`
BoundPV *PersistentVolume `json:"bound_pv,omitempty" description:"PV bound to this PVC"`
}
type Pod ¶
type Pod struct {
Name string `json:"name" description:"name of the pod"`
Node string `json:"node" description:"node the pod is nominated to run on"`
Status string `json:"status" description:"status of the pod"`
Containers []Container `json:"containers" description:"containers in the pod"`
PVCs []PersistentVolumeClaim `json:"pvcs" description:"persistent volume claims of this pod"`
}
type ResourceSpec ¶
type ResourceSpec struct {
APIVersion string `json:"apiVersion"`
Kind string `json:"kind"`
Metadata ResourceSpecMetadata `json:"metadata"`
Spec interface{} `json:"spec"`
}
type ResourceSpecMetadata ¶
type WebService ¶
type WebService interface {
Name() string
WebService(*WebServiceInfo) (*restful.WebService, error)
}