Documentation ¶
Overview ¶
Copyright © 2021 Alex Krzos akrzos@redhat.com
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
http://www.apache.org/licenses/LICENSE-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 OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func DisplayClusterData(clusterCapacityData ClusterCapacityData, displayDefault bool, ...)
- func DisplayClusterSizeData(clusterSizeData ClusterSizeData, displayHeaders bool, displayFormat string)
- func DisplayNamespaceData(namespaceCapacityData map[string]*NamespaceCapacityData, ...)
- func DisplayNodeData(nodesCapacityData map[string]*NodeCapacityData, sortedNodeNames []string, ...)
- func DisplayNodeRoleData(nodeRoleCapacityData map[string]*ClusterCapacityData, sortedRoleNames []string, ...)
- func ValidateOutput(cmd cobra.Command) error
- type ClusterCapacityData
- type ClusterSizeData
- type NamespaceCapacityData
- type NodeCapacityData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisplayClusterData ¶
func DisplayClusterData(clusterCapacityData ClusterCapacityData, displayDefault bool, displayHeaders bool, displayEphemeralStorage bool, displayFormat string)
func DisplayClusterSizeData ¶ added in v0.1.5
func DisplayClusterSizeData(clusterSizeData ClusterSizeData, displayHeaders bool, displayFormat string)
func DisplayNamespaceData ¶
func DisplayNodeData ¶
func DisplayNodeRoleData ¶
func ValidateOutput ¶
Types ¶
type ClusterCapacityData ¶
type ClusterCapacityData struct { TotalNodeCount int TotalReadyNodeCount int TotalUnreadyNodeCount int TotalUnschedulableNodeCount int TotalPodCount int TotalNonTermPodCount int TotalCapacityPods resource.Quantity TotalCapacityCPU resource.Quantity TotalCapacityCPUCores float64 TotalCapacityMemory resource.Quantity TotalCapacityMemoryGiB float64 TotalCapacityEphemeralStorage resource.Quantity TotalCapacityEphemeralStorageGB float64 TotalAllocatablePods resource.Quantity TotalAllocatableCPU resource.Quantity TotalAllocatableCPUCores float64 TotalAllocatableMemory resource.Quantity TotalAllocatableMemoryGiB float64 TotalAllocatableEphemeralStorage resource.Quantity TotalAllocatableEphemeralStorageGB float64 TotalAvailablePods int TotalRequestsCPU resource.Quantity TotalRequestsCPUCores float64 TotalLimitsCPU resource.Quantity TotalLimitsCPUCores float64 TotalAvailableCPU resource.Quantity TotalAvailableCPUCores float64 TotalRequestsMemory resource.Quantity TotalRequestsMemoryGiB float64 TotalLimitsMemory resource.Quantity TotalLimitsMemoryGiB float64 TotalAvailableMemory resource.Quantity TotalAvailableMemoryGiB float64 TotalRequestsEphemeralStorage resource.Quantity TotalRequestsEphemeralStorageGB float64 TotalLimitsEphemeralStorage resource.Quantity TotalLimitsEphemeralStorageGB float64 TotalAvailableEphemeralStorage resource.Quantity TotalAvailableEphemeralStorageGB float64 }
Available = allocatable - (scheduled aka non-term pod or requests.cpu/memory)
type ClusterSizeData ¶ added in v0.1.5
type ClusterSizeData struct { // Cluster APIs Namespace int Node int PersistentVolume int ServiceAccount int ClusterRole int ClusterRoleBinding int Role int RoleBinding int ResourceQuota int NetworkPolicy int // Workloads APIs Container int Pod int ReplicaSet int ReplicaController int Deployment int Daemonset int StatefulSet int CronJob int Job int // Service APIs EndPoints int Service int Ingress int // Config And Storage APIs Configmap int Secret int PersistentVolumeClaim int StorageClass int VolumeAttachment int // Metadata APIs Event int LimitRange int PodDisruptionBudget int PodSecurityPolicy int }
type NamespaceCapacityData ¶
type NamespaceCapacityData struct { TotalPodCount int TotalNonTermPodCount int TotalUnassignedNodePodCount int TotalRequestsCPU resource.Quantity TotalRequestsCPUCores float64 TotalLimitsCPU resource.Quantity TotalLimitsCPUCores float64 TotalRequestsMemory resource.Quantity TotalRequestsMemoryGiB float64 TotalLimitsMemory resource.Quantity TotalLimitsMemoryGiB float64 TotalRequestsEphemeralStorage resource.Quantity TotalRequestsEphemeralStorageGB float64 TotalLimitsEphemeralStorage resource.Quantity TotalLimitsEphemeralStorageGB float64 }
type NodeCapacityData ¶
type NodeCapacityData struct { TotalPodCount int TotalNonTermPodCount int Roles sets.String Ready bool Schedulable bool TotalCapacityPods resource.Quantity TotalCapacityCPU resource.Quantity TotalCapacityCPUCores float64 TotalCapacityMemory resource.Quantity TotalCapacityMemoryGiB float64 TotalCapacityEphemeralStorage resource.Quantity TotalCapacityEphemeralStorageGB float64 TotalAllocatablePods resource.Quantity TotalAllocatableCPU resource.Quantity TotalAllocatableCPUCores float64 TotalAllocatableMemory resource.Quantity TotalAllocatableMemoryGiB float64 TotalAllocatableEphemeralStorage resource.Quantity TotalAllocatableEphemeralStorageGB float64 TotalAvailablePods int TotalRequestsCPU resource.Quantity TotalRequestsCPUCores float64 TotalLimitsCPU resource.Quantity TotalLimitsCPUCores float64 TotalAvailableCPU resource.Quantity TotalAvailableCPUCores float64 TotalRequestsMemory resource.Quantity TotalRequestsMemoryGiB float64 TotalLimitsMemory resource.Quantity TotalLimitsMemoryGiB float64 TotalAvailableMemory resource.Quantity TotalAvailableMemoryGiB float64 TotalRequestsEphemeralStorage resource.Quantity TotalRequestsEphemeralStorageGB float64 TotalLimitsEphemeralStorage resource.Quantity TotalLimitsEphemeralStorageGB float64 TotalAvailableEphemeralStorage resource.Quantity TotalAvailableEphemeralStorageGB float64 }
Click to show internal directories.
Click to hide internal directories.