Documentation
¶
Overview ¶
Package report generates a report from the state of a cluster
Code generated by go generate; DO NOT EDIT.
This file was generated by gen_list_converter.go at 2019-06-17 12:11:32.157784588 +0300 EEST m=+0.000644685
Index ¶
- type ClusterStateReport
- type ConfigMapReport
- type ContainerReport
- type DeploymentReport
- type NamespaceReport
- type NodeReport
- type PersistentVolumeClaimReport
- type PersistentVolumeReport
- type PodPortReport
- type PodReport
- type SecretReport
- type ServicePortReport
- type ServiceReport
- type StorageType
- type VolumeReport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterStateReport ¶
type ClusterStateReport struct {
Namespaces []NamespaceReport `json:"namespaces"`
Nodes []NodeReport `json:"nodes"`
Services []ServiceReport `json:"services"`
Pods []PodReport `json:"pods"`
PersistentVolumeReports []PersistentVolumeReport `json:"persistentVolumes"`
PersistentVolumeClaimReports []PersistentVolumeClaimReport `json:"persistentVolumeClaims"`
ConfigMapReports []ConfigMapReport `json:"configMaps"`
SecretReports []SecretReport `json:"secrets"`
Deployments []DeploymentReport `json:"deployments"`
}
ClusterStateReport is the complete summary (so without all the details) for a cluster
func BuildReport ¶
func BuildReport(contextName string) (*ClusterStateReport, error)
BuildReport builds a complete status report from a cluster status
type ConfigMapReport ¶
type ConfigMapReport struct {
ID types.UID `json:"id"`
NameSpace string `json:"namespace"`
Name string `json:"name"`
Data map[string]string `json:"data"`
}
ConfigMapReport is the summary of the config maps in a cluster
type ContainerReport ¶
type ContainerReport struct {
ID string `json:"id"`
NameSpace string `json:"namespace"`
Name string `json:"name"`
Image string `json:"image"`
Ports []PodPortReport `json:"ports"`
Ready bool `json:"ready"`
}
ContainerReport is the summary of the containers of a pod
type DeploymentReport ¶
type DeploymentReport struct {
ID types.UID `json:"id"`
NameSpace string `json:"namespace"`
Name string `json:"name"`
Labels map[string]string `json:"labels"`
Selector map[string]string `json:"selector"`
Volumes []VolumeReport `json:"volumes"`
}
DeploymentReport is the summary of the deployments in a cluster
type NamespaceReport ¶
type NamespaceReport struct {
ID types.UID `json:"id"`
NameSpace string `json:"namespace"`
Name string `json:"name"`
Labels map[string]string `json:"labels"`
ServiceIds []types.UID `json:"serviceIds"`
PodIds []types.UID `json:"podIds"`
DeploymentIds []types.UID `json:"deploymentsIds"`
}
NamespaceReport is the summary of the namespaces of the cluster
type NodeReport ¶
type NodeReport struct {
ID types.UID `json:"id"`
NameSpace string `json:"namespace"`
Name string `json:"name"`
Labels map[string]string `json:"labels"`
Condition string `json:"condition"`
AllowedCPUCores int `json:"allowedCPUCores"`
AllowedRAM int `json:"allowedRAM"`
UsageCPUCores *float64 `json:"usageCPUCores"`
UsageRAM *int `json:"usageRAM"`
PodIds []types.UID `json:"podIds"`
}
NodeReport is the summary of the nodes of the cluster
type PersistentVolumeClaimReport ¶
type PersistentVolumeClaimReport struct {
ID types.UID `json:"id"`
NameSpace string `json:"namespace"`
Name string `json:"name"`
VolumeName string `json:"volumeName"`
}
PersistentVolumeClaimReport is the summary of the persistent volume claims in a cluster
type PersistentVolumeReport ¶
type PersistentVolumeReport struct {
ID types.UID `json:"id"`
NameSpace string `json:"namespace"`
Name string `json:"name"`
StorageType StorageType `json:"type"`
Capacity *int `json:"capacity"`
}
PersistentVolumeReport is the summary of the persistent volumes in a cluster
type PodPortReport ¶
type PodPortReport struct {
Protocol string `json:"protocol"`
ContainerPort int32 `json:"containerPort"`
Name *string `json:"name"`
}
PodPortReport is the summary of the ports of a pod
type PodReport ¶
type PodReport struct {
ID types.UID `json:"id"`
NameSpace string `json:"namespace"`
Name string `json:"name"`
Labels map[string]string `json:"labels"`
Condition string `json:"condition"`
IP string `json:"ip"`
UsageCPUCores *float64 `json:"usageCPUCores"`
UsageRAM *int `json:"usageRAM"`
Containers []ContainerReport `json:"containers"`
Volumes []VolumeReport `json:"volumes"`
}
PodReport is the summary of the pods in a cluster
type SecretReport ¶
type SecretReport struct {
ID types.UID `json:"id"`
NameSpace string `json:"namespace"`
Name string `json:"name"`
Data map[string][]byte `json:"data"`
}
SecretReport is the summary of the secrets in a cluster
type ServicePortReport ¶
type ServicePortReport struct {
Protocol string `json:"protocol"`
InternalPort int32 `json:"internalPort"`
InternalPortName *string `json:"internalPortName"`
NodePort *int32 `json:"nodePort"`
}
ServicePortReport is the summary of the port used by a service
type ServiceReport ¶
type ServiceReport struct {
ID types.UID `json:"id"`
NameSpace string `json:"namespace"`
Name string `json:"name"`
ClusterIP string `json:"clusterIP"`
ExternalIPs []string `json:"externalIP"`
Ports []ServicePortReport `json:"ports"`
Labels map[string]string `json:"labels"`
Selector map[string]string `json:"selector"`
PodIds []types.UID `json:"podIds"`
}
ServiceReport is the summary of the services of the cluster
type StorageType ¶
type StorageType string
StorageType is a list of all possible storage for volumes and persistent volumes
const ( // AWSElasticBlockStore is storage in Amazon AWSElasticBlockStore StorageType = "AWSElasticBlockStore" AzureDisk StorageType = "AzureDisk" AzureFile StorageType = "AzureFile" CephFS StorageType = "CephFS" Cinder StorageType = "Cinder" FC StorageType = "FC" Flocker StorageType = "Flocker" FlexVolume StorageType = "FlexVolume" GCEPersistentDisk StorageType = "GCEPersistentDisk" Glusterfs StorageType = "Glusterfs" HostPath StorageType = "HostPath" ISCSI StorageType = "ISCSI" NFS StorageType = "NFS" Quobyte StorageType = "Quobyte" RBD StorageType = "RBD" ScaleIO StorageType = "ScaleIO" StorageOS StorageType = "StorageOS" VsphereVolume StorageType = "VsphereVolume" // CSI is storage in CSI CSI StorageType = "CSI" Local StorageType = "Local" // ConfigMap is storage in ConfigMap ConfigMap StorageType = "ConfigMap" DownwardAPI StorageType = "DownwardAPI" EmptyDir StorageType = "EmptyDir" PersistentVolumeClaim StorageType = "PersistentVolumeClaim" PhotonPersistentDisk StorageType = "PhotonPersistentDisk" PortworxVolume StorageType = "PortworxVolume" Projected StorageType = "Projected" Secret StorageType = "Secret" // Unknown is an unknown storage, not good... Unknown StorageType = "Unknown" )
These are valid address type of node.
type VolumeReport ¶
type VolumeReport struct {
Name string `json:"name"`
StorageType StorageType `json:"type"`
PersistentVolumeClaimName *string `json:"persistentVolumeClaimName"`
}
VolumeReport is the summary of the volumes in a cluster