Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ServiceAccountTokenPath is the path to the service account token file in a Kubernetes pod. ServiceAccountTokenPath = "/var/run/secrets/kubernetes.io/serviceaccount/token" // NamespacePath is the path to the namespace file in a Kubernetes pod. NamespacePath = "/var/run/secrets/kubernetes.io/serviceaccount/namespace" )
Variables ¶
View Source
var (
ErrLoadingConfig = errors.New("error loading kube config")
)
Functions ¶
This section is empty.
Types ¶
type SecretController ¶
type SecretController struct {
// contains filtered or unexported fields
}
SecretController watches secrets for updates and updates the configuration with the loaded data.
func NewSecretController ¶
func NewSecretController(cfg *configv1.Config) *SecretController
NewSecretController creates a new k8s Controller that loads secrets from Kubernetes and updates the configuration with the loaded data.
func (*SecretController) Name ¶
func (s *SecretController) Name() string
Name implements run.PreRunner
func (*SecretController) PreRun ¶
func (s *SecretController) PreRun() error
PreRun saves the original configuration in PreRun phase because the configuration is loaded from the file in the config Validate phase.
func (*SecretController) ServeContext ¶
func (s *SecretController) ServeContext(ctx context.Context) error
ServeContext starts the controller manager and watches secrets for updates.
Click to show internal directories.
Click to hide internal directories.