lib/metatron/template.rb in metatron-0.2.6 vs lib/metatron/template.rb in metatron-0.2.7
- old
+ new
@@ -1,11 +1,11 @@
# frozen_string_literal: true
module Metatron
# Base class for templating Kubernetes resources
class Template
- attr_accessor :api_version, :name
+ attr_accessor :api_version, :name, :additional_labels
attr_reader :kind, :label_namespace
class << self
attr_writer :label_namespace
@@ -17,9 +17,10 @@
def initialize(name)
@name = name
@label_namespace = self.class.label_namespace
@api_version = "v1"
@kind = find_kind
+ @additional_labels = {}
run_initializers
end
alias apiVersion api_version