forked from rancher/rancher
-
Notifications
You must be signed in to change notification settings - Fork 1
/
appHandler.go
30 lines (27 loc) · 1.33 KB
/
appHandler.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package monitoring
import (
"github.com/rancher/rancher/pkg/monitoring"
appsv1beta2 "github.com/rancher/types/apis/apps/v1beta2"
corev1 "github.com/rancher/types/apis/core/v1"
mgmtv3 "github.com/rancher/types/apis/management.cattle.io/v3"
projectv3 "github.com/rancher/types/apis/project.cattle.io/v3"
)
type appHandler struct {
cattleAppClient projectv3.AppInterface
cattleSecretClient corev1.SecretInterface
cattleTemplateVersionClient mgmtv3.CatalogTemplateVersionInterface
cattleProjectClient mgmtv3.ProjectInterface
cattleClusterGraphClient mgmtv3.ClusterMonitorGraphInterface
cattleProjectGraphClient mgmtv3.ProjectMonitorGraphInterface
cattleMonitorMetricClient mgmtv3.MonitorMetricInterface
agentDeploymentClient appsv1beta2.DeploymentInterface
agentStatefulSetClient appsv1beta2.StatefulSetInterface
agentDaemonSetClient appsv1beta2.DaemonSetInterface
agentServiceAccountClient corev1.ServiceAccountInterface
agentSecretClient corev1.SecretInterface
agentNodeClient corev1.NodeInterface
agentNamespaceClient corev1.NamespaceInterface
}
func (ah *appHandler) withdrawApp(clusterID, appName, appTargetNamespace string) error {
return monitoring.WithdrawApp(ah.cattleAppClient, monitoring.OwnedAppListOptions(clusterID, appName, appTargetNamespace))
}