k8s

package
v0.0.0-...-73f03d9 Latest Latest
Warning

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

Go to latest
Published: May 20, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetK8SConfig

func GetK8SConfig(log logging.Logger) (*rest.Config, error)

Types

type Configuration

type Configuration struct {
	KubeconfigPath string `envconfig:"KUBECONFIG_PATH" required:"false"`
}

func FetchConfiguration

func FetchConfiguration() (*Configuration, error)

type K8SClient

type K8SClient struct {
	Clientset kubernetes.Interface
	// contains filtered or unexported fields
}

func NewK8SClient

func NewK8SClient(log logging.Logger) (*K8SClient, error)

func (*K8SClient) FetchSecretDetails

func (k *K8SClient) FetchSecretDetails(req *SecretDetailsRequest) (*SecretDetailsResponse, error)

func (*K8SClient) FetchServiceDetails

func (k *K8SClient) FetchServiceDetails(req *ServiceDetailsRequest) (*ServiceDetailsResponse, error)

func (*K8SClient) ListPods

func (k *K8SClient) ListPods(namespace string) ([]corev1.Pod, error)

type SecretDetailsRequest

type SecretDetailsRequest struct {
	Namespace  string
	SecretName string
}

type SecretDetailsResponse

type SecretDetailsResponse struct {
	Namespace string
	Data      map[string]string
}

type ServiceDetails

type ServiceDetails struct {
	Name  string
	Ports []int32
}

type ServiceDetailsRequest

type ServiceDetailsRequest struct {
	Namespace   string
	ServiceName string
}

type ServiceDetailsResponse

type ServiceDetailsResponse struct {
	Namespace string
	ServiceDetails
}

Jump to

Keyboard shortcuts

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