Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultCluster ¶
func NewCluster ¶
func NewCluster(sn *v1alpha1.StorageNode, sp *v1alpha1.StorageProvider) *cnpgv1.Cluster
nolint:gocognit NewCluster returns a new Cluster
Types ¶
type Builder ¶
type Builder interface {
Build(context.Context, *v1alpha1.StorageNode, *v1alpha1.StorageProvider) *cnpgv1.Cluster
}
Builder build CloudNativePG Cluster from different parameters
type CloudNativePG ¶
CloudNativePG interface contains setter and getter
func NewCloudNativePGClient ¶
func NewCloudNativePGClient(c client.Client) CloudNativePG
NewCloudNativePGClient creates a new CloudNativePG client
type ClusterBuilder ¶
type ClusterBuilder interface { SetName(name string) ClusterBuilder SetNamespace(namespace string) ClusterBuilder SetDescription(description string) ClusterBuilder SetInstances(n int) ClusterBuilder SetImageName(name string) ClusterBuilder SetImagePullPolicy(p string) ClusterBuilder SetPostgresUID(u int64) ClusterBuilder SetPostgresGID(g int64) ClusterBuilder SetMinSyncReplicas(n int) ClusterBuilder SetMaxSyncReplicas(n int) ClusterBuilder SetReplicaClusterEnabled(e bool) ClusterBuilder SetReplicaClusterSource(s string) ClusterBuilder SetSuperuserSecret(s string) ClusterBuilder SetEnableSuperuserAccess(e *bool) ClusterBuilder SetCertificates(serverCASecret, serverTLSSecret, replicationTLSSecret, clientCASecret string, serverAltDNSNames []string) ClusterBuilder SetStorageSize(s string) ClusterBuilder SetMaxStartDelay(d int32) ClusterBuilder SetMaxStopDelay(d int32) ClusterBuilder SetMaxSwitchoverDelay(d int32) ClusterBuilder SetFailoverDelay(d int32) ClusterBuilder SetPrimaryUpdateStrategy(s string) ClusterBuilder SetPrimaryUpdateMethod(m string) ClusterBuilder SetBackupRetentionPolicy(r string) ClusterBuilder SetBackupTarget(t string) ClusterBuilder SetLogLevel(l string) ClusterBuilder Build() *cnpgv1.Cluster }
func NewClusterBuilder ¶
func NewClusterBuilder(meta metav1.Object, gvk schema.GroupVersionKind) ClusterBuilder
NewClusterBuilder returns a ClusterBuilder
Click to show internal directories.
Click to hide internal directories.