Sha256: d958e8b312cb91fa5f7b69c2b118e7bc76c0d1fd07366f0d9ab523a5985e7709
Contents?: true
Size: 775 Bytes
Versions: 14
Compression:
Stored size: 775 Bytes
Contents
# frozen_string_literal: true module Metatron module Templates # The ConfigMap Kubernetes resource class ConfigMap < Template include Concerns::Annotated include Concerns::Namespaced attr_accessor :additional_labels, :immutable, :data def initialize(name, data = {}) super(name) @data = data @additional_labels = {} end def immutable? = !!@immutable def render { apiVersion:, kind:, metadata: { name:, labels: { "#{label_namespace}/name": name }.merge(additional_labels) }.merge(formatted_annotations).merge(formatted_namespace).compact, data:, immutable: }.compact end end end end
Version data entries
14 entries across 14 versions & 1 rubygems