DKube Add

This commit is contained in:
dqzboy
2022-09-25 20:02:35 +08:00
parent 84c4f484e2
commit be038dd5e7
12 changed files with 505 additions and 189 deletions

View File

@ -3,6 +3,7 @@ package service
import (
appsv1 "k8s.io/api/apps/v1" //引入K8s的APPSv1的包.定义别名为appsv1
corev1 "k8s.io/api/core/v1" //引入K8s的corev1的包.定义别名为corev1
nwv1 "k8s.io/api/networking/v1"
"sort"
"strings"
"time"
@ -137,3 +138,24 @@ func (d deploymentCell) GetCreation() time.Time {
func (d deploymentCell) GetName() string {
return d.Name
}
type serviceCell corev1.Service
func (s serviceCell) GetCreation() time.Time {
return s.CreationTimestamp.Time
}
func (s serviceCell) GetName() string {
return s.Name
}
//追加ingress DataCell接口相关代码
type ingressCell nwv1.Ingress
func (i ingressCell) GetCreation() time.Time {
return i.CreationTimestamp.Time
}
func (i ingressCell) GetName() string {
return i.Name
}