config

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: EUPL-1.2 Imports: 5 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 {
	DecryptKeyPaths   []string              `yaml:"decryptKeyPaths"`
	Debug             bool                  `yaml:"debug"`
	Capabilities      ConfigCapabilities    `yaml:"capabilities"`
	Whitelist         types.NamespacedName  `yaml:"whitelist"`
	LDAP              ConfigLdap            `yaml:"ldap"`
	ArgoPermissions   ConfigArgoPermissions `yaml:"argopermissions"`
	AppSetNamespace   string                `yaml:"applicationset_namespace"`
	QuotaLabel        string                `yaml:"quota_label"`
	RequestorLabel    string                `yaml:"requestor_label"`
	ManagedByLabel    string                `yaml:"managed_by_label"`
	ExcludeAppSetName string                `yaml:"exclude_appset_name"`
	// Grant permissions to all groups according to config in configmap and role selected per group in paas.
	RoleMappings ConfigRoleMappings `yaml:"rolemappings"`
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig() (config *Config, err error)

func (Config) CapabilityK8sName

func (config Config) CapabilityK8sName(capability string) (as types.NamespacedName)

func (Config) Verify

func (config Config) Verify() error

type ConfigArgoPermissions

type ConfigArgoPermissions struct {
	DefaultPolicy string `yaml:"default_policy,omitempty"`
	ResourceName  string `yaml:"resource_name"`
	Role          string `yaml:"role"`
	Header        string `yaml:"header"`
	Retries       uint   `yaml:"retries"`
}

func (ConfigArgoPermissions) FromGroups

func (ap ConfigArgoPermissions) FromGroups(groups []string) string

func (ConfigArgoPermissions) Verify

func (ap ConfigArgoPermissions) Verify() []string

type ConfigCapPerm added in v0.6.1

type ConfigCapPerm map[string][]string

func (ConfigCapPerm) AsConfigRolesSas added in v0.6.1

func (ccp ConfigCapPerm) AsConfigRolesSas(add bool) ConfigRolesSas

func (ConfigCapPerm) Roles added in v0.6.1

func (ccp ConfigCapPerm) Roles() []string

func (ConfigCapPerm) ServiceAccounts added in v0.6.1

func (ccp ConfigCapPerm) ServiceAccounts() []string

type ConfigCapabilities

type ConfigCapabilities map[string]ConfigCapability

func (ConfigCapabilities) Verify

func (caps ConfigCapabilities) Verify() []string

type ConfigCapability

type ConfigCapability struct {
	AppSet             string              `yaml:"applicationset"`
	QuotaSettings      ConfigQuotaSettings `yaml:"quotas"`
	ExtraPermissions   ConfigCapPerm       `yaml:"extra_permissions"`
	DefaultPermissions ConfigCapPerm       `yaml:"default_permissions"`
}

type ConfigDefaultQuotaSpec added in v0.8.0

type ConfigDefaultQuotaSpec map[string]string

type ConfigLdap

type ConfigLdap struct {
	Host string `yaml:"host"`
	Port int32  `yaml:"port"`
}

func (ConfigLdap) Verify

func (ldap ConfigLdap) Verify() []string

type ConfigQuotaSettings added in v0.8.0

type ConfigQuotaSettings struct {
	Clusterwide bool                   `yaml:"clusterwide"`
	Ratio       float64                `yaml:"ratio"`
	DefQuota    ConfigDefaultQuotaSpec `yaml:"defaults"`
	MinQuotas   ConfigDefaultQuotaSpec `yaml:"min"`
	MaxQuotas   ConfigDefaultQuotaSpec `yaml:"max"`
}

type ConfigRoleMappings added in v0.6.0

type ConfigRoleMappings map[string][]string

func (ConfigRoleMappings) Roles added in v0.6.0

func (crm ConfigRoleMappings) Roles(roleMaps []string) []string

type ConfigRolesSas added in v0.6.1

type ConfigRolesSas map[string]map[string]bool

This is a insoudeout representation of ConfigCapPerm, closer to rb representation

func (ConfigRolesSas) Merge added in v0.6.1

func (crs ConfigRolesSas) Merge(other ConfigRolesSas) ConfigRolesSas

Jump to

Keyboard shortcuts

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