v1beta1

package
v0.0.0-...-a9f80de Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package v1beta1 contains API Schema definitions for the database v1beta1 API group +kubebuilder:object:generate=true +groupName=database.govsvc.uk

Index

Constants

View Source
const (
	Engine                       = "aurora-postgresql"
	DefaultParameterGroupFamily  = "aurora-postgresql10"
	DefaultClass                 = "db.r5.large"
	DefaultInstanceCount         = 2
	DefaultBackupRetentionPeriod = 7

	PostgresResourceMasterCredentials           = "MasterCredentials"
	PostgresResourceMasterCredentialsAttachment = "MasterCredentialsAttachment"
	PostgresResourceCluster                     = "RDSCluster"
	PostgresResourceInstance                    = "RDSDBInstance"
	PostgresResourceParameterGroup              = "RDSDBParameterGroup"
	PostgresResourceClusterParameterGroup       = "RDSDBClusterParameterGroup"

	VPCSecurityGroupIDParameterName = "VPCSecurityGroupID"
	DBSubnetGroupNameParameterName  = "DBSubnetGroup"

	PostgresEndpoint     = "Endpoint"
	PostgresReadEndpoint = "ReadEndpoint"
	PostgresPort         = "Port"
	PostgresUsername     = "Username"
	PostgresPassword     = "Password"
)
View Source
const (
	RedisResourceName                    = "Redis"
	CacheSubnetGroupParameterName        = "CacheSubnetGroup"
	RedisVPCSecurityGroupIDParameterName = "VPCSecurityGroupID"
	RedisPrimaryHostnameOutputName       = "ClusterPrimaryRedisHostname"
	RedisPrimaryPortOutputName           = "ClusterPrimaryRedisPort"
	RedisReadHostnamesOutputName         = "ClusterReadRedisHostnames"
	RedisReadPortsOutputName             = "ClusterReadRedisPorts"
	AuthTokenSecretResourceName          = "AuthTokenSecret"
	RedisAuthTokenOutputName             = "SecretAuthToken"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "database.govsvc.uk", Version: "v1beta1"}

	// 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 Postgres

type Postgres struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	object.Status     `json:"status,omitempty"`

	Spec PostgresSpec `json:"spec,omitempty"`
}

Postgres is the Schema for the postgres API

func (*Postgres) DeepCopy

func (in *Postgres) DeepCopy() *Postgres

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

func (*Postgres) DeepCopyInto

func (in *Postgres) DeepCopyInto(out *Postgres)

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

func (*Postgres) DeepCopyObject

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

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

func (*Postgres) GetSecretName

func (p *Postgres) GetSecretName() string

GetSecretName returns the name of a secret that will get populated with connection details

func (*Postgres) GetServiceEntryName

func (p *Postgres) GetServiceEntryName() string

func (*Postgres) GetServiceEntrySpecs

func (p *Postgres) GetServiceEntrySpecs(outputs cloudformation.Outputs) ([]map[string]interface{}, error)

ServiceEntry to whitelist egress access to Postgres port and hosts.

func (*Postgres) GetStackName

func (p *Postgres) GetStackName() string

Name returns the name of the SQS cloudformation stack

func (*Postgres) GetStackPolicy

func (p *Postgres) GetStackPolicy() aws.StackPolicyDocument

GetStackPolicy implements cloudformation.Stack to return a serialised form of the stack policy, or nil if one is not needed

func (*Postgres) GetStackTemplate

func (p *Postgres) GetStackTemplate() (*cloudformation.Template, error)

GetStackTemplate implements cloudformation.Stack to serialize the configuration as a cloudformaiton template

type PostgresAWSSpec

type PostgresAWSSpec struct {
	// InstanceType essentially defines the amount of memory and cpus on the database.
	InstanceType string `json:"instanceType,omitempty"`
	// InstanceCount is the number of database instances in the cluster (defaults to 2 if not set)
	InstanceCount int `json:"instanceCount,omitempty"`
	// EngineVersion is the version of RDS postgresql to use
	// (it is only optional to cater for existing databases; this should be specified on anything new)
	EngineVersion string `json:"engineVersion,omitempty"`
}

AWS allows specifying configuration for the Postgres RDS instance

func (*PostgresAWSSpec) DeepCopy

func (in *PostgresAWSSpec) DeepCopy() *PostgresAWSSpec

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

func (*PostgresAWSSpec) DeepCopyInto

func (in *PostgresAWSSpec) DeepCopyInto(out *PostgresAWSSpec)

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

type PostgresList

type PostgresList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []Postgres `json:"items,omitempty"`
}

PostgresList contains a list of Postgres

func (*PostgresList) DeepCopy

func (in *PostgresList) DeepCopy() *PostgresList

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

func (*PostgresList) DeepCopyInto

func (in *PostgresList) DeepCopyInto(out *PostgresList)

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

func (*PostgresList) DeepCopyObject

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

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

type PostgresSpec

type PostgresSpec struct {
	// AWS specific subsection of the resource.
	AWS PostgresAWSSpec `json:"aws,omitempty"`
	// Secret name to be used for storing relevant instance secrets for further use.
	Secret string `json:"secret,omitempty"`
	// ServiceEntry name to be used for storing the egress firewall rule to allow tenant access to the database
	ServiceEntry string `json:"serviceEntry,omitempty"`
}

PostgresSpec defines the desired state of Postgres

func (*PostgresSpec) DeepCopy

func (in *PostgresSpec) DeepCopy() *PostgresSpec

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

func (*PostgresSpec) DeepCopyInto

func (in *PostgresSpec) DeepCopyInto(out *PostgresSpec)

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

type Redis

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

	Spec          RedisSpec `json:"spec,omitempty"`
	object.Status `json:"status,omitempty"`
}

Redis is the Schema for the Redis API

func (*Redis) DeepCopy

func (in *Redis) DeepCopy() *Redis

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

func (*Redis) DeepCopyInto

func (in *Redis) DeepCopyInto(out *Redis)

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

func (*Redis) DeepCopyObject

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

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

func (*Redis) GetSecretName

func (s *Redis) GetSecretName() string

SecretName returns the name of the secret that will be populated with data

func (*Redis) GetServiceEntryName

func (s *Redis) GetServiceEntryName() string

func (*Redis) GetServiceEntrySpecs

func (s *Redis) GetServiceEntrySpecs(outputs cloudformation.Outputs) ([]map[string]interface{}, error)

ServiceEntry to whitelist egress access to cluster port and hosts.

func (*Redis) GetStackName

func (s *Redis) GetStackName() string

Name returns the name of the Redis cloudformation stack

func (*Redis) GetStackTemplate

func (s *Redis) GetStackTemplate() (*cloudformation.Template, error)

Template returns a cloudformation Template for provisioning an Redis

type RedisAWSSpec

type RedisAWSSpec struct {
	// NodeType defines the amount of RAM and CPUs nodes in the cluster have as well as their network performance
	NodeType string `json:"nodeType"`

	// EngineVersion defines the version of Redis running in the cluster.
	EngineVersion string `json:"engineVersion"`

	// NumCacheClusters defines the number of clusters that belong to our replication group. A number between 2 and 6 inclusive.
	// +kubebuilder:validation:Minimum=2
	// +kubebuilder:validation:Maximum=6
	NumCacheClusters int `json:"numCacheClusters"`

	// PreferredMaintenanceWindow defines the weekly window during which maintenance is performed on the cluster. The minimum period is 60 minutes.
	PreferredMaintenanceWindow string `json:"preferredMaintenanceWindow,omitempty"`
}

AWS allows specifying configuration for the redis

func (*RedisAWSSpec) DeepCopy

func (in *RedisAWSSpec) DeepCopy() *RedisAWSSpec

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

func (*RedisAWSSpec) DeepCopyInto

func (in *RedisAWSSpec) DeepCopyInto(out *RedisAWSSpec)

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

type RedisList

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

RedisList contains a list of Redis

func (*RedisList) DeepCopy

func (in *RedisList) DeepCopy() *RedisList

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

func (*RedisList) DeepCopyInto

func (in *RedisList) DeepCopyInto(out *RedisList)

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

func (*RedisList) DeepCopyObject

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

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

type RedisSpec

type RedisSpec struct {
	// AWS specific subsection of the resource.
	AWS RedisAWSSpec `json:"aws,omitempty"`
	// Secret name to be used for storing relevant instance secrets for further use.
	Secret string `json:"secret,omitempty"`
	// ServiceEntry name to be used for storing the egress firewall rule to allow tenant access to the cluster
	ServiceEntry string `json:"serviceEntry,omitempty"`
}

RedisSpec defines the desired state of Redis

func (*RedisSpec) DeepCopy

func (in *RedisSpec) DeepCopy() *RedisSpec

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

func (*RedisSpec) DeepCopyInto

func (in *RedisSpec) DeepCopyInto(out *RedisSpec)

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