components

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveValidatorConfig

func SaveValidatorConfig(c *ValidatorConfig, taskConfig *cfg.TaskConfig) error

SaveValidatorConfig saves a validator configuration file to disk

Types

type AWSPluginConfig

type AWSPluginConfig struct {
	Enabled            bool                   `yaml:"enabled"`
	Release            *validator.HelmRelease `yaml:"helmRelease"`
	ReleaseSecret      *Secret                `yaml:"helmReleaseSecret"`
	AccessKeyId        string                 `yaml:"accessKeyId,omitempty"`
	SecretAccessKey    string                 `yaml:"secretAccessKey,omitempty"`
	SessionToken       string                 `yaml:"sessionToken,omitempty"`
	ServiceAccountName string                 `yaml:"serviceAccountName,omitempty"`
	IamCheck           *IamCheck              `yaml:"iamCheck"`
	Validator          *aws.AwsValidatorSpec  `yaml:"validator"`
}

type AzurePluginConfig

type AzurePluginConfig struct {
	Enabled                bool                                 `yaml:"enabled"`
	Release                *validator.HelmRelease               `yaml:"helmRelease"`
	ReleaseSecret          *Secret                              `yaml:"helmReleaseSecret"`
	ServiceAccountName     string                               `yaml:"serviceAccountName,omitempty"`
	TenantID               string                               `yaml:"tenantId"`
	ClientID               string                               `yaml:"clientId"`
	ClientSecret           string                               `yaml:"clientSecret"`
	RuleTypes              map[int]string                       `yaml:"ruleTypes"`
	PlacementTypes         map[int]string                       `yaml:"placementTypes"`
	StaticDeploymentTypes  map[int]string                       `yaml:"staticDeploymentTypes"`
	StaticDeploymentValues map[int]*AzureStaticDeploymentValues `yaml:"staticDeploymentValues"`
	Validator              *azure.AzureValidatorSpec            `yaml:"validator"`
}

type AzureStaticDeploymentValues

type AzureStaticDeploymentValues struct {
	Subscription   string `yaml:"subscriptionUuid"`
	ResourceGroup  string `yaml:"resourceGroupUuid"`
	VirtualNetwork string `yaml:"virtualNetworkUuid"`
	Subnet         string `yaml:"subnetUuid"`
	ComputeGallery string `yaml:"computeGalleryUuid"`
}

type IamCheck

type IamCheck struct {
	Enabled     bool             `yaml:"enabled"`
	IamRoleName string           `yaml:"iamRoleName"`
	Type        cfg.IamCheckType `yaml:"type"`
}

type KindConfig

type KindConfig struct {
	UseKindCluster  bool   `yaml:"useKindCluster"`
	KindClusterName string `yaml:"kindClusterName"`
}

type NetworkPluginConfig

type NetworkPluginConfig struct {
	Enabled       bool                          `yaml:"enabled"`
	Release       *validator.HelmRelease        `yaml:"helmRelease"`
	ReleaseSecret *Secret                       `yaml:"helmReleaseSecret"`
	Validator     *network.NetworkValidatorSpec `yaml:"validator"`
}

type OCIPluginConfig

type OCIPluginConfig struct {
	Enabled          bool                   `yaml:"enabled"`
	Release          *validator.HelmRelease `yaml:"helmRelease"`
	ReleaseSecret    *Secret                `yaml:"helmReleaseSecret"`
	Secrets          []*Secret              `yaml:"secrets,omitempty"`
	PublicKeySecrets []*PublicKeySecret     `yaml:"publicKeySecrets,omitempty"`
	CaCertPaths      map[int]string         `yaml:"caCertPaths,omitempty"`
	Validator        *oci.OciValidatorSpec  `yaml:"validator"`
}

type ProxyConfig

type ProxyConfig struct {
	Enabled bool     `yaml:"enabled"`
	Env     *env.Env `yaml:"env"`
}

type PublicKeySecret

type PublicKeySecret struct {
	Name string   `yaml:"name"`
	Keys []string `yaml:"keys"`
}

type Secret

type Secret struct {
	Name       string `yaml:"name"`
	Username   string `yaml:"username"`
	Password   string `yaml:"password"`
	CaCertFile string `yaml:"caCertFile"`
	Exists     bool   `yaml:"exists"`
}

func (*Secret) ShouldCreate

func (s *Secret) ShouldCreate() bool

type SinkConfig

type SinkConfig struct {
	Enabled      bool              `yaml:"enabled"`
	CreateSecret bool              `yaml:"createSecret"`
	SecretName   string            `yaml:"secretName"`
	Type         string            `yaml:"type"`
	Values       map[string]string `yaml:"values"`
}

type ValidatorConfig

type ValidatorConfig struct {
	Release          *validator.HelmRelease `yaml:"helmRelease"`
	ReleaseSecret    *Secret                `yaml:"helmReleaseSecret"`
	KindConfig       KindConfig             `yaml:"kindConfig"`
	Kubeconfig       string                 `yaml:"kubeconfig"`
	SinkConfig       *SinkConfig            `yaml:"sinkConfig"`
	ProxyConfig      *ProxyConfig           `yaml:"proxyConfig"`
	ImageRegistry    string                 `yaml:"imageRegistry"`
	UseFixedVersions bool                   `yaml:"useFixedVersions"`

	AWSPlugin     *AWSPluginConfig     `yaml:"awsPlugin,omitempty"`
	NetworkPlugin *NetworkPluginConfig `yaml:"networkPlugin,omitempty"`
	OCIPlugin     *OCIPluginConfig     `yaml:"ociPlugin,omitempty"`
	VspherePlugin *VspherePluginConfig `yaml:"vspherePlugin,omitempty"`
	AzurePlugin   *AzurePluginConfig   `yaml:"azurePlugin,omitempty"`
}

func LoadValidatorConfig

func LoadValidatorConfig(taskConfig *cfg.TaskConfig) (*ValidatorConfig, error)

LoadValidatorConfig loads a validator configuration file from disk

func NewValidatorConfig

func NewValidatorConfig() *ValidatorConfig

func NewValidatorFromConfig

func NewValidatorFromConfig(taskConfig *cfg.TaskConfig) (*ValidatorConfig, error)

NewValidatorFromConfig loads a validator configuration file from disk and decrypts it

func (*ValidatorConfig) AnyPluginEnabled

func (c *ValidatorConfig) AnyPluginEnabled() bool

type VsphereEntityPrivilegeRule

type VsphereEntityPrivilegeRule struct {
	vsphere.EntityPrivilegeValidationRule `yaml:",inline"`
	ClusterScoped                         bool   `yaml:"clusterScoped"`
	RuleType                              string `yaml:"ruleType"`
}

type VspherePluginConfig

type VspherePluginConfig struct {
	Enabled                     bool                               `yaml:"enabled"`
	Release                     *validator.HelmRelease             `yaml:"helmRelease"`
	ReleaseSecret               *Secret                            `yaml:"helmReleaseSecret"`
	Account                     *vsphere_cloud.VsphereCloudAccount `yaml:"account"`
	Validator                   *vsphere.VsphereValidatorSpec      `yaml:"validator"`
	VsphereEntityPrivilegeRules []VsphereEntityPrivilegeRule       `yaml:"vsphereEntityPrivilegeRules"`
	VsphereRolePrivilegeRules   []VsphereRolePrivilegeRule         `yaml:"vsphereRolePrivilegeRules"`
	VsphereTagRules             []VsphereTagRule                   `yaml:"vsphereTagRules"`
}

type VsphereRolePrivilegeRule

type VsphereRolePrivilegeRule struct {
	vsphere.GenericRolePrivilegeValidationRule `yaml:",inline"`
	Name                                       string `yaml:"name"`
}

type VsphereTagRule

type VsphereTagRule struct {
	vsphere.TagValidationRule `yaml:",inline"`
	RuleType                  string `yaml:"ruleType"`
}

Jump to

Keyboard shortcuts

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