k8sutils

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package k8sutils provides Kubernetes utility functions that are specific to Portworx

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instance

type Instance struct {
	// contains filtered or unexported fields
}

Instance represents an instance of k8sutils

func New

func New(kubeconfig string) (*Instance, error)

New returns a new instance of k8sutils

func (*Instance) GetPXSharedApps

func (k *Instance) GetPXSharedApps() ([]apps_api.Deployment, []apps_api.StatefulSet, error)

GetPXSharedApps returns all deployments and statefulsets using Portworx storage class for shared volumes

func (*Instance) GetPXSharedSCs

func (k *Instance) GetPXSharedSCs() ([]string, error)

GetPXSharedSCs returns all storage classes that have the shared parameter set to true

func (*Instance) GetSecret

func (k *Instance) GetSecret(sel *core_api.SecretKeySelector, namespace string) ([]byte, error)

GetSecret returns the secret subkey

func (*Instance) IsAnyPXAppPodUnmanaged

func (k *Instance) IsAnyPXAppPodUnmanaged() (bool, error)

IsAnyPXAppPodUnmanaged checks if any application pod using PX volumes is not managed by a kubernetes controller

func (*Instance) RestoreScaledAppsReplicas

func (k *Instance) RestoreScaledAppsReplicas() error

RestoreScaledAppsReplicas restores PX shared apps that were scaled down to 0 replicas

func (*Instance) ScaleSharedAppsToZero

func (k *Instance) ScaleSharedAppsToZero() error

ScaleSharedAppsToZero scales down PX shared apps to 0 replicas

Jump to

Keyboard shortcuts

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