k8s

package
v0.0.0-...-147d02d Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ANNOTATION_VAULT_DB_PATH  string = "db-creds-injector.numberly.io/cluster"
	ANNOTATION_ROLE           string = "db-creds-injector.numberly.io/role"
	ANNOTATION_MODE           string = "db-creds-injector.numberly.io/mode" // DEFAULT_TO : classic. can be : classic, uri, file
	ANNOTATION_VAULT_POD_UUID string = "db-creds-injector.numberly.io/uuid"
)

Variables

This section is empty.

Functions

func GetServiceAccountTokenImpl

func GetServiceAccountTokenImpl(tokenFilePath string) (string, error)

Types

type Client

type Client struct{}

func NewClient

func NewClient() *Client

func (*Client) GetKubernetesCACert

func (c *Client) GetKubernetesCACert() (*x509.CertPool, error)

func (*Client) GetKubernetesClient

func (c *Client) GetKubernetesClient() (*kubernetes.Clientset, error)

func (*Client) GetServiceAccountToken

func (c *Client) GetServiceAccountToken() (string, error)

type ClientInterface

type ClientInterface interface {
	GetServiceAccountToken() (string, error)
	GetKubernetesCACert() (*x509.CertPool, error)
	GetKubernetesClient() (*kubernetes.Clientset, error)
}

type DbConfiguration

type DbConfiguration struct {
	DbURIEnvKey      string
	DbUserEnvKey     string
	DbPasswordEnvKey string
	DbName           string
	Mode             string
	Template         string
	Role             string
}

type KubernetesClient

type KubernetesClient interface {
	CoreV1() v1.CoreV1Interface
}

type Parser

type Parser interface {
	GetPodDbConfig() (*podDbConfig, error)
}

type ParserService

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

func NewService

func NewService(cfg config.Config, pod *corev1.Pod) *ParserService

func (*ParserService) GetPodDbConfig

func (s *ParserService) GetPodDbConfig() (*podDbConfig, error)

type PodInformations

type PodInformations struct {
	PodNameUUIDs       []string
	Namespace          string
	ServiceAccountName string
	PodName            string
	NodeName           string
}

type PodService

type PodService interface {
	GetAllPodAndNamespace(ctx context.Context) ([]PodInformations, error)
}

func NewPodService

func NewPodService(clientset KubernetesClient, cfg *config.Config) PodService

Jump to

Keyboard shortcuts

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