Sha256: ece3c295d87d977c2f63a092eaab19f2a4782d5827c551ee6ffbecf281852ff5
Contents?: true
Size: 1.26 KB
Versions: 3
Compression:
Stored size: 1.26 KB
Contents
# frozen_string_literal: true module Metatron module Templates # Template for basic Pod k8s resource class Pod < Template include Concerns::Annotated include Concerns::PodProducer def initialize(name) super(name) @kind = "Pod" end # rubocop:disable Metrics/AbcSize def render { apiVersion:, kind:, metadata: { labels: { "#{label_namespace}/name": name }.merge(additional_labels), name: }.merge(formatted_annotations), spec: { containers: [ { name: "app", image:, imagePullPolicy:, stdin: true, tty: true, resources: { limits: resource_limits, requests: resource_requests } }.merge(probes) .merge(formatted_environment) .merge(formatted_envfrom) .merge(formatted_ports) .merge(formatted_volume_mounts) .merge(formatted_container_security_context) ] + additional_containers }.merge(formatted_volumes).merge(formatted_security_context) } end # rubocop:enable Metrics/AbcSize end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
metatron-0.1.2 | lib/metatron/templates/pod.rb |
metatron-0.1.1 | lib/metatron/templates/pod.rb |
metatron-0.1.0 | lib/metatron/templates/pod.rb |