lib/metatron/templates/ingress.rb in metatron-0.1.8 vs lib/metatron/templates/ingress.rb in metatron-0.1.9
- old
+ new
@@ -2,10 +2,12 @@
module Metatron
module Templates
# Template for basic Ingress k8s resource
class Ingress < Template
+ include Concerns::Namespaced
+
attr_accessor :ingress_class, :additional_labels, :additional_annotations, :rules, :tls,
:cert_manager_cluster_issuer, :cert_manager_issuer, :cert_manager_challenge_type
def initialize(name, ingress_class = "nginx")
super(name)
@@ -74,10 +76,10 @@
apiVersion:,
kind:,
metadata: {
name:,
labels: { "#{label_namespace}/name": name }.merge(additional_labels)
- }.merge(formatted_annotations),
+ }.merge(formatted_annotations).merge(formatted_namespace),
spec: formatted_rules.merge(formatted_tls)
}
end
def secret_name_from_hostname(hostname)