app

package
v0.0.0-...-e889ff3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuroraDBInstanceClass = "db.r5.large"
	AuroraDBStorage       = 20
	DetailsCMName         = "dbconfig"
)
View Source
const (

	// PersistentStorage can be used if we want to deploy database with Persistent Volumes
	PersistentStorage storage = "persistent" //nolint:varcheck

	// EphemeralStorage can be used if we don't want to deploy database with Persistent
	EphemeralStorage storage = "ephemeral"
	// TemplateVersionOCP3_11 stores version of db template 3.11
	TemplateVersionOCP3_11 DBTemplate = "release-3.11"
	// TemplateVersionOCP4_4 stores version of db template 4.4
	TemplateVersionOCP4_4 DBTemplate = "release-4.4"
	// TemplateVersionOCP4_5 stores version of db template 4.5
	TemplateVersionOCP4_5 DBTemplate = "release-4.5"
	// TemplateVersionOCP4_10 stores version of db template 4.10
	TemplateVersionOCP4_10 DBTemplate = "release-4.10"
	// TemplateVersionOCP4_11 stores version of db template 4.11
	TemplateVersionOCP4_11 DBTemplate = "release-4.11"
	// TemplateVersionOCP4_12 stores version of db template 4.12
	TemplateVersionOCP4_12 DBTemplate = "release-4.12"
	// TemplateVersionOCP4_13 stores version of db template 4.13
	TemplateVersionOCP4_13 DBTemplate = "release-4.13"
	// TemplateVersionOCP4_14 stores version of db template 4.14
	TemplateVersionOCP4_14 DBTemplate = "release-4.14"
)

Variables

This section is empty.

Functions

func K8SServicePortForward

func K8SServicePortForward(ctx context.Context, svcName string, ns string, pPort string) (*portforward.PortForwarder, error)

K8SServicePortForward creates a service port forwarding and returns the forwarder and error if any

Types

type App

type App interface {
	// Init instantiates the app based on the environment configuration,
	// including environement variables and state in the Kubernetes cluster. If
	// any required configuration is not discoverable, Init will return an
	// error.
	Init(context.Context) error
	// Install will install the app into a specified namespace. Install should
	// be called after Init.
	Install(ctx context.Context, namespace string) error
	// IsReady returns true once an app is running. If we detect a failure state
	// that will not recover from on it's own, then IsReady will return an
	// error.
	IsReady(context.Context) (bool, error)
	// Object returns a reference to this app to be used by ActionSets.
	Object() crv1alpha1.ObjectReference
	// Uninstall deletes an app and all it's components from a Namespace.
	Uninstall(context.Context) error
	// GetClusterScopedResources returns the list of cluster scoped k8s resources created during app Install
	GetClusterScopedResources(context.Context) []crv1alpha1.ObjectReference
}

App represents an application we can install into a namespace.

func NewCassandraInstance

func NewCassandraInstance(name string) App

NewCassandraInstance returns new cassandra application

func NewCockroachDB

func NewCockroachDB(name string) App

NewCockroachDB Last tested working version "22.1.5"

func NewCouchbaseDB

func NewCouchbaseDB(name string) App

Last tested woking version "2.3.0"

func NewElasticsearchInstance

func NewElasticsearchInstance(name string) App

Last tested on 8.5.1

func NewFoundationDB

func NewFoundationDB(name string) App

NewFoundationDB initializes and returns the foundation db instance

func NewKafkaCluster

func NewKafkaCluster(name, pathToYaml string) App

func NewMariaDB

func NewMariaDB(name string) App

func NewMongoDBDepConfig

func NewMongoDBDepConfig(name string, templateVersion DBTemplate, storageType storage) App

func NewMssqlDB

func NewMssqlDB(name string) App

func NewMysqlDepConfig

func NewMysqlDepConfig(name string, templateVersion DBTemplate, storageType storage, tag string) App

func NewPostgreSQLDepConfig

func NewPostgreSQLDepConfig(name string, templateVersion DBTemplate, storageType storage) App

func NewPostgresDB

func NewPostgresDB(name string, subPath string) App

Last tested chart version "10.12.3". Also we are using postgres version 13.4

func NewRDSAuroraMySQLDB

func NewRDSAuroraMySQLDB(name, region string) App

func NewRDSPostgresDB

func NewRDSPostgresDB(name string, customRegion string) App

func NewTimeLogCSI

func NewTimeLogCSI(name string) App

NewTimeLogCSI instantiates the TimeLogCSI integration test app

type AppBlueprint

type AppBlueprint struct {
	App          string
	Path         string
	UseDevImages bool
}

Blueprint implements Blueprint() to return Blueprint specs for the app Blueprint() returns Blueprint placed at ./blueprints/{app-name}-blueprint.yaml

func (AppBlueprint) Blueprint

func (b AppBlueprint) Blueprint() *crv1alpha1.Blueprint

type Blueprinter

type Blueprinter interface {
	// Blueprint returns a new non-namespaced Blueprint.
	Blueprint() *crv1alpha1.Blueprint
}

Blueprinter is the interface used to create a Blueprint.

func NewBlueprint

func NewBlueprint(app string, bpReposPath string, useDevImages bool) Blueprinter

func NewPITRBlueprint

func NewPITRBlueprint(app string, bpReposPath string, useDevImages bool) Blueprinter

Blueprint returns Blueprint placed at ./blueprints/{app-name}-blueprint.yaml

type CassandraInstance

type CassandraInstance struct {
	// contains filtered or unexported fields
}

CassandraInstance defines structure a cassandra databse application

func (*CassandraInstance) Count

func (cas *CassandraInstance) Count(ctx context.Context) (int, error)

Count will return the number of records, there are inside the database's table

func (*CassandraInstance) GetClusterScopedResources

func (cas *CassandraInstance) GetClusterScopedResources(ctx context.Context) []crv1alpha1.ObjectReference

func (*CassandraInstance) Init

Init initializes the database application

func (*CassandraInstance) Initialize

func (cas *CassandraInstance) Initialize(ctx context.Context) error

Initialize is used to initialize the database or create schema

func (*CassandraInstance) Insert

func (cas *CassandraInstance) Insert(ctx context.Context) error

Insert is used to insert the records into the database

func (*CassandraInstance) Install

func (cas *CassandraInstance) Install(ctx context.Context, namespace string) error

Install is used to install the initialized application

func (*CassandraInstance) IsReady

func (cas *CassandraInstance) IsReady(ctx context.Context) (bool, error)

IsReady waits for the application to be ready

func (*CassandraInstance) Object

Object returns the kubernetes resource that is being referred by db application installation

func (*CassandraInstance) Ping

func (cas *CassandraInstance) Ping(ctx context.Context) error

Ping is used to ping the application to check the database connectivity

func (*CassandraInstance) Reset

func (cas *CassandraInstance) Reset(ctx context.Context) error

Reset is used to reset or imitate disaster, in the database

func (*CassandraInstance) Uninstall

func (cas *CassandraInstance) Uninstall(ctx context.Context) error

Uninstall us used to remove the database application

type CockroachDB

type CockroachDB struct {
	// contains filtered or unexported fields
}

func (*CockroachDB) ConfigMaps

func (c *CockroachDB) ConfigMaps() map[string]crv1alpha1.ObjectReference

func (*CockroachDB) Count

func (c *CockroachDB) Count(ctx context.Context) (int, error)

func (*CockroachDB) GetClusterScopedResources

func (c *CockroachDB) GetClusterScopedResources(context.Context) []crv1alpha1.ObjectReference

func (*CockroachDB) Init

func (c *CockroachDB) Init(context.Context) error

func (*CockroachDB) Initialize

func (c *CockroachDB) Initialize(ctx context.Context) error

Initialize is used to initialize the database or create schema

func (*CockroachDB) Insert

func (c *CockroachDB) Insert(ctx context.Context) error

func (*CockroachDB) Install

func (c *CockroachDB) Install(ctx context.Context, namespace string) error

func (*CockroachDB) IsReady

func (c *CockroachDB) IsReady(ctx context.Context) (bool, error)

func (*CockroachDB) Object

func (*CockroachDB) Ping

func (c *CockroachDB) Ping(ctx context.Context) error

func (*CockroachDB) Reset

func (c *CockroachDB) Reset(ctx context.Context) error

func (*CockroachDB) Secrets

func (c *CockroachDB) Secrets() map[string]crv1alpha1.ObjectReference

func (*CockroachDB) Uninstall

func (c *CockroachDB) Uninstall(ctx context.Context) error

type ConfigApp

type ConfigApp interface {
	App
	// ConfigMaps returns named references to ConfigMaps when installing App.
	ConfigMaps() map[string]crv1alpha1.ObjectReference
	// Secrets returns named references to Secrets when installing App.
	Secrets() map[string]crv1alpha1.ObjectReference
}

ConfigApp describes an App installs additional configuration that can be referenced from an ActionSet and used in a Blueprint. Not all apps will create this additional configuration.

type CouchbaseDB

type CouchbaseDB struct {
	// contains filtered or unexported fields
}

func (CouchbaseDB) Count

func (cb CouchbaseDB) Count(ctx context.Context) (int, error)

func (CouchbaseDB) GetClusterScopedResources

func (cb CouchbaseDB) GetClusterScopedResources(ctx context.Context) []crv1alpha1.ObjectReference

func (*CouchbaseDB) Init

func (cb *CouchbaseDB) Init(ctx context.Context) error

func (CouchbaseDB) Initialize

func (cb CouchbaseDB) Initialize(ctx context.Context) error

Initialize is used to initialize the database or create schema

func (CouchbaseDB) Insert

func (cb CouchbaseDB) Insert(ctx context.Context) error

func (*CouchbaseDB) Install

func (cb *CouchbaseDB) Install(ctx context.Context, ns string) error

func (*CouchbaseDB) IsReady

func (cb *CouchbaseDB) IsReady(ctx context.Context) (bool, error)

func (*CouchbaseDB) Object

func (cb *CouchbaseDB) Object() crv1alpha1.ObjectReference

func (*CouchbaseDB) Ping

func (cb *CouchbaseDB) Ping(ctx context.Context) error

Ping makes and tests DB connection

func (CouchbaseDB) Reset

func (cb CouchbaseDB) Reset(ctx context.Context) error

func (CouchbaseDB) Uninstall

func (cb CouchbaseDB) Uninstall(ctx context.Context) error

type DBTemplate

type DBTemplate string

DBTemplate is type of openshift db template version

type DatabaseApp

type DatabaseApp interface {
	App
	// Ping will issue trivial request to the database to see if it is
	// accessible.
	Ping(context.Context) error
	// Insert adds n entries to the database.
	Insert(ctx context.Context) error
	// Count returns the number of entries in the database.
	Count(context.Context) (int, error)
	// Reset Removes all entries from the database.
	Reset(context.Context) error
	// Initialize Initializes the database
	Initialize(context.Context) error
}

DatabaseApp inherits methods from App, but also includes method to add, read and remove entries stored byt the App.

type ElasticsearchInstance

type ElasticsearchInstance struct {
	// contains filtered or unexported fields
}

func (*ElasticsearchInstance) Count

func (esi *ElasticsearchInstance) Count(ctx context.Context) (int, error)

func (*ElasticsearchInstance) GetClusterScopedResources

func (esi *ElasticsearchInstance) GetClusterScopedResources(ctx context.Context) []crv1alpha1.ObjectReference

func (*ElasticsearchInstance) Init

func (esi *ElasticsearchInstance) Init(ctx context.Context) error

func (*ElasticsearchInstance) Initialize

func (esi *ElasticsearchInstance) Initialize(ctx context.Context) error

Initialize is used to initialize the database or create schema

func (*ElasticsearchInstance) Insert

func (esi *ElasticsearchInstance) Insert(ctx context.Context) error

func (*ElasticsearchInstance) Install

func (esi *ElasticsearchInstance) Install(ctx context.Context, namespace string) error

func (*ElasticsearchInstance) IsReady

func (esi *ElasticsearchInstance) IsReady(ctx context.Context) (bool, error)

func (*ElasticsearchInstance) Object

func (*ElasticsearchInstance) Ping

func (esi *ElasticsearchInstance) Ping(ctx context.Context) error

func (*ElasticsearchInstance) Reset

func (esi *ElasticsearchInstance) Reset(ctx context.Context) error

func (*ElasticsearchInstance) Secrets

func (*ElasticsearchInstance) Uninstall

func (esi *ElasticsearchInstance) Uninstall(ctx context.Context) error

type ElasticsearchPingOutput

type ElasticsearchPingOutput struct {
	Hits struct {
		Total struct {
			Value int `json:"value"`
		} `json:"total"`
	} `json:"hits"`
}

ElasticsearchPingOutput struct gets mapped to the output of curl <es-host>:<es-port>/<index-name>/_search?pretty which actually returns details about all the documents of a specific ES index (index-name) if, due to any reason, there is change in how Elasticsearch responds to above query, below struct is subject to change.

type FoundationDB

type FoundationDB struct {
	// contains filtered or unexported fields
}

FoundationDB has fields of foundationdb instance

func (*FoundationDB) Count

func (fdb *FoundationDB) Count(ctx context.Context) (int, error)

Count is used to count the number of records

func (*FoundationDB) GetClusterScopedResources

func (fdb *FoundationDB) GetClusterScopedResources(ctx context.Context) []crv1alpha1.ObjectReference

func (*FoundationDB) Init

func (fdb *FoundationDB) Init(ctx context.Context) error

Init initialises the kubernetes config details

func (*FoundationDB) Initialize

func (fdb *FoundationDB) Initialize(ctx context.Context) error

Initialize is used to initialize the database or create schema

func (*FoundationDB) Insert

func (fdb *FoundationDB) Insert(ctx context.Context) error

Insert is used to insert some records into the database

func (*FoundationDB) Install

func (fdb *FoundationDB) Install(ctx context.Context, namespace string) error

Install is used to install the database

func (*FoundationDB) IsReady

func (fdb *FoundationDB) IsReady(ctx context.Context) (bool, error)

IsReady is used to check the database that is installed is ready or not

func (*FoundationDB) Object

func (fdb *FoundationDB) Object() crv1alpha1.ObjectReference

Object will return the controller reference that is installed to run the database

func (*FoundationDB) Ping

func (fdb *FoundationDB) Ping(ctx context.Context) error

Ping is used to check if the database is able to accept the request

func (*FoundationDB) Reset

func (fdb *FoundationDB) Reset(ctx context.Context) error

Reset is used to reset the database

func (*FoundationDB) Uninstall

func (fdb *FoundationDB) Uninstall(ctx context.Context) error

Uninstall used to uninstall the database

type HelmApp

type HelmApp interface {
	App
	// Chart returns the chart of this Helm app.
	Chart() *helm.ChartInfo
	// SetChart sets the chart of this Helm app.
	SetChart(chart helm.ChartInfo)
}

func NewMongoDB

func NewMongoDB(name string) HelmApp

Last tested working version "9.0.0"

func NewMysqlDB

func NewMysqlDB(name string) HelmApp

Last tested working version "6.14.11"

type InsertPayload

type InsertPayload struct {
	Records []Records `json:"records"`
}

InsertPayload is a list of Records passed to a topic

type IsMasterOutput

type IsMasterOutput struct {
	Ismaster bool `json:"ismaster"`
}

IsMaster struct gets mapped to the output of the mongo command that checks if node is master or not.

type KafkaCluster

type KafkaCluster struct {
	// contains filtered or unexported fields
}

func (*KafkaCluster) ConfigMaps

func (kc *KafkaCluster) ConfigMaps() map[string]crv1alpha1.ObjectReference

func (*KafkaCluster) Count

func (kc *KafkaCluster) Count(ctx context.Context) (int, error)

func (*KafkaCluster) GetClusterScopedResources

func (kc *KafkaCluster) GetClusterScopedResources(ctx context.Context) []crv1alpha1.ObjectReference

func (*KafkaCluster) Init

func (kc *KafkaCluster) Init(context.Context) error

func (*KafkaCluster) Initialize

func (kc *KafkaCluster) Initialize(ctx context.Context) error

Initialize is used to initialize the database or create schema

func (*KafkaCluster) Insert

func (kc *KafkaCluster) Insert(ctx context.Context) error

func (*KafkaCluster) InsertRecord

func (kc *KafkaCluster) InsertRecord(ctx context.Context, namespace string) error

InsertRecord creates a topic and insert a record

func (*KafkaCluster) Install

func (kc *KafkaCluster) Install(ctx context.Context, namespace string) error

func (*KafkaCluster) IsReady

func (kc *KafkaCluster) IsReady(ctx context.Context) (bool, error)

func (*KafkaCluster) Object

Object return the configmap referred in blueprint

func (*KafkaCluster) Ping

func (kc *KafkaCluster) Ping(ctx context.Context) error

func (*KafkaCluster) Reset

func (kc *KafkaCluster) Reset(ctx context.Context) error

func (*KafkaCluster) Secrets

func (kc *KafkaCluster) Secrets() map[string]crv1alpha1.ObjectReference

func (*KafkaCluster) Uninstall

func (kc *KafkaCluster) Uninstall(ctx context.Context) error

type MariaDB

type MariaDB struct {
	// contains filtered or unexported fields
}

func (*MariaDB) Count

func (m *MariaDB) Count(ctx context.Context) (int, error)

func (*MariaDB) GetClusterScopedResources

func (m *MariaDB) GetClusterScopedResources(ctx context.Context) []crv1alpha1.ObjectReference

func (*MariaDB) Init

func (m *MariaDB) Init(context.Context) error

func (*MariaDB) Initialize

func (m *MariaDB) Initialize(ctx context.Context) error

func (*MariaDB) Insert

func (m *MariaDB) Insert(ctx context.Context) error

func (*MariaDB) Install

func (m *MariaDB) Install(ctx context.Context, namespace string) error

func (*MariaDB) IsReady

func (m *MariaDB) IsReady(ctx context.Context) (bool, error)

func (*MariaDB) Object

func (m *MariaDB) Object() crv1alpha1.ObjectReference

func (*MariaDB) Ping

func (m *MariaDB) Ping(ctx context.Context) error

func (*MariaDB) Reset

func (m *MariaDB) Reset(ctx context.Context) error

func (*MariaDB) Uninstall

func (m *MariaDB) Uninstall(ctx context.Context) error

type Message

type Message struct {
	Topic     string `json:"topic"`
	Key       string `json:"key"`
	Value     string `json:"value"`
	Partition int    `json:"partition"`
	Offset    int    `json:"offset"`
}

Message describes the response we get after consuming a topic

type MongoDB

type MongoDB struct {
	// contains filtered or unexported fields
}

func (*MongoDB) Chart

func (mongo *MongoDB) Chart() *helm.ChartInfo

func (*MongoDB) Count

func (mongo *MongoDB) Count(ctx context.Context) (int, error)

func (*MongoDB) GetClusterScopedResources

func (mongo *MongoDB) GetClusterScopedResources(ctx context.Context) []crv1alpha1.ObjectReference

func (*MongoDB) Init

func (mongo *MongoDB) Init(ctx context.Context) error

func (*MongoDB) Initialize

func (mongo *MongoDB) Initialize(ctx context.Context) error

Initialize is used to initialize the database or create schema

func (*MongoDB) Insert

func (mongo *MongoDB) Insert(ctx context.Context) error

func (*MongoDB) Install

func (mongo *MongoDB) Install(ctx context.Context, namespace string) error

func (*MongoDB) IsReady

func (mongo *MongoDB) IsReady(ctx context.Context) (bool, error)

func (*MongoDB) Object

func (mongo *MongoDB) Object() crv1alpha1.ObjectReference

func (*MongoDB) Ping

func (mongo *MongoDB) Ping(ctx context.Context) error

func (*MongoDB) Reset

func (mongo *MongoDB) Reset(ctx context.Context) error

func (*MongoDB) SetChart

func (mongo *MongoDB) SetChart(chart helm.ChartInfo)

func (*MongoDB) Uninstall

func (mongo *MongoDB) Uninstall(ctx context.Context) error

type MongoDBDepConfig

type MongoDBDepConfig struct {
	// contains filtered or unexported fields
}

func (*MongoDBDepConfig) Count

func (mongo *MongoDBDepConfig) Count(ctx context.Context) (int, error)

func (*MongoDBDepConfig) GetClusterScopedResources

func (mongo *MongoDBDepConfig) GetClusterScopedResources(ctx context.Context) []crv1alpha1.ObjectReference

func (*MongoDBDepConfig) Init

func (mongo *MongoDBDepConfig) Init(context.Context) error

func (*MongoDBDepConfig) Initialize

func (mongo *MongoDBDepConfig) Initialize(ctx context.Context) error

Initialize is used to initialize the database or create schema

func (*MongoDBDepConfig) Insert

func (mongo *MongoDBDepConfig) Insert(ctx context.Context) error

func (*MongoDBDepConfig) Install

func (mongo *MongoDBDepConfig) Install(ctx context.Context, namespace string) error

func (*MongoDBDepConfig) IsReady

func (mongo *MongoDBDepConfig) IsReady(ctx context.Context) (bool, error)

func (*MongoDBDepConfig) Object

func (*MongoDBDepConfig) Ping

func (mongo *MongoDBDepConfig) Ping(ctx context.Context) error

func (*MongoDBDepConfig) Reset

func (mongo *MongoDBDepConfig) Reset(ctx context.Context) error

func (*MongoDBDepConfig) Uninstall

func (mongo *MongoDBDepConfig) Uninstall(ctx context.Context) error

type MssqlDB

type MssqlDB struct {
	// contains filtered or unexported fields
}

func (*MssqlDB) ConfigMaps

func (m *MssqlDB) ConfigMaps() map[string]crv1alpha1.ObjectReference

func (*MssqlDB) Count

func (m *MssqlDB) Count(ctx context.Context) (int, error)

func (*MssqlDB) GetClusterScopedResources

func (m *MssqlDB) GetClusterScopedResources(ctx context.Context) []crv1alpha1.ObjectReference

func (*MssqlDB) Init

func (m *MssqlDB) Init(ctx context.Context) error

func (*MssqlDB) Initialize

func (m *MssqlDB) Initialize(ctx context.Context) error

func (*MssqlDB) Insert

func (m *MssqlDB) Insert(ctx context.Context) error

func (*MssqlDB) Install

func (m *MssqlDB) Install(ctx context.Context, namespace string) error

func (*MssqlDB) IsReady

func (m *MssqlDB) IsReady(ctx context.Context) (bool, error)

func (*MssqlDB) Object

func (m *MssqlDB) Object() crv1alpha1.ObjectReference

func (*MssqlDB) Ping

func (m *MssqlDB) Ping(ctx context.Context) error

func (*MssqlDB) Reset

func (m *MssqlDB) Reset(ctx context.Context) error

func (*MssqlDB) Secrets

func (m *MssqlDB) Secrets() map[string]crv1alpha1.ObjectReference

func (*MssqlDB) Uninstall

func (m *MssqlDB) Uninstall(ctx context.Context) error

type MysqlDB

type MysqlDB struct {
	// contains filtered or unexported fields
}

func (*MysqlDB) Chart

func (mdb *MysqlDB) Chart() *helm.ChartInfo

func (*MysqlDB) ConfigMaps

func (mdb *MysqlDB) ConfigMaps() map[string]crv1alpha1.ObjectReference

func (*MysqlDB) Count

func (mdb *MysqlDB) Count(ctx context.Context) (int, error)

func (*MysqlDB) GetClusterScopedResources

func (mdb *MysqlDB) GetClusterScopedResources(ctx context.Context) []crv1alpha1.ObjectReference

func (*MysqlDB) Init

func (mdb *MysqlDB) Init(ctx context.Context) error

func (*MysqlDB) Initialize

func (mdb *MysqlDB) Initialize(ctx context.Context) error

Initialize is used to initialize the database or create schema

func (*MysqlDB) Insert

func (mdb *MysqlDB) Insert(ctx context.Context) error

func (*MysqlDB) Install

func (mdb *MysqlDB) Install(ctx context.Context, namespace string) error

func (*MysqlDB) IsReady

func (mdb *MysqlDB) IsReady(ctx context.Context) (bool, error)

func (*MysqlDB) Object

func (mdb *MysqlDB) Object() crv1alpha1.ObjectReference

func (*MysqlDB) Ping

func (mdb *MysqlDB) Ping(ctx context.Context) error

func (*MysqlDB) Reset

func (mdb *MysqlDB) Reset(ctx context.Context) error

func (*MysqlDB) Secrets

func (mdb *MysqlDB) Secrets() map[string]crv1alpha1.ObjectReference

func (*MysqlDB) SetChart

func (mdb *MysqlDB) SetChart(chart helm.ChartInfo)

func (*MysqlDB) Uninstall

func (mdb *MysqlDB) Uninstall(ctx context.Context) error

type MysqlDepConfig

type MysqlDepConfig struct {
	// contains filtered or unexported fields
}

func (*MysqlDepConfig) Count

func (mdep *MysqlDepConfig) Count(ctx context.Context) (int, error)

func (*MysqlDepConfig) GetClusterScopedResources

func (mdep *MysqlDepConfig) GetClusterScopedResources(ctx context.Context) []crv1alpha1.ObjectReference

func (*MysqlDepConfig) Init

func (mdep *MysqlDepConfig) Init(context.Context) error

func (*MysqlDepConfig) Initialize

func (mdep *MysqlDepConfig) Initialize(ctx context.Context) error

Initialize is used to initialize the database or create schema

func (*MysqlDepConfig) Insert

func (mdep *MysqlDepConfig) Insert(ctx context.Context) error

func (*MysqlDepConfig) Install

func (mdep *MysqlDepConfig) Install(ctx context.Context, namespace string) error

func (*MysqlDepConfig) IsReady

func (mdep *MysqlDepConfig) IsReady(ctx context.Context) (bool, error)

func (*MysqlDepConfig) Object

func (mdep *MysqlDepConfig) Object() crv1alpha1.ObjectReference

func (*MysqlDepConfig) Ping

func (mdep *MysqlDepConfig) Ping(ctx context.Context) error

func (*MysqlDepConfig) Reset

func (mdep *MysqlDepConfig) Reset(ctx context.Context) error

func (*MysqlDepConfig) Uninstall

func (mdep *MysqlDepConfig) Uninstall(ctx context.Context) error

type PITRBlueprint

type PITRBlueprint struct {
	AppBlueprint
}

PITRBlueprint implements Blueprint() to return Blueprint with PITR Blueprint() returns Blueprint placed at ./blueprints/{app-name}-blueprint.yaml

func (PITRBlueprint) FormatPITR

func (b PITRBlueprint) FormatPITR(pitr time.Time) string

type PITRBlueprinter

type PITRBlueprinter interface {
	Blueprinter
	// FormatPITR takes a time.Time struct and returns a string for use by a
	// Blueprint that supports PITR.
	FormatPITR(time.Time) string
}

PITRBlueprinter is optionally implemented if a Blueprint supports point-in-time recovery.

type Payload

type Payload struct {
	Name                     string `json:"name"`
	AutoOffsetReset          string `json:"auto.offset.reset"`
	Format                   string `json:"format"`
	EnableAutoCommit         bool   `json:"enable.auto.commit"`
	FetchMinBytes            int    `json:"fetch.min.bytes"`
	ConsumerRequestTimeoutMs int    `json:"consumer.request.timeout.ms"`
}

Payload sets the consumer configuration

type PostgreSQLDepConfig

type PostgreSQLDepConfig struct {
	// contains filtered or unexported fields
}

func (*PostgreSQLDepConfig) Count

func (pgres *PostgreSQLDepConfig) Count(ctx context.Context) (int, error)

func (*PostgreSQLDepConfig) GetClusterScopedResources

func (pgres *PostgreSQLDepConfig) GetClusterScopedResources(ctx context.Context) []crv1alpha1.ObjectReference

func (*PostgreSQLDepConfig) Init

func (pgres *PostgreSQLDepConfig) Init(ctx context.Context) error

func (*PostgreSQLDepConfig) Initialize

func (pgres *PostgreSQLDepConfig) Initialize(ctx context.Context) error

Initialize is used to initialize the database or create schema

func (*PostgreSQLDepConfig) Insert

func (pgres *PostgreSQLDepConfig) Insert(ctx context.Context) error

func (*PostgreSQLDepConfig) Install

func (pgres *PostgreSQLDepConfig) Install(ctx context.Context, namespace string) error

func (*PostgreSQLDepConfig) IsReady

func (pgres *PostgreSQLDepConfig) IsReady(ctx context.Context) (bool, error)

func (*PostgreSQLDepConfig) Object

func (*PostgreSQLDepConfig) Ping

func (pgres *PostgreSQLDepConfig) Ping(ctx context.Context) error

func (*PostgreSQLDepConfig) Reset

func (pgres *PostgreSQLDepConfig) Reset(ctx context.Context) error

func (*PostgreSQLDepConfig) Uninstall

func (pgres *PostgreSQLDepConfig) Uninstall(ctx context.Context) error

type PostgresDB

type PostgresDB struct {
	// contains filtered or unexported fields
}

func (PostgresDB) ConfigMaps

func (pdb PostgresDB) ConfigMaps() map[string]crv1alpha1.ObjectReference

func (PostgresDB) Count

func (pdb PostgresDB) Count(ctx context.Context) (int, error)

func (*PostgresDB) GetClusterScopedResources

func (pdp *PostgresDB) GetClusterScopedResources(ctx context.Context) []crv1alpha1.ObjectReference

func (*PostgresDB) Init

func (pdb *PostgresDB) Init(ctx context.Context) error

func (PostgresDB) Initialize

func (pdb PostgresDB) Initialize(ctx context.Context) error

Initialize is used to initialize the database or create schema

func (PostgresDB) Insert

func (pdb PostgresDB) Insert(ctx context.Context) error

func (*PostgresDB) Install

func (pdb *PostgresDB) Install(ctx context.Context, ns string) error

func (*PostgresDB) IsReady

func (pdb *PostgresDB) IsReady(ctx context.Context) (bool, error)

func (*PostgresDB) Object

func (pdb *PostgresDB) Object() crv1alpha1.ObjectReference

func (*PostgresDB) Ping

func (pdb *PostgresDB) Ping(ctx context.Context) error

Ping makes and tests DB connection

func (PostgresDB) Reset

func (pdb PostgresDB) Reset(ctx context.Context) error

func (PostgresDB) Secrets

func (pdb PostgresDB) Secrets() map[string]crv1alpha1.ObjectReference

func (PostgresDB) Uninstall

func (pdb PostgresDB) Uninstall(ctx context.Context) error

type RDSAuroraMySQLDB

type RDSAuroraMySQLDB struct {
	// contains filtered or unexported fields
}

func (*RDSAuroraMySQLDB) Count

func (a *RDSAuroraMySQLDB) Count(ctx context.Context) (int, error)

func (*RDSAuroraMySQLDB) GetClusterScopedResources

func (a *RDSAuroraMySQLDB) GetClusterScopedResources(ctx context.Context) []crv1alpha1.ObjectReference

func (*RDSAuroraMySQLDB) Init

func (*RDSAuroraMySQLDB) Initialize

func (a *RDSAuroraMySQLDB) Initialize(ctx context.Context) error

func (*RDSAuroraMySQLDB) Insert

func (a *RDSAuroraMySQLDB) Insert(ctx context.Context) error

func (*RDSAuroraMySQLDB) Install

func (a *RDSAuroraMySQLDB) Install(ctx context.Context, namespace string) error

func (*RDSAuroraMySQLDB) IsReady

func (a *RDSAuroraMySQLDB) IsReady(context.Context) (bool, error)

func (*RDSAuroraMySQLDB) Object

func (*RDSAuroraMySQLDB) Ping

func (a *RDSAuroraMySQLDB) Ping(ctx context.Context) error

func (*RDSAuroraMySQLDB) Reset

func (a *RDSAuroraMySQLDB) Reset(ctx context.Context) error

func (*RDSAuroraMySQLDB) Uninstall

func (a *RDSAuroraMySQLDB) Uninstall(ctx context.Context) error

type RDSPostgresDB

type RDSPostgresDB struct {
	// contains filtered or unexported fields
}

func (RDSPostgresDB) ConfigMaps

func (pdb RDSPostgresDB) ConfigMaps() map[string]crv1alpha1.ObjectReference

func (RDSPostgresDB) Count

func (pdb RDSPostgresDB) Count(ctx context.Context) (int, error)

func (RDSPostgresDB) GetClusterScopedResources

func (pdb RDSPostgresDB) GetClusterScopedResources(ctx context.Context) []crv1alpha1.ObjectReference

func (*RDSPostgresDB) Init

func (pdb *RDSPostgresDB) Init(ctx context.Context) error

func (RDSPostgresDB) Initialize

func (pdb RDSPostgresDB) Initialize(ctx context.Context) error

Initialize is used to initialize the database or create schema

func (RDSPostgresDB) Insert

func (pdb RDSPostgresDB) Insert(ctx context.Context) error

func (*RDSPostgresDB) Install

func (pdb *RDSPostgresDB) Install(ctx context.Context, ns string) error

func (*RDSPostgresDB) IsReady

func (pdb *RDSPostgresDB) IsReady(ctx context.Context) (bool, error)

func (*RDSPostgresDB) Object

func (*RDSPostgresDB) Ping

func (pdb *RDSPostgresDB) Ping(ctx context.Context) error

Ping makes and tests DB connection

func (RDSPostgresDB) Reset

func (pdb RDSPostgresDB) Reset(ctx context.Context) error

func (RDSPostgresDB) Secrets

func (pdb RDSPostgresDB) Secrets() map[string]crv1alpha1.ObjectReference

func (RDSPostgresDB) Uninstall

func (pdb RDSPostgresDB) Uninstall(ctx context.Context) error

type Records

type Records struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

Records takes value and place that to a partition in a topic based on hash of the key

type SubscriptionPayload

type SubscriptionPayload struct {
	Topics []string `json:"topics"`
}

SubscriptionPayload takes the list of topic names to subscribe

type TimeLogCSI

type TimeLogCSI struct {
	// contains filtered or unexported fields
}

Integration test app for CSI Snapshot functions

func (*TimeLogCSI) ConfigMaps

func (tlc *TimeLogCSI) ConfigMaps() map[string]crv1alpha1.ObjectReference

func (*TimeLogCSI) Count

func (tlc *TimeLogCSI) Count(ctx context.Context) (int, error)

func (*TimeLogCSI) GetClusterScopedResources

func (tlc *TimeLogCSI) GetClusterScopedResources(ctx context.Context) []crv1alpha1.ObjectReference

func (*TimeLogCSI) Init

func (tlc *TimeLogCSI) Init(ctx context.Context) error

Init initialises kubernetes CLI

func (*TimeLogCSI) Initialize

func (tlc *TimeLogCSI) Initialize(ctx context.Context) error

func (*TimeLogCSI) Insert

func (tlc *TimeLogCSI) Insert(ctx context.Context) error

func (*TimeLogCSI) Install

func (tlc *TimeLogCSI) Install(ctx context.Context, namespace string) error

Install deploys the TimeLogCSI App Deployment and PVC

func (*TimeLogCSI) IsReady

func (tlc *TimeLogCSI) IsReady(ctx context.Context) (bool, error)

IsReady waits for the App Deployment to be in 'Ready' state

func (*TimeLogCSI) Object

func (tlc *TimeLogCSI) Object() crv1alpha1.ObjectReference

Object defines the objectReference that will be used to create actions in blueprint

func (*TimeLogCSI) Ping

func (tlc *TimeLogCSI) Ping(ctx context.Context) error

Ping is used to check the connection with Deployment Pod

func (*TimeLogCSI) Reset

func (tlc *TimeLogCSI) Reset(ctx context.Context) error

Reset deletes the log file present at the volume mount path

func (*TimeLogCSI) Secrets

func (tlc *TimeLogCSI) Secrets() map[string]crv1alpha1.ObjectReference

func (*TimeLogCSI) Uninstall

func (tlc *TimeLogCSI) Uninstall(ctx context.Context) error

Uninstall removes the TimeLogCSI app from the cluster

Jump to

Keyboard shortcuts

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