kube

package
v0.0.0-...-0c70d8f Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: Apache-2.0 Imports: 32 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InArray

func InArray(expectedResourceKind []string, kind string) bool

Types

type Client

type Client interface {
	DeleteJob(namespace string, name string) error
	LogsForJob(namespace string, name string, jobLabel string) (string, string, error)
	ConvertCertificate(namespace, manifest, commit string) (*bytes.Buffer, error, bool)
	CreateOrUpdateService(namespace string, serviceStr string) (*core_v1.Service, error)
	CreateOrUpdateIngress(namespace string, ingressStr string) (*ext_v1beta1.Ingress, error)
	GetDiscoveryClient() (discovery.DiscoveryInterface, error)
	DeleteService(namespace string, name string) error
	DeleteIngress(namespace string, name string) error
	GetLogs(namespace string, pod string, container string, follow bool, previous bool, line int64) (io.ReadCloser, error)
	Exec(namespace string, podName string, containerName string, local io.ReadWriter) error
	LabelRepoObj(namespace, manifest, version string, commit string) (*bytes.Buffer, error)
	GetService(namespace string, serviceName string) (string, error)
	GetIngress(namespace string, ingressName string) (string, error)
	GetConfigMap(namespace string, configMapName string) (string, error)
	GetPersistentVolumeClaim(namespace string, pvcName string) (string, string, error)
	GetPersistentVolume(namespace string, pvcName string) (string, string, error)
	GetDeployment(namespace string, deploymentName string) (string, error)
	GetStatefulSet(namespace string, statefulSetName string) (string, error)
	GetJobCommit(namespace string, jobName string) (string, error)
	GetJob(namespace string, jobName string) (*v1.Job, error)
	GetCronJob(namespace string, cronJobName string) (string, error)
	GetDaemonSet(namespace string, daemonSetName string) (string, error)
	GetNamespace(namespace string) error
	DeleteNamespace(namespace string) error
	GetSecret(namespace string, secretName string) (string, error)
	IsSecretExist(namespace string, secretName string) (bool, error)
	GetKubeClient() *kubernetes.Clientset
	GetV1CrdClient() *v1_versioned.Clientset
	//GetV1alpha1CrdClient() *v1alpha1_versioned.Clientset
	GetC7nClient() *choerodon_version.Clientset
	GetRESTConfig() (*rest.Config, error)
	IsReleaseJobRun(namespace, releaseName string) bool
	CreateOrUpdateDockerRegistrySecret(namespace string, secret *core_v1.Secret) (*core_v1.Secret, error)
	BuildUnstructured(namespace string, manifest string) (ResourceList, error)
	//todo: delete follow func
	GetSelectRelationPod(info *resource.Info) (map[string][]core_v1.Pod, error)
	GetC7NHelmRelease(name, namespace string) *v1alpha1.C7NHelmRelease
	UpdateC7nHelmRelease(release *v1alpha1.C7NHelmRelease, namespace string)
}

func NewClient

func NewClient(f cmdutil.Factory) (Client, error)

type CommonObject

type CommonObject struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// Spec defines the behavior of a service.
	// https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
	// +optional
	Spec interface{} `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`

	// Most recently observed status of the service.
	// Populated by the system.
	// Read-only.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
	// +optional
	Status interface{} `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}

func (*CommonObject) DeepCopyObject

func (c *CommonObject) DeepCopyObject() runtime.Object

func (*CommonObject) GetAnnotations

func (c *CommonObject) GetAnnotations() string

func (*CommonObject) GetLabels

func (c *CommonObject) GetLabels() string

func (*CommonObject) GetName

func (c *CommonObject) GetName() string

func (*CommonObject) GetNamespace

func (c *CommonObject) GetNamespace() string

func (*CommonObject) GetObjectKind

func (c *CommonObject) GetObjectKind() schema.ObjectKind

type ResourceList

type ResourceList []*resource.Info

Jump to

Keyboard shortcuts

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