Sha256: 3f208d5106746455ec4499227163cf51527d1f0c547f57f89a3419d0eadaadf5
Contents?: true
Size: 833 Bytes
Versions: 23
Compression:
Stored size: 833 Bytes
Contents
class Kubes::Compiler module Layering def pre_layers return [] if Kubes.kustomize? ext = File.extname(@path) kind = File.basename(@path).sub(ext,'') # IE: deployment all = "all" if @block_form kind = kind.pluralize all = all.pluralize end layers = [ "#{all}#{ext}", "#{all}/#{Kubes.env}#{ext}", "#{kind}#{ext}", "#{kind}/#{Kubes.env}#{ext}", ] layers.map do |layer| "#{Kubes.root}/.kubes/resources/base/#{layer}" end end def post_layers return [] if Kubes.kustomize? ext = File.extname(@path) kind_path = @path.sub(ext,'') layers = [ "base", Kubes.env.to_s ] layers.map do |layer| "#{kind_path}/#{layer}#{ext}" end end end end
Version data entries
23 entries across 23 versions & 1 rubygems