service

package
v0.0.0-...-61190b0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Overview

* Copyright 2019-2021 VMware, Inc. * * 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. *

* Copyright 2019-2021 VMware, Inc. * * 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. *

* Copyright 2019-2021 VMware, Inc. * * 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

Constants

This section is empty.

Variables

View Source
var EnvCs sync.Mutex
View Source
var KubeClient kubeClient = &kube.KUBE

Functions

func CheckClusterInfoStatus

func CheckClusterInfoStatus(ClusterInfoStatus map[string]interface{}) bool

CheckClusterStatus CheckClusterStatus

func CheckClusterStatus

func CheckClusterStatus(ClusterStatus map[string]string) bool

CheckClusterStatus CheckClusterStatus

func CheckJobReadiness

func CheckJobReadiness(namespace, jobName string) (bool, error)

func CheckNamespace

func CheckNamespace(namespace string) error

CheckNamespace CheckNamespace

func CheckStatus

func CheckStatus(status string) bool

func CreateNamespace

func CreateNamespace(namespace string) error

CreateNamespace CreateNamespace

func Debug

func Debug(format string, v ...interface{})

func GetChartPath

func GetChartPath(name string) string

func GetClusterDeployStatus

func GetClusterDeployStatus(name, namespace string) (map[string]string, error)

GetClusterDeployStatus GetClusterDeployStatus

func GetClusterInfo

func GetClusterInfo(name, namespace string) (map[string]interface{}, error)

GetClusterInfo GetClusterInfo

func GetClusterPodStatus

func GetClusterPodStatus(name, namespace string) (map[string]string, error)

GetClusterPodStatus GetClusterPodStatus

func GetClusterServiceStatus

func GetClusterServiceStatus(name, namespace string) (map[string]string, error)

GetClusterServiceStatus func

func GetClusterStsStatus

func GetClusterStsStatus(name, namespace string) (map[string]string, error)

GetClusterStsStatus gets all the statefulSet related information with the cluster name and namespace

func GetDeployList

func GetDeployList(clusterName, namespace string) (*v1.DeploymentList, error)

GetDeployList GetDeployList

func GetDeployStatus

func GetDeployStatus(deploy *v1.Deployment) (string, string)

GetDeployStatus GetDeployStatus

func GetDeploymentStatus

func GetDeploymentStatus(deploys *v1.DeploymentList) (map[string]string, error)

func GetIngressURLList

func GetIngressURLList(name, namespace string) ([]string, error)

GetIngressURLList is Get Ingress Url list

func GetLogs

func GetLogs(args *LogChanArgs) (*bytes.Buffer, error)

GetLogs is Get container Logs

func GetNamespaces

func GetNamespaces() ([]v1.Namespace, error)

GetNamespaces GetNamespaces

func GetNodeIP

func GetNodeIP() ([]string, error)

GetNodeIP get a node ip

func GetPodContainersStatus

func GetPodContainersStatus(ClusterName, namespace string) (map[string]string, error)

GetPodContainersStatus GetPodContainersStatus

func GetPodList

func GetPodList(name, namespace string) ([]string, error)

GetPodList GetPodList

func GetPodNameByModule

func GetPodNameByModule(namespace, name, modules string) (string, error)

GetPodNameByModule is Get Pod By Module

func GetPodStatus

func GetPodStatus(pods *corev1.PodList) map[string]string

GetPodStatus GetPodStatus

func GetProxySvcNodePorts

func GetProxySvcNodePorts(name, namespace string) (int32, error)

GetProxySvcNodePorts return rollsite svc NodePort

func GetServiceStatus

func GetServiceStatus(Services *v1.ServiceList) map[string]string

GetServiceStatus func

func GetSettings

func GetSettings(namespace string) (*cli.EnvSettings, error)

func GetStsList

func GetStsList(clusterName, namespace string) (*v1.StatefulSetList, error)

GetStsList gets the statefulSets list under the namespace

func GetStsStatus

func GetStsStatus(sts *v1.StatefulSet) (string, string)

GetStsStatus gets the status if a certain statefulSet

func GetStssStatus

func GetStssStatus(stss *v1.StatefulSetList) (map[string]string, error)

GetStssStatus gets the status of a list of statefulSets

func MapToConfig

func MapToConfig(m map[string]interface{}, templates string) (string, error)

func RepoAddAndUpdate

func RepoAddAndUpdate() error

func WriteLog

func WriteLog(w *websocket.Conn, args *LogChanArgs) (err error)

WriteLog WriteLog

Types

type Chart

type Chart interface {
	// contains filtered or unexported methods
}

type LogChanArgs

type LogChanArgs struct {
	Name                         string
	Namespace                    string
	Container                    string
	Follow                       bool
	Previous                     bool
	SinceSeconds                 *int64
	SinceTime                    time.Time
	Timestamps                   bool
	TailLines                    *int64
	LimitBytes                   *int64
	InsecureSkipTLSVerifyBackend bool
}

type Value

type Value struct {
	Val []byte
	T   string // type json yaml yml
}

func (*Value) Unmarshal

func (v *Value) Unmarshal() (map[string]interface{}, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL