Documentation
¶
Index ¶
- func ReportContainerResources(reportedNamespace *NamespaceReport, pod *k8sapicore.Pod)
- func ReportDaemonSets(reporeportedNamespace *NamespaceReport, dsList *extv1b1.DaemonSetList)
- func ReportDeployments(reportedNamespace *NamespaceReport, deploymentList *v1beta1.DeploymentList)
- func ReportNodeResources(repotedNode *NodeReport, nodeStatus k8sapicore.NodeStatus, ...)
- func ReportPVCs(reporeportedNamespace *NamespaceReport, ...)
- func ReportPods(reportedNamespace *NamespaceReport, podList *k8sapicore.PodList)
- func ReportResourceQuotas(reportedNamespace *NamespaceReport, quotaList *k8sapicore.ResourceQuotaList)
- func ReportResources(reportedNamespace *NamespaceReport, podList *k8sapicore.PodList)
- func ReportRoutes(reportedNamespace *NamespaceReport, routeList *o7tapiroute.RouteList)
- type ContainerResourcesReport
- type DaemonSetReport
- type DeploymentReport
- type NamespaceReport
- type NodeReport
- type NodeResources
- type OpenshiftClusterRole
- type OpenshiftClusterRoleBinding
- type OpenshiftGroup
- type OpenshiftNamespaceRole
- type OpenshiftRole
- type OpenshiftSecurityContextConstraints
- type OpenshiftUser
- type PVReport
- type PVСReport
- type PodReport
- type QuotaReport
- type RBACReport
- type Report
- func (clusterReport *Report) ReportNamespaces(apiResources api.Resources)
- func (clusterReport *Report) ReportNodes(apiResources api.Resources)
- func (clusterReport *Report) ReportPVs(apiResources api.Resources)
- func (clusterReport *Report) ReportQuotas(apiResources api.Resources)
- func (clusterReport *Report) ReportRBAC(apiResources api.Resources)
- func (clusterReport *Report) ReportStorageClasses(apiResources api.Resources)
- type ResourceQuotaReport
- type RouteReport
- type StorageClassReport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReportContainerResources ¶
func ReportContainerResources(reportedNamespace *NamespaceReport, pod *k8sapicore.Pod)
ReportContainerResources create report about container resources
func ReportDaemonSets ¶
func ReportDaemonSets(reporeportedNamespace *NamespaceReport, dsList *extv1b1.DaemonSetList)
ReportDaemonSets generate DaemonSet report
func ReportDeployments ¶
func ReportDeployments(reportedNamespace *NamespaceReport, deploymentList *v1beta1.DeploymentList)
ReportDeployments generate Deployments report
func ReportNodeResources ¶
func ReportNodeResources(repotedNode *NodeReport, nodeStatus k8sapicore.NodeStatus, apiResources api.Resources)
ReportNodeResources parse and insert info about consumed resources
func ReportPVCs ¶
func ReportPVCs(reporeportedNamespace *NamespaceReport, pvcList *k8scorev1.PersistentVolumeClaimList, pvList []PVReport)
ReportPVCs generate PVC report
func ReportPods ¶
func ReportPods(reportedNamespace *NamespaceReport, podList *k8sapicore.PodList)
ReportPods creates info about cluster pods
func ReportResourceQuotas ¶
func ReportResourceQuotas(reportedNamespace *NamespaceReport, quotaList *k8sapicore.ResourceQuotaList)
ReportResourceQuotas creates report about quotas
func ReportResources ¶
func ReportResources(reportedNamespace *NamespaceReport, podList *k8sapicore.PodList)
ReportResources create report about namespace resources
func ReportRoutes ¶
func ReportRoutes(reportedNamespace *NamespaceReport, routeList *o7tapiroute.RouteList)
ReportRoutes create report about routes
Types ¶
type ContainerResourcesReport ¶
type ContainerResourcesReport struct {
ContainerCount int `json:"containerCount"`
CPUTotal *resource.Quantity `json:"cpuTotal"`
MemoryTotal *resource.Quantity `json:"memoryTotal"`
}
ContainerResourcesReport represents json report for aggregated container resources
type DaemonSetReport ¶
type DaemonSetReport struct {
Name string `json:"name"`
LatestChange k8sMeta.Time `json:"latestChange,omitempty"`
}
DaemonSetReport represents json report of k8s DaemonSet relevant information
type DeploymentReport ¶
type DeploymentReport struct {
Name string `json:"name"`
LatestChange k8sMeta.Time `json:"latestChange,omitempty"`
}
DeploymentReport represents json report of DeploymentReport resources
type NamespaceReport ¶
type NamespaceReport struct {
Name string `json:"name"`
LatestChange k8sMeta.Time `json:"latestChange,omitempty"`
Resources ContainerResourcesReport `json:"resources,omitempty"`
Pods []PodReport `json:"pods,omitempty"`
Routes []RouteReport `json:"routes,omitempty"`
DaemonSets []DaemonSetReport `json:"daemonSets,omitempty"`
Deployments []DeploymentReport `json:"deployments,omitempty"`
Quotas []ResourceQuotaReport `json:"quotas,omitempty"`
SecurityContextConstraints []string `json:"securityContextConstraints,omitempty"`
PVCs []PVСReport `json:"persistentVolumeClaims,omitempty"`
}
NamespaceReport represents json report of k8s namespaces
type NodeReport ¶
type NodeReport struct {
Name string `json:"name"`
MasterNode bool `json:"masterNode"`
Resources NodeResources `json:"resources"`
}
NodeReport represents json report of k8s nodes
type NodeResources ¶
type NodeResources struct {
CPU *resource.Quantity `json:"cpu"`
MemoryConsumed *resource.Quantity `json:"memoryConsumed"`
MemoryCapacity *resource.Quantity `json:"memoryCapacity"`
RunningPods *resource.Quantity `json:"runningPods"`
PodCapacity *resource.Quantity `json:"podCapacity"`
}
NodeResources represents a json report of Node resources
type OpenshiftClusterRole ¶
type OpenshiftClusterRole struct {
Name string `json:"name"`
Rules []o7tapiauth.PolicyRule `json:"rules,omitempty" protobuf:"bytes,2,rep,name=rules"`
}
OpenshiftClusterRole wrapper around cluster role
type OpenshiftClusterRoleBinding ¶
type OpenshiftClusterRoleBinding struct {
Name string `json:"name"`
UserNames o7tapiauth.OptionalNames `json:"userNames" protobuf:"bytes,2,rep,name=userNames"`
GroupNames o7tapiauth.OptionalNames `json:"groupNames" protobuf:"bytes,3,rep,name=groupNames"`
Subjects []k8scorev1.ObjectReference `json:"subjects" protobuf:"bytes,4,rep,name=subjects"`
RoleRef k8scorev1.ObjectReference `json:"roleRef" protobuf:"bytes,5,opt,name=roleRef"`
}
OpenshiftClusterRoleBinding wrapper around openshift cluster role bindings
type OpenshiftGroup ¶
type OpenshiftGroup struct {
Name string `json:"name"`
Users []string `json:"users" protobuf:"bytes,2,rep,name=users"`
}
OpenshiftGroup wrapper around openshift group
type OpenshiftNamespaceRole ¶
type OpenshiftNamespaceRole struct {
Namespace string `json:"namespace"`
Roles []OpenshiftRole `json:"roles"`
}
OpenshiftNamespaceRole represent roles mapped to namespaces
type OpenshiftRole ¶
type OpenshiftRole struct {
Name string `json:"name"`
Rules []o7tapiauth.PolicyRule `json:"rules,omitempty" protobuf:"bytes,2,rep,name=rules"`
}
OpenshiftRole wrapper around openshift role
type OpenshiftSecurityContextConstraints ¶
type OpenshiftSecurityContextConstraints struct {
Name string `json:"name"`
Users []string `json:"users" protobuf:"bytes,18,rep,name=users"`
Groups []string `json:"groups" protobuf:"bytes,19,rep,name=groups"`
Namespaces []string `json:"namespaces,omitempty"`
}
OpenshiftSecurityContextConstraints wrapper aroung opeshift scc
type OpenshiftUser ¶
type OpenshiftUser struct {
Name string `json:"name"`
FullName string `json:"fullName,omitempty" protobuf:"bytes,2,opt,name=fullName"`
Identities []string `json:"identities" protobuf:"bytes,3,rep,name=identities"`
Groups []string `json:"groups" protobuf:"bytes,4,rep,name=groups"`
}
OpenshiftUser wrapper around openshift user
type PVReport ¶
type PVReport struct {
Name string `json:"name"`
Driver k8sapicore.PersistentVolumeSource `json:"driver"`
StorageClass string `json:"storageClass,omitempty"`
Capacity k8sapicore.ResourceList `json:"capacity,omitempty"`
Phase k8sapicore.PersistentVolumePhase `json:"phase,omitempty"`
ReclaimPolicy k8sapicore.PersistentVolumeReclaimPolicy `` /* 143-byte string literal not displayed */
}
PVReport represents json report of k8s PVs
type PVСReport ¶
type PVСReport struct {
Name string `json:"name"`
PVName string `json:"pvname"`
AccessModes []k8scorev1.PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,1,rep,name=accessModes,casttype=PersistentVolumeAccessMode"`
StorageClass string `json:"storageClass"`
Capacity k8sapicore.ResourceList `json:"capacity,omitempty"`
ReclaimPolicy k8sapicore.PersistentVolumeReclaimPolicy `` /* 143-byte string literal not displayed */
}
PVСReport represents json report of k8s PVs
type PodReport ¶
type PodReport struct {
Name string `json:"name"`
}
PodReport represents json report of k8s pods
type QuotaReport ¶
type QuotaReport struct {
Name string `json:"name"`
Quota k8sapicore.ResourceQuotaSpec `json:"quota,omitempty"`
Selector o7tapiquota.ClusterResourceQuotaSelector `json:"selector,omitempty"`
}
QuotaReport represents json report of o7t cluster quotas
type RBACReport ¶
type RBACReport struct {
Users []OpenshiftUser `json:"users"`
Groups []OpenshiftGroup `json:"group"`
Roles []OpenshiftNamespaceRole `json:"roles"`
ClusterRoles []OpenshiftClusterRole `json:"clusterRoles"`
ClusterRoleBindings []OpenshiftClusterRoleBinding `json:"clusterRoleBindings"`
SecurityContextConstraints []OpenshiftSecurityContextConstraints `json:"securityContextConstraints"`
}
RBACReport contains RBAC report
type Report ¶
type Report struct {
Nodes []NodeReport `json:"nodes"`
Quotas []QuotaReport `json:"quotas"`
Namespaces []NamespaceReport `json:"namespaces,omitempty"`
PVs []PVReport `json:"pvs,omitempty"`
StorageClasses []StorageClassReport `json:"storageClasses,omitempty"`
RBACReport RBACReport `json:"rbacreport,omitempty"`
}
Report represents json report of k8s resources
func GenClusterReport ¶
GenClusterReport inserts report values into structures for json output
func (*Report) ReportNamespaces ¶
ReportNamespaces fills in information about Namespaces
func (*Report) ReportNodes ¶
ReportNodes fills in information about nodes
func (*Report) ReportQuotas ¶
ReportQuotas creates report about cluster quotas
func (*Report) ReportRBAC ¶
ReportRBAC create report about RBAC policy
func (*Report) ReportStorageClasses ¶
ReportStorageClasses create report about storage classes
type ResourceQuotaReport ¶
type ResourceQuotaReport struct {
Name string `json:"name"`
Hard k8scorev1.ResourceList `json:"hard,omitempty"`
ScopeSelector *k8sapicore.ScopeSelector `json:"selector,omitempty"`
Scopes []k8sapicore.ResourceQuotaScope `json:"scopes,omitempty"`
}
ResourceQuotaReport represents json report of Quota resources
type RouteReport ¶
type RouteReport struct {
Name string `json:"name"`
Host string `json:"host"`
Path string `json:"path,omitempty"`
AlternateBackends []o7tapiroute.RouteTargetReference `json:"alternateBackends,omitempty"`
TLS *o7tapiroute.TLSConfig `json:"tls,omitempty"`
To o7tapiroute.RouteTargetReference `json:"to"`
WildcardPolicy o7tapiroute.WildcardPolicyType `json:"wildcardPolicy"`
}
RouteReport represents json report of k8s pods
type StorageClassReport ¶
type StorageClassReport struct {
Name string `json:"name"`
Provisioner string `json:"provisioner"`
}
StorageClassReport represents json report of k8s storage classes