crd

package
v0.0.0-...-30f5d34 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CRDKind      string = "RDSDatabase"
	CRDSingular  string = "rdsdatabase"
	CRDPlural    string = CRDSingular + "s"
	CRDGroup     string = "aws.pmacik.dev"
	CRDVersion   string = "v1alpha1"
	ShortCRDName string = "rdsdb"
	FullCRDName  string = CRDPlural + "." + CRDGroup
)

Variables

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: CRDGroup, Version: CRDVersion}

Functions

func EnsureCRD

EnsureCRD creates the CRD resource if it does not exist, or returns the one that it's found

func NewRESTClient

func NewRESTClient(cfg *rest.Config) (*rest.RESTClient, *runtime.Scheme, error)

Create a Rest client with the new CRD Schema

Types

type PasswordSecret

type PasswordSecret struct {
	Name string `json:"name"`
	Key  string `json:"key"`
}

func (*PasswordSecret) DeepCopy

func (in *PasswordSecret) DeepCopy() *PasswordSecret

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

func (*PasswordSecret) DeepCopyInto

func (in *PasswordSecret) DeepCopyInto(out *PasswordSecret)

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

type RDSDatabase

type RDSDatabase struct {
	meta_v1.TypeMeta   `json:",inline"`
	meta_v1.ObjectMeta `json:"metadata"`
	Spec               RDSDatabaseSpec   `json:"spec"`
	Status             RDSDatabaseStatus `json:"status"`
}

RDSDatabase is the definition of our CRD RDSDatabase

func (*RDSDatabase) DeepCopy

func (in *RDSDatabase) DeepCopy() *RDSDatabase

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

func (*RDSDatabase) DeepCopyInto

func (in *RDSDatabase) DeepCopyInto(out *RDSDatabase)

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

func (*RDSDatabase) DeepCopyObject

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

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

type RDSDatabaseList

type RDSDatabaseList struct {
	meta_v1.TypeMeta `json:",inline"`
	meta_v1.ListMeta `json:"metadata"`
	Items            []RDSDatabase `json:"items"`
}

func (*RDSDatabaseList) DeepCopy

func (in *RDSDatabaseList) DeepCopy() *RDSDatabaseList

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

func (*RDSDatabaseList) DeepCopyInto

func (in *RDSDatabaseList) DeepCopyInto(out *RDSDatabaseList)

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

func (*RDSDatabaseList) DeepCopyObject

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

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

type RDSDatabaseSpec

type RDSDatabaseSpec struct {
	Username              string         `json:"username"`
	Password              PasswordSecret `json:"password"`
	DBName                string         `json:"dbName"`
	Engine                string         `json:"engine"` // "postgres"
	Class                 string         `json:"class"`  // like "db.t2.micro"
	Size                  int64          `json:"size"`   // size in gb
	MultiAZ               bool           `json:"multiAZ,omitempty"`
	PubliclyAccessible    bool           `json:"publiclyAccessible,omitempty"`
	StorageEncrypted      bool           `json:"storageEncrypted,omitempty"`
	StorageType           string         `json:"storageType,omitempty"`
	Iops                  int64          `json:"iops,omitempty"`
	BackupRetentionPeriod int64          `json:"backupRetentionPeriod,omitempty"` // between 0 and 35, zero means disable
	DeleteProtection      bool           `json:"deleteProtection,omitempty"`
}

RDSDatabaseSpec main structure describing the database instance

func (*RDSDatabaseSpec) DeepCopy

func (in *RDSDatabaseSpec) DeepCopy() *RDSDatabaseSpec

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

func (*RDSDatabaseSpec) DeepCopyInto

func (in *RDSDatabaseSpec) DeepCopyInto(out *RDSDatabaseSpec)

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

type RDSDatabaseStatus

type RDSDatabaseStatus struct {
	State              string `json:"state" description:"State of the deploy"`
	Message            string `json:"message" description:"Detailed message around the state"`
	DBConnectionConfig string `json:"dbConnectionConfig" description:"Name of a Config Map with DB Connection Configuration"`
	DBCredentials      string `json:"dbCredentials" description:"Name of the secret to hold DB Credentials"`
}

func (*RDSDatabaseStatus) DeepCopy

func (in *RDSDatabaseStatus) DeepCopy() *RDSDatabaseStatus

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

func (*RDSDatabaseStatus) DeepCopyInto

func (in *RDSDatabaseStatus) DeepCopyInto(out *RDSDatabaseStatus)

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