Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentConfiguration ¶
type AgentConfiguration struct { // Log is the log options struct for zap logger Log *log.Options `json:"log,omitempty"` }
AgentConfiguration is the agent configuration.
func NewAgentConfiguration ¶
func NewAgentConfiguration() *AgentConfiguration
NewAgentConfiguration create AgentConfiguration
func (*AgentConfiguration) AddFlags ¶
func (c *AgentConfiguration) AddFlags(fs *pflag.FlagSet)
AddFlags adds flags for a specific configuration to the specified FlagSet
func (*AgentConfiguration) SetDefaults ¶
func (c *AgentConfiguration) SetDefaults()
SetDefaults sets the default values for a specific configuration.
func (*AgentConfiguration) Validate ¶
func (c *AgentConfiguration) Validate() (errs error)
Validate validates a specific configuration.
type Configuration ¶
type Configuration struct { // Log is the log options struct for zap logger Log *log.Options `json:"log,omitempty"` // Manager is the controller-manager options for controller-runtime Manager *ManagerOptions `json:"manager,omitempty"` }
Configuration is the controller configuration.
func NewConfiguration ¶
func NewConfiguration() *Configuration
NewConfiguration create Configuration
func (*Configuration) AddFlags ¶
func (c *Configuration) AddFlags(fs *pflag.FlagSet)
AddFlags adds flags for a specific configuration to the specified FlagSet
func (*Configuration) SetDefaults ¶
func (c *Configuration) SetDefaults()
SetDefaults sets the default values for a specific configuration.
func (*Configuration) Validate ¶
func (c *Configuration) Validate() (errs error)
Validate validates a specific configuration.
type ManagerOptions ¶
type ManagerOptions struct { // LeaderElection determines whether to use leader election when // starting the manager. LeaderElection bool `json:"leaderElection"` // LeaderElectionResourceLock determines which resource lock to use for leader election, // defaults to "leases". Change this value only if you know what you are doing. LeaderElectionResourceLock string `json:"leaderElectionResourceLock"` // LeaderElectionNamespace determines the namespace in which the leader // election resource will be created. LeaderElectionNamespace string `json:"leaderElectionNamespace"` // LeaderElectionID determines the name of the resource that leader election // will use for holding the leader lock. LeaderElectionID string `json:"leaderElectionID"` // LeaderElectionReleaseOnCancel defines if the leader should step down voluntarily // when the Manager ends. This requires the binary to immediately end when the // Manager is stopped, otherwise this setting is unsafe. Setting this significantly // speeds up voluntary leader transitions as the new leader doesn't have to wait // LeaseDuration time first. LeaderElectionReleaseOnCancel bool `json:"leaderElectionReleaseOnCancel"` // LeaseDuration is the duration that non-leader candidates will // wait to force acquire leadership. This is measured against time of // last observed ack. Default is 15 seconds. LeaseDuration time.Duration `json:"leaseDuration"` // RenewDeadline is the duration that the acting controlPlane will retry // refreshing leadership before giving up. Default is 10 seconds. RenewDeadline time.Duration `json:"renewDeadline"` // RetryPeriod is the duration the LeaderElector clients should wait // between tries of actions. Default is 2 seconds. RetryPeriod time.Duration `json:"retryPeriod"` // SecureServing enables serving metrics via https. // Per default metrics will be served via http. MetricsSecureServing bool `json:"metricsSecureServing"` // BindAddress is the bind address for the metrics server. // It will be defaulted to ":8080" if unspecified. // Set this to "0" to disable the metrics server. MetricsBindAddress string `json:"metricsBindAddress"` // CertDir is the directory that contains the server key and certificate. Defaults to // <temp-dir>/k8s-metrics-server/serving-certs. // // Note: This option is only used when TLSOpts does not set GetCertificate. // Note: If certificate or key doesn't exist a self-signed certificate will be used. MetricsCertDir string `json:"metricsCertDir"` // CertName is the server certificate name. Defaults to tls.crt. // // Note: This option is only used when TLSOpts does not set GetCertificate. // Note: If certificate or key doesn't exist a self-signed certificate will be used. MetricsCertName string `json:"metricsCertName"` // KeyName is the server key name. Defaults to tls.key. // // Note: This option is only used when TLSOpts does not set GetCertificate. // Note: If certificate or key doesn't exist a self-signed certificate will be used. MetricsKeyName string `json:"metricsKeyName"` // WebhookBindAddress is the address that the server will listen on. // Defaults to "" - all addresses. WebhookBindAddress string `json:"webhookBindAddress"` // CertDir is the directory that contains the server key and certificate. Defaults to // <temp-dir>/k8s-webhook-server/serving-certs. WebhookCertDir string `json:"webhookCertDir"` // CertName is the server certificate name. Defaults to tls.crt. WebhookCertName string `json:"webhookCertName"` // KeyName is the server key name. Defaults to tls.key. // // Note: This option is only used when TLSOpts does not set GetCertificate. WebhookKeyName string `json:"webhookKeyName"` // ClientCAName is the CA certificate name which server used to verify remote(client)'s certificate. // Defaults to "", which means server does not verify client's certificate. WebhookClientCAName string `json:"webhookClientCAName"` // HealthProbeBindAddress is the TCP address that the controller should bind to // for serving health probes // It can be set to "0" or "" to disable serving the health probe. HealthProbeBindAddress string `json:"healthProbeBindAddress"` // PprofBindAddress is the TCP address that the controller should bind to // for serving pprof. // It can be set to "" or "0" to disable the pprof serving. // Since pprof may contain sensitive information, make sure to protect it // before exposing it to public. PprofBindAddress string `json:"pprofBindAddress"` // GracefulShutdownTimeout is the duration given to runnable and to stop before the manager actually returns on stop. // To disable graceful shutdown, set to time.Duration(0) // To use graceful shutdown without timeout, set to a negative duration, e.G. time.Duration(-1) // The graceful shutdown is skipped for safety reasons in case the leader election lease is lost. GracefulShutdownTimeout time.Duration `json:"gracefulShutdownTimeout"` // PodTemplate The path to the pod template file for the FRP client, which will be used to generate pods PodTemplate string `json:"PodTemplate"` }
ManagerOptions contains the configuration for the manager.
func (*ManagerOptions) AddFlags ¶
func (o *ManagerOptions) AddFlags(fs *pflag.FlagSet)
AddFlags add related command line parameters
func (*ManagerOptions) SetDefaults ¶
func (o *ManagerOptions) SetDefaults()
SetDefaults set default values for manager options.
func (*ManagerOptions) Validate ¶
func (o *ManagerOptions) Validate() (err error)
Validate validates the frpc service options.