config

package
v1.6.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v1.6.0

type Config struct {
	StorageArrayConfig     []StorageArrayConfig     `yaml:"storageArrays" mapstructure:"storageArrays"`
	ManagementServerConfig []ManagementServerConfig `yaml:"managementServers" mapstructure:"managementServers"`
}

Config - represents proxy configuration in the config file

type ManagementServer

type ManagementServer struct {
	URL                       url.URL
	StorageArrayIdentifiers   []string
	Credentials               common.Credentials
	CredentialSecret          string
	SkipCertificateValidation bool
	CertFile                  string
	CertSecret                string
	Limits                    common.Limits
}

ManagementServer - represents a Management Server (formed using ManagementServerConfig)

type ManagementServerConfig

type ManagementServerConfig struct {
	URL                       string        `yaml:"url"`
	ArrayCredentialSecret     string        `yaml:"arrayCredentialSecret,omitempty"`
	SkipCertificateValidation bool          `yaml:"skipCertificateValidation,omitempty"`
	CertSecret                string        `yaml:"certSecret,omitempty"`
	Limits                    common.Limits `yaml:"limits,omitempty" mapstructure:"limits"`
}

ManagementServerConfig - represents a management server configuration for the management server

type ProxyConfig

type ProxyConfig struct {
	Port        string
	ProxyConfig *ReverseProxyConfig
}

ProxyConfig - represents the configuration of Proxy (formed using ProxyConfigMap)

func NewProxyConfig

func NewProxyConfig(configMap *ProxyConfigMap, k8sUtils k8sutils.UtilsInterface) (*ProxyConfig, error)

NewProxyConfig - returns a new proxy config given a proxy config map

func (*ProxyConfig) ParseConfig

func (proxyConfig *ProxyConfig) ParseConfig(proxyConfigMap ProxyConfigMap, k8sUtils k8sutils.UtilsInterface) error

ParseConfig - Parses a given proxy config map

type ProxyConfigMap

type ProxyConfigMap struct {
	Port             string  `yaml:"port,omitempty"`
	LogLevel         string  `yaml:"logLevel,omitempty"`
	LogFormat        string  `yaml:"logFormat,omitempty"`
	StandAloneConfig *Config `yaml:"standAloneConfig,omitempty" mapstructure:"standAloneConfig"`
	Config           *Config `yaml:"config,omitempty" mapstructure:"config"`
}

ProxyConfigMap - represents the configuration file

func ReadConfig

func ReadConfig(configFile string) (*ProxyConfigMap, error)

ReadConfig - uses viper to read the config from the config map

type ProxyCredentialSecret

type ProxyCredentialSecret struct {
	Credentials      common.Credentials
	CredentialSecret string
}

ProxyCredentialSecret is used for storing a credential for a secret

type ProxyUser

type ProxyUser struct {
	StorageArrayIdentifiers []string
	ProxyCredential         common.Credentials
}

ProxyUser - used for storing a proxy user and list of associated storage array identifiers

type ReverseProxyConfig added in v1.6.0

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

ReverseProxyConfig - represents reverse proxy config

func (*ReverseProxyConfig) GetManagedArraysAndServers added in v1.6.0

func (proxy *ReverseProxyConfig) GetManagedArraysAndServers() map[string]StorageArrayServer

GetManagedArraysAndServers returns a list of arrays with their corresponding management servers

func (*ReverseProxyConfig) GetManagementServers added in v1.6.0

func (proxy *ReverseProxyConfig) GetManagementServers() []ManagementServer

GetManagementServers - Returns the list of management servers present in ReverseProxyConfig

func (*ReverseProxyConfig) GetStorageArray added in v1.6.0

func (proxy *ReverseProxyConfig) GetStorageArray(storageArrayID string) []StorageArray

GetStorageArray - Returns a list of storage array given a storage array id

type StorageArray

type StorageArray struct {
	StorageArrayIdentifier string
	PrimaryURL             url.URL
	SecondaryURL           url.URL
	ProxyCredentialSecrets map[string]ProxyCredentialSecret
}

StorageArray represents a StorageArray (formed using StorageArrayConfig)

type StorageArrayConfig

type StorageArrayConfig struct {
	StorageArrayID         string   `yaml:"storageArrayId"`
	PrimaryURL             string   `yaml:"primaryURL"`
	BackupURL              string   `yaml:"backupURL,omitempty"`
	ProxyCredentialSecrets []string `yaml:"proxyCredentialSecrets"`
}

StorageArrayConfig represents the configuration of a storage array in the config file

type StorageArrayServer

type StorageArrayServer struct {
	Array         StorageArray
	PrimaryServer ManagementServer
	BackupServer  *ManagementServer
}

StorageArrayServer represents an array with its primary and backup management server

Jump to

Keyboard shortcuts

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