Documentation
¶
Index ¶
- Constants
- func NewConfig(nn types.NamespacedName, uid types.UID, globalConfig *OperatorConfig, ...) (*Config, Warning, error)
- func ToEnvVarName(prefix string, key string) string
- type Config
- func (c *Config) Deployment(migrationHash, secretHash string) *applyappsv1.DeploymentApplyConfiguration
- func (c *Config) MigrationJob(migrationHash string) *applybatchv1.JobApplyConfiguration
- func (c *Config) OwnerRef() *applymetav1.OwnerReferenceApplyConfiguration
- func (c *Config) Role() *applyrbacv1.RoleApplyConfiguration
- func (c *Config) RoleBinding() *applyrbacv1.RoleBindingApplyConfiguration
- func (c *Config) Service() *applycorev1.ServiceApplyConfiguration
- func (c *Config) ServiceAccount() *applycorev1.ServiceAccountApplyConfiguration
- func (c *Config) ToEnvVarApplyConfiguration() []*applycorev1.EnvVarApplyConfiguration
- type MigrationConfig
- type OperatorConfig
- type RawConfig
- type SpiceConfig
- type Warning
Constants ¶
const ( DefaultTLSKeyFile = "/tls/tls.key" DefaultTLSCrtFile = "/tls/tls.crt" )
Variables ¶
This section is empty.
Functions ¶
func NewConfig ¶
func NewConfig(nn types.NamespacedName, uid types.UID, globalConfig *OperatorConfig, rawConfig json.RawMessage, secret *corev1.Secret) (*Config, Warning, error)
NewConfig checks that the values in the config + the secret are sane
func ToEnvVarName ¶
ToEnvVarName converts a key from the api object into an env var name. the key isCamelCased will be converted to PREFIX_IS_CAMEL_CASED
Types ¶
type Config ¶
type Config struct {
MigrationConfig
SpiceConfig
}
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) OwnerRef ¶
func (c *Config) OwnerRef() *applymetav1.OwnerReferenceApplyConfiguration
func (*Config) Role ¶
func (c *Config) Role() *applyrbacv1.RoleApplyConfiguration
func (*Config) RoleBinding ¶
func (c *Config) RoleBinding() *applyrbacv1.RoleBindingApplyConfiguration
func (*Config) Service ¶
func (c *Config) Service() *applycorev1.ServiceApplyConfiguration
func (*Config) ServiceAccount ¶
func (c *Config) ServiceAccount() *applycorev1.ServiceAccountApplyConfiguration
func (*Config) ToEnvVarApplyConfiguration ¶ added in v1.0.0
func (c *Config) ToEnvVarApplyConfiguration() []*applycorev1.EnvVarApplyConfiguration
ToEnvVarApplyConfiguration returns a set of env variables to apply to a spicedb container
type MigrationConfig ¶
type MigrationConfig struct {
LogLevel string
DatastoreEngine string
DatastoreURI string
SpannerCredsSecretRef string
TargetSpiceDBImage string
EnvPrefix string
SpiceDBCmd string
DatastoreTLSSecretName string
}
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 {
DisableImageValidation bool `json:"disableImageValidation"`
ImageName string `json:"imageName"`
ImageTag string `json:"imageTag"`
ImageDigest string `json:"imageDigest,omitempty"`
AllowedTags []string `json:"allowedTags"`
AllowedImages []string `json:"allowedImages"`
}
OperatorConfig holds operator-wide config that is used across all objects
func (OperatorConfig) Copy ¶ added in v1.0.0
func (o OperatorConfig) Copy() OperatorConfig
func (OperatorConfig) DefaultImage ¶ added in v1.0.0
func (o OperatorConfig) DefaultImage() string
type SpiceConfig ¶
type SpiceConfig struct {
SkipMigrations bool
Name string
Namespace string
UID string
Replicas int32
EnvPrefix string
SpiceDBCmd string
TLSSecretName string
DispatchUpstreamCASecretName string
TelemetryTLSCASecretName string
SecretName string
ExtraPodLabels map[string]string
Passthrough map[string]string
}
SpiceConfig contains config relevant to running spicedb or determining if spicedb needs to be updated