config

package
v1.17.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Head = "head"

	DefaultTLSKeyFile = "/tls/tls.key"
	DefaultTLSCrtFile = "/tls/tls.crt"

	ContainerNameSpiceDB = "spicedb"
)

Variables

This section is empty.

Functions

func ApplyPatches added in v1.2.0

func ApplyPatches[K any](object, out K, patches []v1alpha1.Patch, resources openapi.Resources) (int, bool, error)

ApplyPatches applies a set of patches to an object. It returns the number of patches applied, a bool indicating whether there were matching patches and the input differed from the output, and any errors that occurred.

func NewConfig

func NewConfig(cluster *v1alpha1.SpiceDBCluster, globalConfig *OperatorConfig, secret *corev1.Secret, resources openapi.Resources) (*Config, Warning, error)

NewConfig checks that the values in the config + the secret are sane

Types

type Config

type Config struct {
	MigrationConfig
	SpiceConfig
	Patches   []v1alpha1.Patch
	Resources openapi.Resources
}

Config holds all values required to create and manage a cluster. Note: The config object holds values from referenced secrets for hashing purposes; these should not be used directly (instead the secret should be mounted)

func (*Config) Deployment

func (c *Config) Deployment(migrationHash, secretHash string) *applyappsv1.DeploymentApplyConfiguration

func (*Config) MigrationJob

func (c *Config) MigrationJob(migrationHash string) *applybatchv1.JobApplyConfiguration

func (*Config) Role

func (*Config) RoleBinding

func (*Config) Service

func (*Config) ServiceAccount

type MigrationConfig

type MigrationConfig struct {
	TargetMigration        string
	TargetPhase            string
	MigrationLogLevel      string
	DatastoreEngine        string
	DatastoreURI           string
	SpannerCredsSecretRef  string
	TargetSpiceDBImage     string
	EnvPrefix              string
	SpiceDBCmd             string
	DatastoreTLSSecretName string
	SpiceDBVersion         *v1alpha1.SpiceDBVersion
}

MigrationConfig stores data that is relevant for running migrations or deciding if migrations need to be run

type OperatorConfig added in v1.0.0

type OperatorConfig struct {
	ImageName string `json:"imageName,omitempty"`
	updates.UpdateGraph
}

OperatorConfig holds operator-wide config that is used across all objects

func NewOperatorConfig added in v1.1.0

func NewOperatorConfig() OperatorConfig

func (OperatorConfig) Copy added in v1.0.0

func (o OperatorConfig) Copy() OperatorConfig

type RawConfig

type RawConfig map[string]any

RawConfig has not been processed/validated yet

func (RawConfig) Pop

func (r RawConfig) Pop(key string) string

type SpiceConfig

type SpiceConfig struct {
	LogLevel                       string
	SkipMigrations                 bool
	Name                           string
	Namespace                      string
	UID                            string
	Replicas                       int32
	PresharedKey                   string
	EnvPrefix                      string
	SpiceDBCmd                     string
	TLSSecretName                  string
	DispatchEnabled                bool
	DispatchUpstreamCASecretName   string
	DispatchUpstreamCASecretPath   string
	TelemetryTLSCASecretName       string
	SecretName                     string
	ExtraPodLabels                 map[string]string
	ExtraPodAnnotations            map[string]string
	ExtraServiceAccountAnnotations map[string]string
	ServiceAccountName             string
	ProjectLabels                  bool
	ProjectAnnotations             bool
	Passthrough                    map[string]string
}

SpiceConfig contains config relevant to running spicedb or determining if spicedb needs to be updated

type Warning

type Warning error

Warning is an issue with configuration that we will report as undesirable but which don't prevent the cluster from starting (i.e. no TLS config)

Jump to

Keyboard shortcuts

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