config

package
v0.23.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2026 License: Apache-2.0 Imports: 2 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 {
	FGA                              FGAConfig         `mapstructure:",squash"`
	KCP                              KCPConfig         `mapstructure:",squash"`
	APIExportEndpointSliceName       string            `mapstructure:"api-export-endpoint-slice-name" default:"core.platform-mesh.io"`
	CoreModulePath                   string            `mapstructure:"core-module-path"`
	BaseDomain                       string            `mapstructure:"base-domain" default:"portal.dev.local:8443"`
	GroupClaim                       string            `mapstructure:"group-claim" default:"groups"`
	UserClaim                        string            `mapstructure:"user-claim" default:"email"`
	DevelopmentAllowUnverifiedEmails bool              `mapstructure:"development-allow-unverified-emails" default:"false"`
	WorkspacePath                    string            `mapstructure:"workspace-path" default:"root"`
	WorkspaceTypeName                string            `mapstructure:"workspace-type-name" default:"security"`
	DomainCALookup                   bool              `mapstructure:"domain-ca-lookup" default:"false"`
	MigrateAuthorizationModels       bool              `mapstructure:"migrate-authorization-models" default:"false"`
	HttpClientTimeoutSeconds         int               `mapstructure:"http-client-timeout-seconds" default:"30"`
	SetDefaultPassword               bool              `mapstructure:"set-default-password" default:"false"`
	AllowMemberTuplesEnabled         bool              `mapstructure:"allow-member-tuples-enabled" default:"false"`
	IDP                              IDPConfig         `mapstructure:",squash"`
	Invite                           InviteConfig      `mapstructure:",squash"`
	Initializer                      InitializerConfig `mapstructure:",squash"`
	Webhooks                         WebhooksConfig    `mapstructure:",squash"`
}

Config struct to hold the app config

func NewConfig added in v0.23.1

func NewConfig() Config

func (*Config) AddFlags added in v0.23.1

func (c *Config) AddFlags(fs *pflag.FlagSet)

func (Config) InitializerName added in v0.6.0

func (config Config) InitializerName() string

func (Config) TerminatorName added in v0.22.13

func (config Config) TerminatorName() string

type FGAConfig added in v0.23.1

type FGAConfig struct {
	Target          string `mapstructure:"fga-target"`
	ObjectType      string `mapstructure:"fga-object-type" default:"core_platform-mesh_io_account"`
	ParentRelation  string `mapstructure:"fga-parent-relation" default:"parent"`
	CreatorRelation string `mapstructure:"fga-creator-relation" default:"owner"`
}

type IDPConfig added in v0.23.1

type IDPConfig struct {
	RealmDenyList []string `mapstructure:"idp-realm-deny-list"`

	SMTPServer  string `mapstructure:"idp-smtp-server"`
	SMTPPort    int    `mapstructure:"idp-smtp-port"`
	FromAddress string `mapstructure:"idp-from-address"`

	SSL      bool `mapstructure:"idp-smtp-ssl" default:"false"`
	StartTLS bool `mapstructure:"idp-smtp-starttls" default:"false"`

	SMTPUser     string `mapstructure:"idp-smtp-user"`
	SMTPPassword string `mapstructure:"idp-smtp-password"`

	AdditionalRedirectURLs    []string `mapstructure:"idp-additional-redirect-urls"`
	KubectlClientRedirectURLs []string `mapstructure:"idp-kubectl-client-redirect-urls" default:"http://localhost:8000,http://localhost:18000"`

	AccessTokenLifespan int  `mapstructure:"idp-access-token-lifespan" default:"28800"`
	RegistrationAllowed bool `mapstructure:"idp-registration-allowed" default:"false"`
}

type InitContainerClientConfig added in v0.16.0

type InitContainerClientConfig struct {
	Name      string                 `mapstructure:"name" yaml:"name"`
	SecretRef corev1.SecretReference `mapstructure:"secretRef" yaml:"secretRef"`
}

type InitContainerConfig added in v0.16.0

type InitContainerConfig struct {
	ConfigFile string `mapstructure:"config-file" default:"/config/config.yaml"`
}

func NewInitContainerConfig added in v0.23.1

func NewInitContainerConfig() InitContainerConfig

func (*InitContainerConfig) AddFlags added in v0.23.1

func (c *InitContainerConfig) AddFlags(fs *pflag.FlagSet)

type InitContainerConfiguration added in v0.16.0

type InitContainerConfiguration struct {
	KeycloakBaseURL  string                      `mapstructure:"keycloakBaseURL"`
	KeycloakClientID string                      `mapstructure:"keycloakClientID" default:"admin-cli"`
	KeycloakUser     string                      `mapstructure:"keycloakUser" default:"admin"`
	PasswordFile     string                      `mapstructure:"passwordFile" default:"/secrets/keycloak-password"`
	Clients          []InitContainerClientConfig `mapstructure:"clients"`
}

type InitializerConfig added in v0.21.1

type InitializerConfig struct {
	WorkspaceInitializerEnabled bool `mapstructure:"initializer-workspace-enabled" default:"true"`
	IDPEnabled                  bool `mapstructure:"initializer-idp-enabled" default:"true"`
	InviteEnabled               bool `mapstructure:"initializer-invite-enabled" default:"true"`
	WorkspaceAuthEnabled        bool `mapstructure:"initializer-workspace-auth-enabled" default:"true"`
}

type InviteConfig added in v0.7.1

type InviteConfig struct {
	KeycloakBaseURL      string `mapstructure:"invite-keycloak-base-url"`
	KeycloakClientID     string `mapstructure:"invite-keycloak-client-id" default:"security-operator"`
	KeycloakClientSecret string `mapstructure:"invite-keycloak-client-secret"`
}

type KCPConfig added in v0.23.1

type KCPConfig struct {
	Kubeconfig string `mapstructure:"kcp-kubeconfig" default:"/api-kubeconfig/kubeconfig"`
}

type WebhooksConfig added in v0.22.9

type WebhooksConfig struct {
	Enabled bool   `mapstructure:"webhooks-enabled" default:"false"`
	Port    int    `mapstructure:"webhooks-port" default:"9443"`
	CertDir string `mapstructure:"webhooks-cert-dir" default:"/tmp/k8s-webhook-server/serving-certs"`
}

Jump to

Keyboard shortcuts

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