Class: Kdep::Preset
- Inherits:
-
Object
- Object
- Kdep::Preset
- Defined in:
- lib/kdep/preset.rb
Constant Summary collapse
- BUILT_IN =
%w[web worker job cronjob statefulset statefulset_svc helm custom].freeze
Instance Method Summary collapse
-
#initialize(preset_name, deploy_dir) ⇒ Preset
constructor
A new instance of Preset.
- #resources ⇒ Object
Constructor Details
#initialize(preset_name, deploy_dir) ⇒ Preset
Returns a new instance of Preset.
5 6 7 8 |
# File 'lib/kdep/preset.rb', line 5 def initialize(preset_name, deploy_dir) @preset_name = preset_name @deploy_dir = deploy_dir end |
Instance Method Details
#resources ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/kdep/preset.rb', line 10 def resources path = resolve_preset_path raise "Preset not found: #{@preset_name}" unless path File.readlines(path).map(&:strip).reject do |line| line.empty? || line.start_with?("#") end end |