config

package
v0.0.0-...-45d7e17 Latest Latest
Warning

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

Go to latest
Published: May 21, 2022 License: MIT 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

type Config struct {
	ClusterName             string                  `yaml:"clusterName"`
	Namespaces              map[string]K8SObjects   `yaml:"namespaces"`
	ExternalDNS             ExternalDNS             `yaml:"externalDNS"`
	NginxIngressController  NginxIngressController  `yaml:"nginxIngressController"`
	ModsecIngressController ModsecIngressController `yaml:"modsecIngressController"`
	FilesExist              []string                `yaml:"filesExist"`
}

Config holds the basic structure of test's YAML file

func ParseConfigFile

func ParseConfigFile(f string) (*Config, error)

ParseConfigFile loads the test file supplied

func (*Config) GetExpectedDaemonSets

func (c *Config) GetExpectedDaemonSets() map[string][]string

defaultsFromEnvs process the mandatory fields in the config. If they are not set, it tries to load them from environment variables

func (*Config) GetExpectedServiceMonitors

func (c *Config) GetExpectedServiceMonitors() map[string][]string

GetServiceMonitors process the mandatory fields in the config. If they are not set, it tries to load them from environment variables

func (*Config) GetExpectedServices

func (c *Config) GetExpectedServices() map[string][]string

GetExpectedServices returns a slice of all the services that are expected to be in the cluster.

type ExternalDNS

type ExternalDNS struct {
	NamespacePrefix string `yaml:"namespacePrefix"`
	HostedZoneId    string `yaml:"hostedZoneId"`
	Domain          string `yaml:"domain"`
}

ExternalDNS holds the config for externalDNS component

func (*ExternalDNS) GetNamespaceName

func (e *ExternalDNS) GetNamespaceName() string

GetNamespaceName returns random namespace name, it considers (if set) the prefix specified in the configuration

type K8SObjects

type K8SObjects struct {
	Servicemonitors []string `yaml:"servicemonitors"`
	Daemonsets      []string `yaml:"daemonsets"`
	Services        []string `yaml:"services"`
	Secrets         []string `yaml:"secrets"`
}

K8SObjects are kubernetes objects nested from namespaces, we need to check these resources are checked for its existence

type ModsecIngressController

type ModsecIngressController struct {
	NamespacePrefix string `yaml:"namespacePrefix"`
}

type NginxIngressController

type NginxIngressController struct {
	NamespacePrefix string `yaml:"namespacePrefix"`
}

NginxIngressController holds the config for nginx ingress controller component

Jump to

Keyboard shortcuts

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