Documentation ¶
Overview ¶
TODO: describe package here.
Index ¶
- func SetDefaults(config *OperatorConfig)
- func SetExampleStatefulServiceConfigMap(configMap *corev1.ConfigMap)
- type CassandraConfig
- type GCPConfig
- type InMemoryConfig
- type NoStoreConfig
- type OperatorConfig
- type PostgresConfig
- type PostgresGoogleCloudSQLConfig
- type SidecarMetricsConfig
- type SpannerConfig
- type StatefulServiceAutoscalerConfig
- type StatefulServiceConfig
- type StatefulServiceProxyConfig
- type StatefulServiceResourceConfig
- type StatefulServiceUserFunctionConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetDefaults ¶
func SetDefaults(config *OperatorConfig)
func SetExampleStatefulServiceConfigMap ¶
Initializes a ConfigMap with the example configuration comment.
Types ¶
type CassandraConfig ¶
type InMemoryConfig ¶
type NoStoreConfig ¶
type OperatorConfig ¶
type OperatorConfig struct { Configs map[string]*yaml.Node `yaml:",inline"` NoStore NoStoreConfig `yaml:"noStore"` InMemory InMemoryConfig `yaml:"inMemory"` Cassandra CassandraConfig `yaml:"cassandra"` Postgres PostgresConfig `yaml:"postgres"` Spanner SpannerConfig `yaml:"spanner"` GCP GCPConfig `yaml:"gcp"` SidecarMetrics SidecarMetricsConfig `yaml:"sidecarMetrics"` }
func ReadConfig ¶
func ReadConfig(path string) (*OperatorConfig, error)
func (*OperatorConfig) Get ¶
func (c *OperatorConfig) Get(key string, obj interface{}) error
type PostgresConfig ¶
type PostgresConfig struct { Image string `yaml:"image" env:"POSTGRES_IMAGE"` Args []string `yaml:"args"` GoogleCloudSQL PostgresGoogleCloudSQLConfig `yaml:"googleCloudSql"` }
type PostgresGoogleCloudSQLConfig ¶
type PostgresGoogleCloudSQLConfig struct { Enabled bool `yaml:"enabled" env:"POSTGRES_GOOGLE_CLOUD_SQL_ENABLED"` // This is the DB type and version as used by GCP. Must start with "POSTGRES_" to ensure we get a Postgres DB. TypeVersion string `yaml:"typeVersion" env:"POSTGRES_GOOGLE_CLOUD_SQL_TYPE_VERSION" env-description:"DB descriptor for GCP"` Region string `yaml:"region" env:"POSTGRES_GOOGLE_CLOUD_SQL_REGION" env-description:"GCP region for instances/databases"` DefaultCores int32 `` /* 133-byte string literal not displayed */ DefaultMemory string `` /* 143-byte string literal not displayed */ }
type SidecarMetricsConfig ¶
type SidecarMetricsConfig struct {
Port int32 `yaml:"port" env:"SIDECAR_METRICS_PORT"`
}
type SpannerConfig ¶
type StatefulServiceConfig ¶
type StatefulServiceConfig struct { Autoscaler StatefulServiceAutoscalerConfig `yaml:"autoscaler"` Proxy StatefulServiceProxyConfig `yaml:"proxy"` UserFunction StatefulServiceUserFunctionConfig `yaml:"userFunction"` }
StatefulServiceConfig is defined per service in a ConfigMap.
func NewStatefulServiceConfigWithDefaults ¶
func NewStatefulServiceConfigWithDefaults() *StatefulServiceConfig
func ParseStatefulServiceFromConfigMapWithDefaults ¶
func ParseStatefulServiceFromConfigMapWithDefaults(configMap *corev1.ConfigMap) (*StatefulServiceConfig, error)
TODO REVIEW: this is a very long function name.
type StatefulServiceProxyConfig ¶
type StatefulServiceProxyConfig struct { // Pointer so that it can be left unset. Image *string `yaml:"image"` ImagePullPolicy corev1.PullPolicy `yaml:"imagePullPolicy"` Resources StatefulServiceResourceConfig `yaml:"resources"` InitialHeapSize string `yaml:"initialHeapSize"` MaxHeapSize string `yaml:"maxHeapSize"` }
type StatefulServiceResourceConfig ¶
type StatefulServiceResourceConfig struct { CPURequest string `yaml:"cpuRequest"` // Pointer so that it can be left unset. CPULimit *string `yaml:"cpuLimit"` MemoryRequest string `yaml:"memoryRequest"` MemoryLimit string `yaml:"memoryLimit"` }
func (*StatefulServiceResourceConfig) ToResourceRequirements ¶
func (rc *StatefulServiceResourceConfig) ToResourceRequirements() (*corev1.ResourceRequirements, error)
type StatefulServiceUserFunctionConfig ¶
type StatefulServiceUserFunctionConfig struct {
Resources StatefulServiceResourceConfig `yaml:"resources"`
}
Click to show internal directories.
Click to hide internal directories.