v1alpha1

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: Apache-2.0 Imports: 13 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 bool `json:"bool"`
	// +optional
	CertFileRef *SecretKeyReference `json:"certFileRef"`
	// +optional
	KeyFileRef *SecretKeyReference `json:"keyFileRef"`
	// +optional
	CaFileRef              *SecretKeyReference `json:"caFileRef"`
	EnableHostVerification bool                `json:"enableHostVerification"`
	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 {
	// +optional
	Port *int `json:"port"`
	// +optional
	MembershipPort *int `json:"membershipPort"`
	//+kubebuilder:validation:Minimum=1
	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 string `json:"name"`
	// Version hols the current service version.
	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 TemporalCluster

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

	Spec   TemporalClusterSpec   `json:"spec,omitempty"`
	Status TemporalClusterStatus `json:"status,omitempty"`
}

TemporalCluster is the Schema for the temporalclusters API

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)

func (*TemporalCluster) GetVisibilityDatastore

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

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 image the instance should use.
	// +optional
	Image string `json:"image"`
	// Version defines the temporal version the instance should run.
	Version string `json:"version"`
	// NumHistoryShards is the desired number of history shards.
	// This field is immutable.
	//+kubebuilder:validation:Minimum=1
	NumHistoryShards int32 `json:"numHistoryShards"`
	// +optional
	Services    *TemporalServicesSpec   `json:"services"`
	Persistence TemporalPersistenceSpec `json:"persistence"`
	Datastores  []TemporalDatastoreSpec `json:"datastores"`
	// +optional
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets"`
}

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.
	// If not set it defaults to the default store.
	// +optional
	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 {
	// +optional
	Frontend *ServiceSpec `json:"frontend"`
	// +optional
	History *ServiceSpec `json:"history"`
	// +optional
	Matching *ServiceSpec `json:"matching"`
	// +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.

Jump to

Keyboard shortcuts

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