kubernetes

package
v0.21.2 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2019 License: Apache-2.0 Imports: 8 Imported by: 22

Documentation

Overview

Copyright © 2019 Portworx

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.

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

This section is empty.

Functions

func KubeConnect

func KubeConnect(cfgFile, context string) (clientcmd.ClientConfig, *kubernetes.Clientset, error)

KubeConnect will return a Kubernetes client using the kubeconfig file set in the default context. clientcmd.ClientConfig will allow the caller to call ClientConfig.Namespace() to get the namespace set by the caller on their Kubeconfig.

Types

type PxPvc added in v0.21.2

type PxPvc struct {
	Name      string
	Namespace string
	PodNames  []string
	Pvc       *v1.PersistentVolumeClaim
	PxVolume  *api.Volume
	Pods      []v1.Pod
}

func NewPxPvc added in v0.21.2

func NewPxPvc(pvc *v1.PersistentVolumeClaim) *PxPvc

func (*PxPvc) GetPodNames added in v0.21.2

func (p *PxPvc) GetPodNames() []string

func (*PxPvc) GetVolume added in v0.21.2

func (p *PxPvc) GetVolume() *api.Volume

func (*PxPvc) SetPods added in v0.21.2

func (p *PxPvc) SetPods(pods []v1.Pod) bool

SetPods return true if found

func (*PxPvc) SetVolume added in v0.21.2

func (p *PxPvc) SetVolume(responses []*api.SdkVolumeInspectResponse) bool

SetVolume return true if found

Jump to

Keyboard shortcuts

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