Class: Kube::Cluster::Standard::Perses::Perses

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

Overview

The Perses application instance the operator reconciles. Defaults to a file-backed database under /perses.

Instance Method Summary collapse

Constructor Details

#initialize(name:, image:, port: 8080, &block) ⇒ Perses

Returns a new instance of Perses.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/kube/cluster/standard/perses/perses.rb', line 13

def initialize(name:, image:, port: 8080, &block)
  super() {
    .name      = name
    spec.image         = image
    spec.containerPort = port
    spec.config = {
      database: {
        file: {
          folder:    "/perses",
          extension: "json",
        },
      },
    }
    instance_exec(&block) if block
  }
end