Documentation ¶
Index ¶
- type AppDB
- type AppDBCloudSQLDBStatus
- type AppDBCloudSQLTerraformDriver
- type AppDBCondition
- type AppDBConditionType
- type AppDBDriver
- type AppDBInstance
- type AppDBInstanceCloudSQLStatus
- type AppDBInstanceOperatorStatus
- type AppDBInstanceSpec
- type AppDBOperatorStatus
- type AppDBSpec
- type CloudSQLProxySpec
- type ConditionStatus
- type Job
- type ProvisioningStatus
- type Terraform
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppDB ¶
type AppDB struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec AppDBSpec `json:"spec,omitempty"` Status AppDBOperatorStatus `json:"status"` }
AppDB is the custom resource definition structure.
type AppDBCloudSQLDBStatus ¶
type AppDBCloudSQLDBStatus struct { TFApplyName string `json:"tfapplyName,omitempty"` TFApplyPodName string `json:"tfapplyPodName,omitempty"` TFApplySig string `json:"tfapplySig,omitempty"` }
AppDBCloudSQLDBStatus is the status structure for the CloudSQL driver
type AppDBCloudSQLTerraformDriver ¶
type AppDBCloudSQLTerraformDriver struct { Params map[string]string `json:"params,omitempty"` Proxy CloudSQLProxySpec `json:"proxy,omitempty"` }
AppDBCloudSQLDriver is the CloudSQL driver spec
type AppDBCondition ¶
type AppDBCondition struct { Type AppDBConditionType `json:"type"` Status ConditionStatus `json:"status"` LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"` LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` Reason string `json:"reason,omitempty"` Message string `json:"message,omitempty"` }
AppDBCondition defines the format for a status condition element.
type AppDBConditionType ¶
type AppDBConditionType string
AppDBConditionType is a valid value for AppDBCondition.Type
const ( // ConditionTypeAppDBInstanceReady is True when the AppDBInstance resource is available and ready. ConditionTypeAppDBInstanceReady AppDBConditionType = "AppDBInstanceReady" // ConditionTypeDBCreateComplete is True when the DB create driver action is complete. ConditionTypeDBCreateComplete AppDBConditionType = "DBCreateComplete" // ConditionTypeSnapshotLoadComplete is True when the Job for loading SQL data has been created and is complete. ConditionTypeSnapshotLoadComplete AppDBConditionType = "SnapshotLoadComplete" // ConditionTypeCredentialsSecretCreated is True when the secret containing the database credentials and info has been created. ConditionTypeCredentialsSecretCreated AppDBConditionType = "CredentialsSecretCreated" // ConditionTypeAppDBReady means that all prior conditions are Ready ConditionTypeAppDBReady AppDBConditionType = "Ready" )
The condition type constants listed below are in the order they should roughly happen and in the order they exist in the status.conditions list. This gives visibility to what the operator is doing. Some conditions can be satisfied in parallel with others.
type AppDBDriver ¶
type AppDBDriver struct {
CloudSQLTerraform *AppDBCloudSQLTerraformDriver `json:"cloudSQLTerraform,omitempty"`
}
AppDBDriver is the spec of the driver
type AppDBInstance ¶
type AppDBInstance struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec AppDBInstanceSpec `json:"spec,omitempty"` Status AppDBInstanceOperatorStatus `json:"status"` }
AppDBInstance is the custom resource definition structure.
func (*AppDBInstance) Log ¶
func (parent *AppDBInstance) Log(level, msgfmt string, fmtargs ...interface{})
Log is a conventional log method to print the parent name and kind before the log message.
type AppDBInstanceCloudSQLStatus ¶
type AppDBInstanceCloudSQLStatus struct { InstanceName string `json:"instanceName,omitempty"` ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` ConnectionName string `json:"connectionName,omitempty"` Port int32 `json:"port,omitempty"` ProxyService string `json:"proxyService,omitempty"` ProxySecret string `json:"proxySecret,omitempty"` TFApplyName string `json:"tfapplyName,omitempty"` TFApplyPodName string `json:"tfapplyPodName,omitempty"` TFApplySig string `json:"tfapplySig,omitempty"` TFPlanName string `json:"tfplanName,omitempty"` TFPlanPodName string `json:"tfplanPodName,omitempty"` TFPlanSig string `json:"tfplanSig,omitempty"` }
AppDBInstanceCloudSQLStatus is the status structure for the CloudSQL driver
type AppDBInstanceOperatorStatus ¶
type AppDBInstanceOperatorStatus struct { Provisioning ProvisioningStatus `json:"provisioning"` DBHost string `json:"dbHost"` DBPort int32 `json:"dbPort"` CloudSQL *AppDBInstanceCloudSQLStatus `json:"cloudSQL"` }
AppDBInstanceOperatorStatus is the status structure for the custom resource
type AppDBInstanceSpec ¶
type AppDBInstanceSpec struct {
Driver AppDBDriver `json:"driver,omitempty"`
}
AppDBInstanceSpec is the top level structure of the spec body
type AppDBOperatorStatus ¶
type AppDBOperatorStatus struct { Provisioning ProvisioningStatus `json:"provisioning,omitempty"` AppDBInstanceSig string `json:"appDBInstanceSig,omitempty"` CloudSQLDB *AppDBCloudSQLDBStatus `json:"cloudSQLDB,omitempty"` CredentialsSecrets map[string]string `json:"credentialsSecrets,omitempty"` Conditions []AppDBCondition `json:"conditions,omitempty"` }
AppDBOperatorStatus is the status structure for the custom resource
type AppDBSpec ¶
type AppDBSpec struct { AppDBInstance string `json:"appDBInstance,omitempty"` DBName string `json:"dbName,omitempty"` Users []string `json:"users,omitempty"` LoadURL string `json:"loadURL,omitempty"` }
AppDBSpec is the top level structure of the spec body
type CloudSQLProxySpec ¶
type CloudSQLProxySpec struct { Image string `json:"image,omitempty"` ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"` Replicas int32 `json:"replicas,omitempty"` }
CloudSQLProxySpec is the spec for a cloudsql proxy
type ConditionStatus ¶
type ConditionStatus string
const ( ConditionTrue ConditionStatus = "True" ConditionFalse ConditionStatus = "False" ConditionUnknown ConditionStatus = "Unknown" )
type Job ¶
type Job struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec batchv1.JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` }
Job is a copy of batchv1.Job with the exception of the status field. This is used when marshaling so that the Status field does not interfere.
type ProvisioningStatus ¶
type ProvisioningStatus string
ProvisioningStatus represents the string mapping to the possible status.Provisioning values. See the const definition below for enumerated states.
const ( ProvisioningStatusPending ProvisioningStatus = "PENDING" ProvisioningStatusFailed ProvisioningStatus = "FAILED" ProvisioningStatusComplete ProvisioningStatus = "COMPLETE" )
type Terraform ¶
type Terraform struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec tfv1.TerraformSpec `json:"spec,omitempty"` SpecFrom tfv1.TerraformSpecFrom `json:"specFrom,omitempty"` }
Terraform is a copy of tfv1.Terraform with the exception of the status field. This is used when marshaling so that the Status field does not interfere.