config

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSidecarConfig

func NewSidecarConfig(config *Config, log logrus.FieldLogger) *sidecar.Config

Types

type Config

type Config struct {
	AddIntermediatesToBundle bool   `hcl:"add_intermediates_to_bundle"`
	AgentAddress             string `hcl:"agent_address"`
	Cmd                      string `hcl:"cmd"`
	CmdArgs                  string `hcl:"cmd_args"`
	PIDFileName              string `hcl:"pid_file_name"`
	CertDir                  string `hcl:"cert_dir"`
	CertFileMode             int    `hcl:"cert_file_mode"`
	KeyFileMode              int    `hcl:"key_file_mode"`
	JWTBundleFileMode        int    `hcl:"jwt_bundle_file_mode"`
	JWTSVIDFileMode          int    `hcl:"jwt_svid_file_mode"`
	IncludeFederatedDomains  bool   `hcl:"include_federated_domains"`
	RenewSignal              string `hcl:"renew_signal"`
	DaemonMode               *bool  `hcl:"daemon_mode"`

	// x509 configuration
	SVIDFileName       string `hcl:"svid_file_name"`
	SVIDKeyFileName    string `hcl:"svid_key_file_name"`
	SVIDBundleFileName string `hcl:"svid_bundle_file_name"`

	// JWT configuration
	JWTSVIDs          []JWTConfig `hcl:"jwt_svids"`
	JWTBundleFilename string      `hcl:"jwt_bundle_file_name"`

	UnusedKeyPositions map[string][]token.Pos `hcl:",unusedKeyPositions"`
}

func ParseConfig

func ParseConfig(file string) (*Config, error)

ParseConfig parses the given HCL file into a Config struct

func (*Config) ParseConfigFlagOverrides

func (c *Config) ParseConfigFlagOverrides(daemonModeFlag bool, daemonModeFlagName string)

ParseConfigFlagOverrides handles command line arguments that override config file settings

func (*Config) ValidateConfig

func (c *Config) ValidateConfig(log logrus.FieldLogger) error

type JWTConfig

type JWTConfig struct {
	JWTAudience       string   `hcl:"jwt_audience"`
	JWTExtraAudiences []string `hcl:"jwt_extra_audiences"`
	JWTSVIDFilename   string   `hcl:"jwt_svid_file_name"`

	UnusedKeyPositions map[string][]token.Pos `hcl:",unusedKeyPositions"`
}

Jump to

Keyboard shortcuts

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