Class: Kube::Cluster::Standard::VictoriaMetrics::VMUser

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

Overview

A user/route definition consumed by VMAuth: maps credentials to a set of upstream target refs. Pass the routing in the block via spec.targetRefs.

Instance Method Summary collapse

Constructor Details

#initialize(name:, username: nil, &block) ⇒ VMUser

Returns a new instance of VMUser.



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

def initialize(name:, username: nil, &block)
  super() {
    .name = name
    spec.username = username if username
    instance_exec(&block) if block
  }
end