config

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 26 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Scheme = scheme.Scheme
)

Functions

This section is empty.

Types

type Config

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

Config is populated from the cluster's Secret or ConfigMap and sets behavior of kapp-controller. NOTE because config may be populated from a Secret use caution if you're tempted to serialize.

func NewConfig added in v0.38.2

func NewConfig(client kubernetes.Interface) (*Config, error)

NewConfig populates the Config struct from k8s resources. NewConfig prefers a secret named kcConfigName but if that does not exist falls back to a configMap of same name.

func (*Config) AppDefaultSyncPeriod added in v0.41.0

func (gc *Config) AppDefaultSyncPeriod() time.Duration

AppDefaultSyncPeriod returns duration that is used by Apps that do not explicitly specify sync period.

func (*Config) AppMinimumSyncPeriod added in v0.41.0

func (gc *Config) AppMinimumSyncPeriod() time.Duration

AppMinimumSyncPeriod returns duration that is used as a lowest sync period App would use for reconciliation. This value takes precedence over any sync period that is lower.

func (*Config) CACerts added in v0.38.0

func (gc *Config) CACerts() string

CACerts returns configured CA certificates in PEM format.

func (*Config) KappDeployRawOptions added in v0.37.0

func (gc *Config) KappDeployRawOptions() []string

KappDeployRawOptions returns user configured kapp raw options

func (*Config) PackageInstallDefaultSyncPeriod added in v0.47.0

func (gc *Config) PackageInstallDefaultSyncPeriod() time.Duration

PackageInstallDefaultSyncPeriod returns duration that is used by Apps that do not explicitly specify sync period.

func (*Config) ProxyOpts added in v0.38.0

func (gc *Config) ProxyOpts() ProxyOpts

ProxyOpts returns configured proxy configuration.

func (*Config) Reload added in v0.38.2

func (gc *Config) Reload() error

Reload reloads configuration (proxy, CA certs, etc.) from ConfigMap/Secret. All configuration is cleared if ConfigMap or Secret are not found.

func (*Config) ShouldSkipTLSForAuthority added in v0.30.3

func (gc *Config) ShouldSkipTLSForAuthority(candidateAuthority string) bool

ShouldSkipTLSForAuthority compares a candidate host or host:port against a stored set of allow-listed authorities. the allow-list is built from the user-facing flag `dangerousSkipTLSVerify`. Note that in some cases the allow-list may contain ports, so the function name could also be ShouldSkipTLSForDomainAndPort Note that "authority" is defined in: https://www.rfc-editor.org/rfc/rfc3986#section-3 to mean "host and port"

type OSConfig added in v0.38.0

type OSConfig interface {
	ApplyCACerts(string) error
	ApplyProxy(ProxyOpts) error
}

OSConfig configures runtime environment with necessary CA certificates and proxy configuration.

type ProxyOpts added in v0.38.0

type ProxyOpts struct {
	HTTPProxy  string
	HTTPSProxy string
	NoProxy    string
}

ProxyOpts contains proxy configuration for the system.

type Reconciler added in v0.36.0

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

Reconciler is responsible for reconciling kapp-controllers config.

func NewReconciler added in v0.36.0

func NewReconciler(coreClient kubernetes.Interface,
	config *Config, osConfig OSConfig, log logr.Logger) *Reconciler

NewReconciler constructs new Reconciler.

func (*Reconciler) AttachWatches added in v0.36.0

func (r *Reconciler) AttachWatches(controller controller.Controller, ns string, mgr manager.Manager) error

AttachWatches configures watches needed for reconciler to reconcile the kapp-controller Config.

func (*Reconciler) Reconcile added in v0.36.0

func (r *Reconciler) Reconcile(_ context.Context, request reconcile.Request) (reconcile.Result, error)

Reconcile gets the current config from the cluster and applies any changes.

Jump to

Keyboard shortcuts

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