Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the db v1alpha1 API group +kubebuilder:object:generate=true +groupName=db.atlasgo.io
Index ¶
- Constants
- Variables
- func VersionFromContext(ctx context.Context) string
- func WithVersionContext(ctx context.Context, version string) context.Context
- type AtlasMigration
- func (in *AtlasMigration) DeepCopy() *AtlasMigration
- func (in *AtlasMigration) DeepCopyInto(out *AtlasMigration)
- func (in *AtlasMigration) DeepCopyObject() runtime.Object
- func (m *AtlasMigration) IncrementFailed()
- func (m *AtlasMigration) IsExceedBackoffLimit() bool
- func (m *AtlasMigration) IsHashModified(hash string) bool
- func (m *AtlasMigration) IsReady() bool
- func (m *AtlasMigration) NamespacedName() types.NamespacedName
- func (m *AtlasMigration) ResetFailed()
- func (m *AtlasMigration) SetNotReady(reason, message string)
- func (m *AtlasMigration) SetReady(status AtlasMigrationStatus)
- func (m *AtlasMigration) SetReconciling(message string)
- type AtlasMigrationList
- type AtlasMigrationSpec
- type AtlasMigrationStatus
- type AtlasSchema
- func (in *AtlasSchema) DeepCopy() *AtlasSchema
- func (in *AtlasSchema) DeepCopyInto(out *AtlasSchema)
- func (in *AtlasSchema) DeepCopyObject() runtime.Object
- func (sc *AtlasSchema) IncrementFailed()
- func (sc *AtlasSchema) IsExceedBackoffLimit() bool
- func (sc *AtlasSchema) IsHashModified(hash string) bool
- func (m *AtlasSchema) IsReady() bool
- func (s *AtlasSchema) NamespacedName() types.NamespacedName
- func (sc *AtlasSchema) ResetFailed()
- func (sc *AtlasSchema) SetNotReady(reason, msg string)
- func (sc *AtlasSchema) SetReady(status AtlasSchemaStatus, report any)
- func (sc *AtlasSchema) SetReconciling(message string)
- type AtlasSchemaList
- type AtlasSchemaSpec
- type AtlasSchemaStatus
- type CheckConfig
- type Cloud
- type CloudV0
- type ConcurrentIndex
- type Credentials
- type DeploymentFlow
- type DevDB
- type Diff
- type Dir
- type Driver
- type Lint
- type LintReview
- type MigrateExecOrder
- type Policy
- type ProjectConfigSpec
- func (in *ProjectConfigSpec) DeepCopy() *ProjectConfigSpec
- func (in *ProjectConfigSpec) DeepCopyInto(out *ProjectConfigSpec)
- func (s ProjectConfigSpec) GetConfig(ctx context.Context, r client.Reader, ns string) (*hclwrite.File, error)
- func (s ProjectConfigSpec) GetVars(ctx context.Context, r client.Reader, ns string) (atlasexec.Vars2, error)
- type ProtectFlows
- type Remote
- type Schema
- type Secret
- type SkipChanges
- type TargetSpec
- type TokenFrom
- type TransactionMode
- type ValueFrom
- type Variable
Constants ¶
const ( SchemaTypeAtlas = "atlas" SchemaTypeFile = "file" )
Schema reader types (URL schemes).
const ( // ReasonReconciling represents for the reconciliation is in progress. ReasonReconciling = "Reconciling" // ReasonGettingDevDB represents the reason for getting the dev database. ReasonGettingDevDB = "GettingDevDB" // ReasonWhoAmI represents the reason for getting the current user via Atlas CLI ReasonWhoAmI = "WhoAmI" // ReasonApplyingMigration represents the reason for applied a schema/migration resource successfully. ReasonApplied = "Applied" // ReasonApprovalPending represents the reason for the approval is pending. ReasonApprovalPending = "ApprovalPending" // ReasonCreatingAtlasClient represents the reason for creating an Atlas client. ReasonCreatingAtlasClient = "CreatingAtlasClient" // ReasonCreatingWorkingDir represents the reason for creating a working directory. ReasonCreatingWorkingDir = "CreatingWorkingDir" // ReasonLogin represents the reason for logging in to Atlas. ReasonLogin = "Login" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "db.atlasgo.io", 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 ¶
func VersionFromContext ¶ added in v0.3.7
VersionFromContext returns the version from the given context.
Types ¶
type AtlasMigration ¶ added in v0.1.7
type AtlasMigration struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec AtlasMigrationSpec `json:"spec,omitempty"`
//+kubebuilder:default={"observedGeneration":-1}
Status AtlasMigrationStatus `json:"status,omitempty"`
}
+kubebuilder:object:root=true +kubebuilder:subresource:status
AtlasMigration is the Schema for the atlasmigrations API +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].status` +kubebuilder:printcolumn:name="Reason",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].reason`
func (*AtlasMigration) DeepCopy ¶ added in v0.1.7
func (in *AtlasMigration) DeepCopy() *AtlasMigration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AtlasMigration.
func (*AtlasMigration) DeepCopyInto ¶ added in v0.1.7
func (in *AtlasMigration) DeepCopyInto(out *AtlasMigration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AtlasMigration) DeepCopyObject ¶ added in v0.1.7
func (in *AtlasMigration) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*AtlasMigration) IncrementFailed ¶ added in v0.7.3
func (m *AtlasMigration) IncrementFailed()
IncrementFailed increments the failed count.
func (*AtlasMigration) IsExceedBackoffLimit ¶ added in v0.7.3
func (m *AtlasMigration) IsExceedBackoffLimit() bool
IsExceedBackoffLimit returns true if the failed count exceeds the backoff limit.
func (*AtlasMigration) IsHashModified ¶ added in v0.1.8
func (m *AtlasMigration) IsHashModified(hash string) bool
IsHashModified returns true if the hash is different from the observed hash.
func (*AtlasMigration) IsReady ¶ added in v0.1.8
func (m *AtlasMigration) IsReady() bool
IsReady returns true if the ready condition is true.
func (*AtlasMigration) NamespacedName ¶ added in v0.1.7
func (m *AtlasMigration) NamespacedName() types.NamespacedName
NamespacedName returns the namespaced name of the object.
func (*AtlasMigration) ResetFailed ¶ added in v0.7.3
func (m *AtlasMigration) ResetFailed()
ResetFailed resets the failed count.
func (*AtlasMigration) SetNotReady ¶ added in v0.1.8
func (m *AtlasMigration) SetNotReady(reason, message string)
SetNotReady sets the ready condition to false.
func (*AtlasMigration) SetReady ¶ added in v0.1.8
func (m *AtlasMigration) SetReady(status AtlasMigrationStatus)
SetReady sets the ready condition to true.
func (*AtlasMigration) SetReconciling ¶ added in v0.7.3
func (m *AtlasMigration) SetReconciling(message string)
SetReconciling sets the ready condition to false with the reason "Reconciling".
type AtlasMigrationList ¶ added in v0.1.7
type AtlasMigrationList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []AtlasMigration `json:"items"`
}
+kubebuilder:object:root=true
AtlasMigrationList contains a list of AtlasMigration
func (*AtlasMigrationList) DeepCopy ¶ added in v0.1.7
func (in *AtlasMigrationList) DeepCopy() *AtlasMigrationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AtlasMigrationList.
func (*AtlasMigrationList) DeepCopyInto ¶ added in v0.1.7
func (in *AtlasMigrationList) DeepCopyInto(out *AtlasMigrationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AtlasMigrationList) DeepCopyObject ¶ added in v0.1.7
func (in *AtlasMigrationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AtlasMigrationSpec ¶ added in v0.1.7
type AtlasMigrationSpec struct {
TargetSpec `json:",inline"`
ProjectConfigSpec `json:",inline"`
// EnvName sets the environment name used for reporting runs to Atlas Cloud.
EnvName string `json:"envName,omitempty"`
// Cloud defines the Atlas Cloud configuration.
Cloud CloudV0 `json:"cloud,omitempty"`
// Dir defines the directory to use for migrations as a configmap key reference.
Dir Dir `json:"dir"`
// DevURL is the URL of the database to use for normalization and calculations.
// If not specified, the operator will spin up a temporary database container to use for these operations.
// +optional
DevURL string `json:"devURL"`
// DevURLFrom is a reference to a secret containing the URL of the database to use for normalization and calculations.
// +optional
DevURLFrom Secret `json:"devURLFrom,omitempty"`
// RevisionsSchema defines the schema that revisions table resides in
RevisionsSchema string `json:"revisionsSchema,omitempty"`
// BaselineVersion defines the baseline version of the database on the first migration.
Baseline string `json:"baseline,omitempty"`
// ExecOrder controls how Atlas computes and executes pending migration files to the database.
// +kubebuilder:default=linear
ExecOrder MigrateExecOrder `json:"execOrder,omitempty"`
// ProtectedFlows defines the protected flows of a deployment.
ProtectedFlows *ProtectFlows `json:"protectedFlows,omitempty"`
// BackoffLimit is the number of retries on error.
// +kubebuilder:default=20
BackoffLimit int `json:"backoffLimit,omitempty"`
}
AtlasMigrationSpec defines the desired state of AtlasMigration
func (*AtlasMigrationSpec) DeepCopy ¶ added in v0.1.7
func (in *AtlasMigrationSpec) DeepCopy() *AtlasMigrationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AtlasMigrationSpec.
func (*AtlasMigrationSpec) DeepCopyInto ¶ added in v0.1.7
func (in *AtlasMigrationSpec) DeepCopyInto(out *AtlasMigrationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AtlasMigrationStatus ¶ added in v0.1.7
type AtlasMigrationStatus struct {
// ObservedGeneration is the generation last processed by the controller.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Conditions represent the latest available observations of an object's state.
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
// LastAppliedVersion is the version of the most recent successful versioned migration.
// +optional
LastAppliedVersion string `json:"lastAppliedVersion,omitempty"`
// LastDeploymentURL is the Deployment URL of the most recent successful versioned migration.
// +optional
LastDeploymentURL string `json:"lastDeploymentUrl,omitempty"`
// ApprovalURL is the URL to approve the migration.
// +optional
ApprovalURL string `json:"approvalUrl,omitempty"`
// ObservedHash is the hash of the most recent successful versioned migration.
// +optional
ObservedHash string `json:"observed_hash"`
// LastApplied is the unix timestamp of the most recent successful versioned migration.
// +optional
LastApplied int64 `json:"lastApplied"`
// Failed is the number of times the migration has failed.
// +optional
// +kubebuilder:default=0
Failed int `json:"failed"`
}
AtlasMigrationStatus defines the observed state of AtlasMigration
func (*AtlasMigrationStatus) DeepCopy ¶ added in v0.1.7
func (in *AtlasMigrationStatus) DeepCopy() *AtlasMigrationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AtlasMigrationStatus.
func (*AtlasMigrationStatus) DeepCopyInto ¶ added in v0.1.7
func (in *AtlasMigrationStatus) DeepCopyInto(out *AtlasMigrationStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AtlasSchema ¶
type AtlasSchema struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec AtlasSchemaSpec `json:"spec,omitempty"`
//+kubebuilder:default={"observedGeneration":-1}
Status AtlasSchemaStatus `json:"status,omitempty"`
}
+kubebuilder:object:root=true +kubebuilder:subresource:status
AtlasSchema is the Schema for the atlasschemas API +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].status` +kubebuilder:printcolumn:name="Reason",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].reason`
func (*AtlasSchema) DeepCopy ¶
func (in *AtlasSchema) DeepCopy() *AtlasSchema
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AtlasSchema.
func (*AtlasSchema) DeepCopyInto ¶
func (in *AtlasSchema) DeepCopyInto(out *AtlasSchema)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AtlasSchema) DeepCopyObject ¶
func (in *AtlasSchema) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*AtlasSchema) IncrementFailed ¶ added in v0.7.3
func (sc *AtlasSchema) IncrementFailed()
IncrementFailed increments the failed count.
func (*AtlasSchema) IsExceedBackoffLimit ¶ added in v0.7.3
func (sc *AtlasSchema) IsExceedBackoffLimit() bool
IsExceedBackoffLimit returns true if the failed count exceeds the backoff limit.
func (*AtlasSchema) IsHashModified ¶ added in v0.3.1
func (sc *AtlasSchema) IsHashModified(hash string) bool
IsHashModified returns true if the hash is different from the observed hash.
func (*AtlasSchema) IsReady ¶ added in v0.3.1
func (m *AtlasSchema) IsReady() bool
IsReady returns true if the ready condition is true.
func (*AtlasSchema) NamespacedName ¶ added in v0.1.7
func (s *AtlasSchema) NamespacedName() types.NamespacedName
NamespacedName returns the namespaced name of the object.
func (*AtlasSchema) ResetFailed ¶ added in v0.7.3
func (sc *AtlasSchema) ResetFailed()
ResetFailed resets the failed count.
func (*AtlasSchema) SetNotReady ¶ added in v0.3.1
func (sc *AtlasSchema) SetNotReady(reason, msg string)
SetNotReady sets the Ready condition to false with the given reason and message.
func (*AtlasSchema) SetReady ¶ added in v0.3.1
func (sc *AtlasSchema) SetReady(status AtlasSchemaStatus, report any)
SetReady sets the Ready condition to true
func (*AtlasSchema) SetReconciling ¶ added in v0.7.3
func (sc *AtlasSchema) SetReconciling(message string)
SetReconciling sets the ready condition to false with the reason "Reconciling".
type AtlasSchemaList ¶
type AtlasSchemaList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []AtlasSchema `json:"items"`
}
+kubebuilder:object:root=true
AtlasSchemaList contains a list of AtlasSchema
func (*AtlasSchemaList) DeepCopy ¶
func (in *AtlasSchemaList) DeepCopy() *AtlasSchemaList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AtlasSchemaList.
func (*AtlasSchemaList) DeepCopyInto ¶
func (in *AtlasSchemaList) DeepCopyInto(out *AtlasSchemaList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AtlasSchemaList) DeepCopyObject ¶
func (in *AtlasSchemaList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AtlasSchemaSpec ¶
type AtlasSchemaSpec struct {
TargetSpec `json:",inline"`
ProjectConfigSpec `json:",inline"`
// Desired Schema of the target.
Schema Schema `json:"schema,omitempty"`
// Cloud defines the Atlas Cloud configuration.
Cloud Cloud `json:"cloud,omitempty"`
// +optional
// DevURL is the URL of the database to use for normalization and calculations.
// If not specified, the operator will spin up a temporary database container to use for these operations.
DevURL string `json:"devURL"`
// DevURLFrom is a reference to a secret containing the URL of the database to use for normalization and calculations.
// +optional
DevURLFrom Secret `json:"devURLFrom,omitempty"`
// Exclude a list of glob patterns used to filter existing resources being taken into account.
Exclude []string `json:"exclude,omitempty"`
// TxMode defines the transaction mode to use when applying the schema.
// +kubebuilder:default=file
TxMode TransactionMode `json:"txMode,omitempty"`
// Policy defines the policies to apply when managing the schema change lifecycle.
Policy *Policy `json:"policy,omitempty"`
// The names of the schemas (named databases) on the target database to be managed.
Schemas []string `json:"schemas,omitempty"`
// BackoffLimit is the number of retries on error.
// +kubebuilder:default=20
BackoffLimit int `json:"backoffLimit,omitempty"`
}
AtlasSchemaSpec defines the desired state of AtlasSchema
func (*AtlasSchemaSpec) DeepCopy ¶
func (in *AtlasSchemaSpec) DeepCopy() *AtlasSchemaSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AtlasSchemaSpec.
func (*AtlasSchemaSpec) DeepCopyInto ¶
func (in *AtlasSchemaSpec) DeepCopyInto(out *AtlasSchemaSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AtlasSchemaStatus ¶
type AtlasSchemaStatus struct {
// ObservedGeneration is the generation last processed by the controller.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Conditions represent the latest available observations of an object's state.
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
// ObservedHash is the hash of the most recently applied schema.
// +optional
ObservedHash string `json:"observed_hash"`
// LastApplied is the unix timestamp of the most recent successful schema apply operation.
// +optional
LastApplied int64 `json:"last_applied"`
// PlanURL is the URL of the schema plan to apply.
// +optional
PlanURL string `json:"planURL"`
// PlanLink is the link to the schema plan on the Atlas Cloud.
// +optional
PlanLink string `json:"planLink"`
// Failed is the number of times the schema has failed to apply.
// +optional
// +kubebuilder:default=0
Failed int `json:"failed"`
}
AtlasSchemaStatus defines the observed state of AtlasSchema
func (*AtlasSchemaStatus) DeepCopy ¶
func (in *AtlasSchemaStatus) DeepCopy() *AtlasSchemaStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AtlasSchemaStatus.
func (*AtlasSchemaStatus) DeepCopyInto ¶
func (in *AtlasSchemaStatus) DeepCopyInto(out *AtlasSchemaStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CheckConfig ¶
type CheckConfig struct {
Error bool `json:"error,omitempty"`
}
CheckConfig defines the configuration of a linting check.
func (*CheckConfig) DeepCopy ¶
func (in *CheckConfig) DeepCopy() *CheckConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CheckConfig.
func (*CheckConfig) DeepCopyInto ¶
func (in *CheckConfig) DeepCopyInto(out *CheckConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Cloud ¶ added in v0.1.7
type Cloud struct {
// TokenFrom defines the reference to the secret key that contains the Atlas Cloud Token.
TokenFrom TokenFrom `json:"tokenFrom,omitempty"`
// Repo is the name of repository on the Atlas Cloud.
Repo string `json:"repo,omitempty"`
}
Cloud defines the Atlas Cloud configuration.
func (*Cloud) DeepCopy ¶ added in v0.1.7
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cloud.
func (*Cloud) DeepCopyInto ¶ added in v0.1.7
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CloudV0 ¶ added in v0.6.0
type CloudV0 struct {
URL string `json:"url,omitempty"`
TokenFrom TokenFrom `json:"tokenFrom,omitempty"`
Project string `json:"project,omitempty"`
}
func (*CloudV0) DeepCopy ¶ added in v0.6.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudV0.
func (*CloudV0) DeepCopyInto ¶ added in v0.6.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConcurrentIndex ¶ added in v0.4.3
type ConcurrentIndex struct {
// +optional
Create bool `json:"create,omitempty"`
// +optional
Drop bool `json:"drop,omitempty"`
}
func (*ConcurrentIndex) DeepCopy ¶ added in v0.4.3
func (in *ConcurrentIndex) DeepCopy() *ConcurrentIndex
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConcurrentIndex.
func (*ConcurrentIndex) DeepCopyInto ¶ added in v0.4.3
func (in *ConcurrentIndex) DeepCopyInto(out *ConcurrentIndex)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Credentials ¶ added in v0.2.2
type Credentials struct {
Scheme string `json:"scheme,omitempty"`
User string `json:"user,omitempty"`
UserFrom Secret `json:"userFrom,omitempty"`
Password string `json:"password,omitempty"`
PasswordFrom Secret `json:"passwordFrom,omitempty"`
Host string `json:"host,omitempty"`
HostFrom Secret `json:"hostFrom,omitempty"`
Port int `json:"port,omitempty"`
Database string `json:"database,omitempty"`
Parameters map[string]string `json:"parameters,omitempty"`
}
Credentials defines the credentials to use when connecting to the database.
func (*Credentials) DeepCopy ¶ added in v0.2.2
func (in *Credentials) DeepCopy() *Credentials
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Credentials.
func (*Credentials) DeepCopyInto ¶ added in v0.2.2
func (in *Credentials) DeepCopyInto(out *Credentials)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeploymentFlow ¶ added in v0.5.0
type DeploymentFlow struct {
// Allow allows the flow to be executed.
// +kubebuilder:default=false
Allow bool `json:"allow,omitempty"`
// AutoApprove allows the flow to be automatically approved.
// +kubebuilder:default=false
AutoApprove bool `json:"autoApprove,omitempty"`
}
DeploymentFlow defines the flow of a deployment.
func (*DeploymentFlow) DeepCopy ¶ added in v0.5.0
func (in *DeploymentFlow) DeepCopy() *DeploymentFlow
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentFlow.
func (*DeploymentFlow) DeepCopyInto ¶ added in v0.5.0
func (in *DeploymentFlow) DeepCopyInto(out *DeploymentFlow)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DevDB ¶ added in v0.7.11
func (*DevDB) DeepCopy ¶ added in v0.7.11
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevDB.
func (*DevDB) DeepCopyInto ¶ added in v0.7.11
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Diff ¶
type Diff struct {
ConcurrentIndex *ConcurrentIndex `json:"concurrent_index,omitempty"`
Skip *SkipChanges `json:"skip,omitempty"`
}
Diff defines the diff policies to apply when planning schema changes.
func (*Diff) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Diff.
func (*Diff) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Dir ¶ added in v0.1.7
type Dir struct {
// ConfigMapRef defines the configmap to use for migrations
ConfigMapRef *corev1.LocalObjectReference `json:"configMapRef,omitempty"`
// Remote defines the Atlas Cloud migration directory.
Remote Remote `json:"remote,omitempty"`
// Local defines the local migration directory.
Local map[string]string `json:"local,omitempty"`
}
Dir defines the place where migrations are stored.
func (*Dir) DeepCopy ¶ added in v0.1.7
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Dir.
func (*Dir) DeepCopyInto ¶ added in v0.1.7
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Driver ¶ added in v0.6.0
type Driver string
Driver defines the database driver.
const ( DriverClickHouse Driver = "clickhouse" DriverCockroachDB Driver = "crdb" DriverDatabricks Driver = "databricks" DriverDSQL Driver = "dsql" DriverMariaDB Driver = "mariadb" DriverMySQL Driver = "mysql" DriverOracle Driver = "oracle" DriverPostgres Driver = "postgres" DriverRedshift Driver = "redshift" DriverSnowflake Driver = "snowflake" DriverSpanner Driver = "spanner" DriverSQLite Driver = "sqlite" DriverSQLServer Driver = "sqlserver" DriverYSQL Driver = "ysql" )
func DriverBySchema ¶ added in v0.5.0
DriverBySchema returns the driver from the given schema. it remove the schema modifier if present. e.g. mysql+unix -> mysql it also handles aliases. e.g. mariadb -> mysql
func (Driver) SchemaBound ¶ added in v0.6.0
SchemaBound returns true if the driver requires a schema.
type Lint ¶
type Lint struct {
Destructive *CheckConfig `json:"destructive,omitempty"`
// Review defines the review policy to apply after linting the schema changes (default: "ERROR").
// Atlas Cloud login is required.
Review LintReview `json:"review,omitempty"`
}
Lint defines the linting policies to apply before applying the schema.
func (*Lint) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Lint.
func (*Lint) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LintReview ¶ added in v0.6.0
type LintReview string
LintReview defines the review policies to apply after linting the schema. +kubebuilder:validation:Enum=ALWAYS;WARNING;ERROR
const ( LintReviewAlways LintReview = "ALWAYS" LintReviewWarning LintReview = "WARNING" LintReviewError LintReview = "ERROR" )
LintReview values.
type MigrateExecOrder ¶ added in v0.3.7
type MigrateExecOrder string
ExecOrder controls how Atlas computes and executes pending migration files to the database. +kubebuilder:validation:Enum=linear;linear-skip;non-linear
type Policy ¶
Policy defines the policies to apply when managing the schema change lifecycle.
func (*Policy) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Policy.
func (*Policy) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Policy) HasLintDestructive ¶ added in v0.7.1
func (*Policy) HasLintReview ¶ added in v0.7.1
type ProjectConfigSpec ¶ added in v0.7.0
type ProjectConfigSpec struct {
// Config defines the project configuration.
// Should be a valid YAML string.
Config string `json:"config,omitempty"`
// ConfigFrom defines the reference to the secret key that contains the project configuration.
ConfigFrom Secret `json:"configFrom,omitempty"`
// EnvName defines the environment name that defined in the project configuration.
// If not defined, the default environment "k8s" will be used.
EnvName string `json:"envName,omitempty"`
// Vars defines the input variables for the project configuration.
Vars []Variable `json:"vars,omitempty"`
// devDB defines the custom dev database pod spec to use for normalization and calculations.
// If not defined, a default pod spec will be created based on the type (driver) of the target database.
// When a custom devDB spec is provided, the devURL must be defined as well.
// +optional
DevDB *DevDB `json:"devDB,omitempty"`
}
ProjectConfigSpec defines the project configuration.
func (*ProjectConfigSpec) DeepCopy ¶ added in v0.7.0
func (in *ProjectConfigSpec) DeepCopy() *ProjectConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectConfigSpec.
func (*ProjectConfigSpec) DeepCopyInto ¶ added in v0.7.0
func (in *ProjectConfigSpec) DeepCopyInto(out *ProjectConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProtectFlows ¶ added in v0.5.0
type ProtectFlows struct {
MigrateDown *DeploymentFlow `json:"migrateDown,omitempty"`
}
ProtectedFlows defines the protected flows of a deployment.
func (*ProtectFlows) DeepCopy ¶ added in v0.5.0
func (in *ProtectFlows) DeepCopy() *ProtectFlows
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtectFlows.
func (*ProtectFlows) DeepCopyInto ¶ added in v0.5.0
func (in *ProtectFlows) DeepCopyInto(out *ProtectFlows)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Remote ¶ added in v0.1.7
Remote defines the Atlas Cloud directory migration.
func (*Remote) DeepCopy ¶ added in v0.1.7
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Remote.
func (*Remote) DeepCopyInto ¶ added in v0.1.7
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Schema ¶
type Schema struct {
SQL string `json:"sql,omitempty"`
HCL string `json:"hcl,omitempty"`
URL string `json:"url,omitempty"`
ConfigMapKeyRef *corev1.ConfigMapKeySelector `json:"configMapKeyRef,omitempty"`
}
Schema defines the desired state of the target database schema in plain SQL or HCL.
func (*Schema) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Schema.
func (*Schema) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Secret ¶ added in v0.3.3
type Secret struct {
// SecretKeyRef defines the secret key reference to use for the user.
SecretKeyRef *corev1.SecretKeySelector `json:"secretKeyRef,omitempty"`
}
Secret defines a secret key reference.
func (*Secret) DeepCopy ¶ added in v0.3.3
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Secret.
func (*Secret) DeepCopyInto ¶ added in v0.3.3
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SkipChanges ¶
type SkipChanges struct {
// +optional
AddSchema bool `json:"add_schema,omitempty"`
// +optional
DropSchema bool `json:"drop_schema,omitempty"`
// +optional
ModifySchema bool `json:"modify_schema,omitempty"`
// +optional
AddTable bool `json:"add_table,omitempty"`
// +optional
DropTable bool `json:"drop_table,omitempty"`
// +optional
ModifyTable bool `json:"modify_table,omitempty"`
// +optional
AddColumn bool `json:"add_column,omitempty"`
// +optional
DropColumn bool `json:"drop_column,omitempty"`
// +optional
ModifyColumn bool `json:"modify_column,omitempty"`
// +optional
AddIndex bool `json:"add_index,omitempty"`
// +optional
DropIndex bool `json:"drop_index,omitempty"`
// +optional
ModifyIndex bool `json:"modify_index,omitempty"`
// +optional
AddForeignKey bool `json:"add_foreign_key,omitempty"`
// +optional
DropForeignKey bool `json:"drop_foreign_key,omitempty"`
// +optional
ModifyForeignKey bool `json:"modify_foreign_key,omitempty"`
}
SkipChanges represents the skip changes policy.
func (*SkipChanges) DeepCopy ¶
func (in *SkipChanges) DeepCopy() *SkipChanges
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SkipChanges.
func (*SkipChanges) DeepCopyInto ¶
func (in *SkipChanges) DeepCopyInto(out *SkipChanges)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TargetSpec ¶ added in v0.3.1
type TargetSpec struct {
// URL of the target database schema.
URL string `json:"url,omitempty"`
// URLs may be defined as a secret key reference.
URLFrom Secret `json:"urlFrom,omitempty"`
// Credentials defines the credentials to use when connecting to the database.
// Used instead of URL or URLFrom.
Credentials Credentials `json:"credentials,omitempty"`
}
TargetSpec defines the target database to manage.
func (TargetSpec) DatabaseURL ¶ added in v0.3.1
DatabaseURL returns the database url.
func (*TargetSpec) DeepCopy ¶ added in v0.3.1
func (in *TargetSpec) DeepCopy() *TargetSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetSpec.
func (*TargetSpec) DeepCopyInto ¶ added in v0.3.1
func (in *TargetSpec) DeepCopyInto(out *TargetSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TokenFrom ¶ added in v0.1.7
type TokenFrom struct {
// SecretKeyRef references to the key of a secret in the same namespace.
SecretKeyRef *corev1.SecretKeySelector `json:"secretKeyRef,omitempty"`
}
TokenFrom defines a reference to a secret key that contains the Atlas Cloud Token
func (*TokenFrom) DeepCopy ¶ added in v0.1.7
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TokenFrom.
func (*TokenFrom) DeepCopyInto ¶ added in v0.1.7
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TransactionMode ¶ added in v0.4.3
type TransactionMode string
TransactionMode +kubebuilder:validation:Enum=file;all;none
type ValueFrom ¶ added in v0.7.0
type ValueFrom struct {
// SecretKeyRef defines the secret key reference to use for the value.
SecretKeyRef *corev1.SecretKeySelector `json:"secretKeyRef,omitempty"`
// ConfigMapKeyRef defines the configmap key reference to use for the value.
ConfigMapKeyRef *corev1.ConfigMapKeySelector `json:"configMapKeyRef,omitempty"`
}
ValueFrom defines the reference to the secret key that contains the value.
func (*ValueFrom) DeepCopy ¶ added in v0.7.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValueFrom.
func (*ValueFrom) DeepCopyInto ¶ added in v0.7.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Variable ¶ added in v0.7.0
type Variable struct {
Key string `json:"key,omitempty"`
Value string `json:"value,omitempty"`
ValueFrom ValueFrom `json:"valueFrom,omitempty"`
}
Variables defines the reference of secret/configmap to the input variables for the project configuration.
func (*Variable) DeepCopy ¶ added in v0.7.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Variable.
func (*Variable) DeepCopyInto ¶ added in v0.7.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.