Class: Kube::Cluster::Standard::CloudNativePg::Cluster

Inherits:
Object
  • Object
show all
Defined in:
lib/kube/cluster/standard/cloud_native_pg/cluster.rb

Overview

A CloudNativePG Cluster CR. Thin wrapper: sets metadata, leaves the (large, deployment-specific) spec to the block.

Direct Known Subclasses

PostgresCluster

Instance Method Summary collapse

Constructor Details

#initialize(name: "postgres", namespace: nil, &block) ⇒ Cluster

Returns a new instance of Cluster.



13
14
15
16
17
18
19
# File 'lib/kube/cluster/standard/cloud_native_pg/cluster.rb', line 13

def initialize(name: "postgres", namespace: nil, &block)
  super() {
    .name = name
    .namespace = namespace if namespace
    instance_exec(&block) if block
  }
end