options

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Resync           ResyncConfig
	Serving          ServingConfig
	WorkloadIdentity WorkloadIdentityConfig
}

Config has all the context to run the discovery server.

type Options

type Options struct {
	ResyncOptions           ResyncOptions
	ServingOptions          ServingOptions
	WorkloadIdentityOptions WorkloadIdentityOptions
}

Options contain the server options.

func NewOptions

func NewOptions() *Options

NewOptions return options with default values.

func (*Options) AddFlags

func (o *Options) AddFlags(fs *pflag.FlagSet)

AddFlags adds server options to flagset

func (*Options) ApplyTo

func (o *Options) ApplyTo(server *Config) error

ApplyTo applies the options to the configuration.

func (*Options) Validate

func (o *Options) Validate() []error

Validate checks if options are valid.

type ResyncConfig

type ResyncConfig struct {
	Duration time.Duration
}

ResyncConfig holds configurations regarding the resync interval between reconciliations.

type ResyncOptions

type ResyncOptions struct {
	Duration time.Duration
}

ResyncOptions holds options regarding the resync interval between reconciliations.

func (*ResyncOptions) AddFlags

func (o *ResyncOptions) AddFlags(fs *pflag.FlagSet)

AddFlags adds the ResyncOptions flags to the flagset.

func (*ResyncOptions) ApplyTo

func (o *ResyncOptions) ApplyTo(c *ResyncConfig) error

ApplyTo applies the options to the configuration.

func (*ResyncOptions) Validate

func (o *ResyncOptions) Validate() []error

Validate checks if options are valid.

type ServingConfig

type ServingConfig struct {
	Address string

	TLSCertFile string
	TLSKeyFile  string
}

ServingConfig has the context to run an http server.

type ServingOptions

type ServingOptions struct {
	TLSCertFile string
	TLSKeyFile  string

	Address string
	Port    uint
}

ServingOptions are options applied to the discovery server.

func (*ServingOptions) AddFlags

func (o *ServingOptions) AddFlags(fs *pflag.FlagSet)

AddFlags adds server options to flagset

func (*ServingOptions) ApplyTo

func (o *ServingOptions) ApplyTo(c *ServingConfig) error

ApplyTo applies the options to the configuration.

func (*ServingOptions) Validate

func (o *ServingOptions) Validate() []error

Validate checks if options are valid.

type WorkloadIdentityConfig added in v0.2.0

type WorkloadIdentityConfig struct {
	// OpenIDConfig is the workload identity openid configuration.
	OpenIDConfig []byte
	// JWKS is the workload identity JWKS.
	JWKS []byte
	// Enabled indicate whether the discovery server should serve workload identity discovery documents or not.
	Enabled bool
}

WorkloadIdentityConfig holds the configuration regarding the workload identity OIDC discovery documents.

type WorkloadIdentityOptions added in v0.2.0

type WorkloadIdentityOptions struct {
	// OpenIDConfigFile is the path to the file containing the openid configuration.
	OpenIDConfigFile string
	// JWKSFile is the path to the file containing the JWKS.
	JWKSFile string
}

WorkloadIdentityOptions holds the options for the workload identity OIDC discovery documents.

func (*WorkloadIdentityOptions) AddFlags added in v0.2.0

func (o *WorkloadIdentityOptions) AddFlags(fs *pflag.FlagSet)

AddFlags adds workload identity options to flagset

func (*WorkloadIdentityOptions) ApplyTo added in v0.2.0

ApplyTo applies the options to the configuration.

func (*WorkloadIdentityOptions) Validate added in v0.2.0

func (o *WorkloadIdentityOptions) Validate() []error

Validate checks if workload identity options are valid.

Jump to

Keyboard shortcuts

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