v1alpha1

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the apps v1alpha1 API group +kubebuilder:object:generate=true +groupName=apps.alexandrevilain.dev

Licensed to Alexandre VILAIN under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Alexandre VILAIN licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "apps.alexandrevilain.dev", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type DatastoreTLSSpec

type DatastoreTLSSpec struct {
	// Enabled defines if the cluster should use a TLS connection to connect to the datastore.
	Enabled bool `json:"bool"`
	// CertFileRef is a reference to a secret containing the cert file.
	// +optional
	CertFileRef *SecretKeyReference `json:"certFileRef"`
	// KeyFileRef is a reference to a secret containing the key file.
	// +optional
	KeyFileRef *SecretKeyReference `json:"keyFileRef"`
	// CaFileRef is a reference to a secret containing the ca file.
	// +optional
	CaFileRef *SecretKeyReference `json:"caFileRef"`
	// EnableHostVerification defines if the hostname should be verified when connecting to the datastore.
	EnableHostVerification bool `json:"enableHostVerification"`
	// ServerName the datastore should present.
	ServerName string `json:"serverName"`
}

DatastoreTLSSpec contains datastore TLS connections specifications.

func (*DatastoreTLSSpec) DeepCopy

func (in *DatastoreTLSSpec) DeepCopy() *DatastoreTLSSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatastoreTLSSpec.

func (*DatastoreTLSSpec) DeepCopyInto

func (in *DatastoreTLSSpec) DeepCopyInto(out *DatastoreTLSSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DatastoreType

type DatastoreType string
const (
	CassandraDatastore   DatastoreType = "cassandra"
	PostgresSQLDatastore DatastoreType = "postgresql"
	MySQLDatastore       DatastoreType = "mysql"
)

type PersistenceStatus added in v0.0.2

type PersistenceStatus struct {
	// DefaultStoreSchemaVersion holds the current schema version for the default store.
	DefaultStoreSchemaVersion string `json:"defaultStoreSchemaVersion"`
	// VisibilityStoreSchemaVersion holds the current schema version for the visibility store.
	VisibilityStoreSchemaVersion string `json:"visibilityStoreSchemaVersion"`
}

PersistenceStatus reports datastores schema versions.

func (*PersistenceStatus) DeepCopy added in v0.0.2

func (in *PersistenceStatus) DeepCopy() *PersistenceStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistenceStatus.

func (*PersistenceStatus) DeepCopyInto added in v0.0.2

func (in *PersistenceStatus) DeepCopyInto(out *PersistenceStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SQLSpec

type SQLSpec struct {
	// User is the username to be used for the connection.
	User string `json:"user"`
	// PluginName is the name of SQL plugin.
	PluginName string `json:"pluginName"`
	// DatabaseName is the name of SQL database to connect to.
	DatabaseName string `json:"databaseName"`
	// ConnectAddr is the remote addr of the database.
	ConnectAddr string `json:"connectAddr"`
	// ConnectProtocol is the protocol that goes with the ConnectAddr.
	// +optional
	ConnectProtocol string `json:"connectProtocol"`
	// ConnectAttributes is a set of key-value attributes to be sent as part of connect data_source_name url
	// +optional
	ConnectAttributes map[string]string `json:"connectAttributes"`
	// MaxConns the max number of connections to this datastore.
	// +optional
	MaxConns int `json:"maxConns"`
	// MaxIdleConns is the max number of idle connections to this datastore.
	// +optional
	MaxIdleConns int `json:"maxIdleConns"`
	// MaxConnLifetime is the maximum time a connection can be alive
	// +optional
	MaxConnLifetime time.Duration `json:"maxConnLifetime"`
	// TaskScanPartitions is the number of partitions to sequentially scan during ListTaskQueue operations.
	// +optional
	TaskScanPartitions int `json:"taskScanPartitions"`
}

SQLSpec contains SQL datastore connections specifications.

func (*SQLSpec) DeepCopy

func (in *SQLSpec) DeepCopy() *SQLSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SQLSpec.

func (*SQLSpec) DeepCopyInto

func (in *SQLSpec) DeepCopyInto(out *SQLSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SecretKeyReference

type SecretKeyReference struct {
	// Name of the Secret.
	// +required
	Name string `json:"name"`
	// Key in the Secret.
	// +optional
	Key string `json:"key,omitempty"`
}

SecretKeyReference contains enough information to locate the referenced Kubernetes Secret object in the same namespace.

func (*SecretKeyReference) DeepCopy

func (in *SecretKeyReference) DeepCopy() *SecretKeyReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretKeyReference.

func (*SecretKeyReference) DeepCopyInto

func (in *SecretKeyReference) DeepCopyInto(out *SecretKeyReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ServiceSpec

type ServiceSpec struct {
	// Port defines a custom gRPC port for the service.
	// Default values are:
	// 7233 for Frontend service
	// 7234 for History service
	// 7235 for Matching service
	// 7239 for Worker service
	// +optional
	Port *int `json:"port"`
	// Port defines a custom membership port for the service.
	// Default values are:
	// 6933 for Frontend service
	// 6934 for History service
	// 6935 for Matching service
	// 6939 for Worker service
	// +optional
	MembershipPort *int `json:"membershipPort"`
	// Number of desired replicas for the service. Default to 1.
	// +kubebuilder:validation:Minimum=1
	// +optional
	Replicas *int `json:"replicas"`
}

ServiceSpec contains a temporal service specifications.

func (*ServiceSpec) DeepCopy

func (in *ServiceSpec) DeepCopy() *ServiceSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceSpec.

func (*ServiceSpec) DeepCopyInto

func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ServiceStatus

type ServiceStatus struct {
	// Name of the temporal service.
	Name string `json:"name"`
	// Current observed version of the service.
	Version string `json:"version"`
}

ServiceStatus reports a service status.

func (*ServiceStatus) DeepCopy

func (in *ServiceStatus) DeepCopy() *ServiceStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceStatus.

func (*ServiceStatus) DeepCopyInto

func (in *ServiceStatus) DeepCopyInto(out *ServiceStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TemporalAdminToolsSpec added in v0.0.4

type TemporalAdminToolsSpec struct {
	// Enabled defines if the operator should deploy the admin tools alongside the cluster.
	// +optional
	Enabled bool `json:"enabled"`
	// Image defines the temporal admin tools docker image the instance should run.
	// +optional
	Image string `json:"image"`
}

TemporalUISpec defines parameters for the temporal admin tools within a Temporal cluster deployment. Note that deployed admin tools version is the same as the cluster's version.

func (*TemporalAdminToolsSpec) DeepCopy added in v0.0.4

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemporalAdminToolsSpec.

func (*TemporalAdminToolsSpec) DeepCopyInto added in v0.0.4

func (in *TemporalAdminToolsSpec) DeepCopyInto(out *TemporalAdminToolsSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TemporalCluster

type TemporalCluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Specification of the desired behavior of the Temporal cluster.
	Spec TemporalClusterSpec `json:"spec,omitempty"`
	// Most recent observed status of the Temporal cluster.
	Status TemporalClusterStatus `json:"status,omitempty"`
}

TemporalCluster defines a temporal cluster deployment.

func (*TemporalCluster) ChildResourceName

func (c *TemporalCluster) ChildResourceName(resource string) string

ChildResourceName returns child resource name using the cluster's name.

func (*TemporalCluster) DeepCopy

func (in *TemporalCluster) DeepCopy() *TemporalCluster

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemporalCluster.

func (*TemporalCluster) DeepCopyInto

func (in *TemporalCluster) DeepCopyInto(out *TemporalCluster)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TemporalCluster) DeepCopyObject

func (in *TemporalCluster) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*TemporalCluster) Default

func (c *TemporalCluster) Default()

Default sets default values on the temporal Cluster.

func (*TemporalCluster) GetDefaultDatastore

func (c *TemporalCluster) GetDefaultDatastore() (*TemporalDatastoreSpec, bool)

GetDefaultDatastore returns the cluster's default datastore.

func (*TemporalCluster) GetVisibilityDatastore

func (c *TemporalCluster) GetVisibilityDatastore() (*TemporalDatastoreSpec, bool)

GetVisibilityDatastore returns the cluster's visibility datastore.

type TemporalClusterList

type TemporalClusterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []TemporalCluster `json:"items"`
}

TemporalClusterList contains a list of TemporalCluster

func (*TemporalClusterList) DeepCopy

func (in *TemporalClusterList) DeepCopy() *TemporalClusterList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemporalClusterList.

func (*TemporalClusterList) DeepCopyInto

func (in *TemporalClusterList) DeepCopyInto(out *TemporalClusterList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TemporalClusterList) DeepCopyObject

func (in *TemporalClusterList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TemporalClusterSpec

type TemporalClusterSpec struct {
	// Image defines the temporal server docker image the cluster should use for each services.
	// +optional
	Image string `json:"image"`
	// Version defines the temporal version the cluster to be deployed.
	// This version impacts the underlying persistence schemas versions.
	Version string `json:"version"`
	// NumHistoryShards is the desired number of history shards.
	// This field is immutable.
	//+kubebuilder:validation:Minimum=1
	NumHistoryShards int32 `json:"numHistoryShards"`
	// Services allows customizations for for each temporal services deployment.
	// +optional
	Services *TemporalServicesSpec `json:"services,omitempty"`
	// Persistence defines temporal persistence configuration.
	Persistence TemporalPersistenceSpec `json:"persistence"`
	// Datastores the cluster can use. Datastore names are then referenced in the PersistenceSpec to use them
	// for the cluster's persistence layer.
	Datastores []TemporalDatastoreSpec `json:"datastores"`
	// An optional list of references to secrets in the same namespace
	// to use for pulling temporal images from registries.
	// +optional
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
	// UI allows configuration of the optional temporal web ui deployed alongside the cluster.
	// +optional
	UI *TemporalUISpec `json:"ui,omitempty"`
	// AdminTools allows configuration of the optional admin tool pod deployed alongside the cluster.
	// +optional
	AdminTools *TemporalAdminToolsSpec `json:"admintools,omitempty"`
}

TemporalClusterSpec defines the desired state of TemporalCluster.

func (*TemporalClusterSpec) DeepCopy

func (in *TemporalClusterSpec) DeepCopy() *TemporalClusterSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemporalClusterSpec.

func (*TemporalClusterSpec) DeepCopyInto

func (in *TemporalClusterSpec) DeepCopyInto(out *TemporalClusterSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TemporalClusterStatus

type TemporalClusterStatus struct {
	// Version holds the current temporal version.
	Version string `json:"version,omitempty"`
	// Persistence holds the persistence status.
	Persistence PersistenceStatus `json:"persistence,omitempty"`
	// Services holds all services statuses.
	Services []ServiceStatus `json:"services,omitempty"`
}

TemporalClusterStatus defines the observed state of TemporalCluster.

func (*TemporalClusterStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemporalClusterStatus.

func (*TemporalClusterStatus) DeepCopyInto

func (in *TemporalClusterStatus) DeepCopyInto(out *TemporalClusterStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TemporalDatastoreSpec

type TemporalDatastoreSpec struct {
	// Name is the name of the datatstore.
	// It should be unique and will be referenced within the persitence spec.
	// +required
	Name string `json:"name"`
	// SQL holds all connection parameters for SQL datastores.
	// +optional
	SQL *SQLSpec `json:"sql"`
	// PasswordSecret is the reference to the secret holding the password.
	// +required
	PasswordSecretRef SecretKeyReference `json:"passwordSecretRef"`
	// TLS is an optional option to connect to the datastore using TLS.
	// +optional
	TLS *DatastoreTLSSpec `json:"tls"`
}

TemporalDatastoreSpec contains temporal datastore specifications.

func (*TemporalDatastoreSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemporalDatastoreSpec.

func (*TemporalDatastoreSpec) DeepCopyInto

func (in *TemporalDatastoreSpec) DeepCopyInto(out *TemporalDatastoreSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TemporalDatastoreSpec) Default

func (s *TemporalDatastoreSpec) Default()

Default sets default values on the datastore.

func (*TemporalDatastoreSpec) GetDatastoreType

func (s *TemporalDatastoreSpec) GetDatastoreType() (DatastoreType, error)

func (*TemporalDatastoreSpec) GetPasswordEnvVarName

func (s *TemporalDatastoreSpec) GetPasswordEnvVarName() string

GetPasswordEnvVarName crafts the environment variable name for the datastore.

func (*TemporalDatastoreSpec) GetTLSCaFileMountPath

func (s *TemporalDatastoreSpec) GetTLSCaFileMountPath() string

GetTLSCaFileMountPath returns the CA key mount path. It returns empty if the tls config is nil or if no secret key ref has been specified.

func (*TemporalDatastoreSpec) GetTLSCertFileMountPath

func (s *TemporalDatastoreSpec) GetTLSCertFileMountPath() string

GetTLSKeyFileMountPath returns the client TLS cert mount path. It returns empty if the tls config is nil or if no secret key ref has been specified.

func (*TemporalDatastoreSpec) GetTLSKeyFileMountPath

func (s *TemporalDatastoreSpec) GetTLSKeyFileMountPath() string

GetTLSKeyFileMountPath returns the client TLS key mount path. It returns empty if the tls config is nil or if no secret key ref has been specified.

type TemporalPersistenceSpec

type TemporalPersistenceSpec struct {
	// DefaultStore is the name of the default data store to use.
	DefaultStore string `json:"defaultStore"`
	// VisibilityStore is the name of the datastore to be used for visibility records.
	VisibilityStore string `json:"visibilityStore"`
	// AdvancedVisibilityStore is the name of the datastore to be used for visibility records
	// +optional
	AdvancedVisibilityStore string `json:"advancedVisibilityStore"`
}

TemporalPersistenceSpec contains temporal persistence specifications.

func (*TemporalPersistenceSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemporalPersistenceSpec.

func (*TemporalPersistenceSpec) DeepCopyInto

func (in *TemporalPersistenceSpec) DeepCopyInto(out *TemporalPersistenceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TemporalServicesSpec

type TemporalServicesSpec struct {
	// Frontend service custom specifications.
	// +optional
	Frontend *ServiceSpec `json:"frontend"`
	// History service custom specifications.
	// +optional
	History *ServiceSpec `json:"history"`
	// Matching service custom specifications.
	// +optional
	Matching *ServiceSpec `json:"matching"`
	// Worker service custom specifications.
	// +optional
	Worker *ServiceSpec `json:"worker"`
}

TemporalServicesSpec contains all temporal services specifications.

func (*TemporalServicesSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemporalServicesSpec.

func (*TemporalServicesSpec) DeepCopyInto

func (in *TemporalServicesSpec) DeepCopyInto(out *TemporalServicesSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TemporalServicesSpec) GetServiceSpec

func (s *TemporalServicesSpec) GetServiceSpec(name string) (*ServiceSpec, error)

GetServiceSpec returns service spec from its name.

type TemporalUIIngressSpec added in v0.0.4

type TemporalUIIngressSpec struct {
	// Annotations allows custom annotations on the ingress ressource.
	Annotations map[string]string `json:"annotations,omitempty"`
	// IngressClassName is the name of the IngressClass the deployed ingress resource should use.
	IngressClassName *string `json:"ingressClassName,omitempty"`
	// Host is the list of host the ingress should use.
	Hosts []string `json:"hosts"`
	// TLS configuration.
	TLS []networkingv1.IngressTLS `json:"tls,omitempty" protobuf:"bytes,2,rep,name=tls"`
}

TemporalUIIngressSpec contains all configurations options for the UI ingress.

func (*TemporalUIIngressSpec) DeepCopy added in v0.0.4

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemporalUIIngressSpec.

func (*TemporalUIIngressSpec) DeepCopyInto added in v0.0.4

func (in *TemporalUIIngressSpec) DeepCopyInto(out *TemporalUIIngressSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TemporalUISpec added in v0.0.4

type TemporalUISpec struct {
	// Enabled defines if the operator should deploy the web ui alongside the cluster.
	// +optional
	Enabled bool `json:"enabled"`
	// Version defines the temporal ui version the instance should run.
	// +optional
	Version string `json:"version"`
	// Image defines the temporal ui docker image the instance should run.
	// +optional
	Image string `json:"image"`
	// Ingress is an optional ingress configuration for the UI.
	// If lived empty, no ingress configuration will be created and the UI will only by available trough ClusterIP service.
	// +optional
	Ingress *TemporalUIIngressSpec `json:"ingress,omitempty"`
}

TemporalUISpec defines parameters for the temporal UI within a Temporal cluster deployment.

func (*TemporalUISpec) DeepCopy added in v0.0.4

func (in *TemporalUISpec) DeepCopy() *TemporalUISpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemporalUISpec.

func (*TemporalUISpec) DeepCopyInto added in v0.0.4

func (in *TemporalUISpec) DeepCopyInto(out *TemporalUISpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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