Class: Kube::Cluster::Standard::CloudNativePg::DatabaseWithExternalSecret
- Inherits:
-
Manifest
- Object
- Schema::Manifest
- Manifest
- Kube::Cluster::Standard::CloudNativePg::DatabaseWithExternalSecret
- Defined in:
- lib/kube/cluster/standard/cloud_native_pg/database_with_external_secret.rb
Instance Attribute Summary
Attributes inherited from Manifest
Instance Method Summary collapse
-
#initialize(name:, cluster: "postgres", owner: "app", &block) ⇒ DatabaseWithExternalSecret
constructor
A new instance of DatabaseWithExternalSecret.
Methods inherited from Manifest
Constructor Details
#initialize(name:, cluster: "postgres", owner: "app", &block) ⇒ DatabaseWithExternalSecret
Returns a new instance of DatabaseWithExternalSecret.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/kube/cluster/standard/cloud_native_pg/database_with_external_secret.rb', line 11 def initialize(name:, cluster: "postgres", owner: "app", &block) database = Kube::Cluster["Database"].new { .name = name spec.cluster = { name: cluster } spec.databaseReclaimPolicy = "retain" spec.ensure = "present" spec.name = name spec.owner = owner } external_secret = CloudNativePg::ExternalSecret.new(name: name) super(database, external_secret) instance_exec(&block) if block end |