k8s

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllowPrivateUpstreams bool

AllowPrivateUpstreams disables the SSRF dial-time guard when true. Set by cmd/credentialproxy/main.go from config.

Functions

func BuildMergedKubeconfig

func BuildMergedKubeconfig(
	bindings []*provider.BindingMeta,
	proxyToken string,
	credproxyURL string,
) (*provider.SandboxConfigFile, error)

BuildMergedKubeconfig generates a merged kubeconfig that routes all cluster traffic through the credential proxy. Pure function: no I/O.

func IsPrivateIP

func IsPrivateIP(ip net.IP) bool

IsPrivateIP reports whether ip falls in any private/reserved range.

func ParseKubeconfig

func ParseKubeconfig(_ string, raw []byte) (*provider.UploadResult, error)

ParseKubeconfig validates an uploaded kubeconfig yaml and extracts the fields to persist.

Types

type K8sProvider

type K8sProvider struct{}

K8sProvider implements provider.Provider for Kubernetes API servers.

func (*K8sProvider) BuildSandboxConfig

func (p *K8sProvider) BuildSandboxConfig(
	bindings []*provider.BindingMeta,
	proxyToken string,
	credproxyPublicURL string,
) ([]*provider.SandboxConfigFile, error)

func (*K8sProvider) Kind

func (p *K8sProvider) Kind() string

func (*K8sProvider) ParseUpload

func (p *K8sProvider) ParseUpload(contentType string, raw []byte) (*provider.UploadResult, error)

func (*K8sProvider) ServeHTTP

Jump to

Keyboard shortcuts

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