k8s

package
v0.0.0-...-1cb3484 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package k8s provides abstracted access to kubernetes APIs.

Index

Constants

View Source
const (
	EnvPodName = "POD_NAME"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MockPodIndexProvider

type MockPodIndexProvider struct {
	mock.Mock
}

MockPodIndexProvider is an autogenerated mock type for the PodIndexProvider type

func (*MockPodIndexProvider) Get

func (_m *MockPodIndexProvider) Get() (string, error)

Get provides a mock function with given fields:

type MockSecret

type MockSecret struct {
	mock.Mock
}

MockSecret is an autogenerated mock type for the Secret type

func (*MockSecret) Get

func (_m *MockSecret) Get() (map[string][]byte, error)

Get provides a mock function with given fields:

func (*MockSecret) Put

func (_m *MockSecret) Put(_a0 map[string][]byte) error

Put provides a mock function with given fields: _a0

type PodIndexProvider

type PodIndexProvider interface {
	Get() (string, error)
}

PodIndexProvider provides pod ordinal index inside StatefulSet.

func NewPodIndexProvider

func NewPodIndexProvider() PodIndexProvider

type Secret

type Secret interface {
	Put(map[string][]byte) error
	Get() (map[string][]byte, error)
}

func NewSecret

func NewSecret(name, namespace string, clientset kubernetes.Interface) Secret

func NewSecretInCluster

func NewSecretInCluster(stateConfig *config.StateConfig) (Secret, error)

NewSecretInCluster creates a Secret that is suitable for eks-connector pods based on stateConfig. The secret will be accessed using in-cluster Kubernetes credentials and suffixed with pod ordinal index in StatefulSet to avoid conflicts.

Jump to

Keyboard shortcuts

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