Sha256: b1eaa94c2006a9bc206f30a9a55b4ddd323c69a55ca73e221f6ae62ac3b9d79c

Contents?: true

Size: 529 Bytes

Versions: 1

Compression:

Stored size: 529 Bytes

Contents

module Kuby::CRDB::DSL::CRDB::V1alpha1
  class SpecResources < ::KubeDSL::DSLObject
    key_value_field(:requests, format: :string)
    key_value_field(:limits, format: :string)

    validates :requests, kv: { value_format: :string }, presence: true
    validates :limits, kv: { value_format: :string }, presence: true

    def serialize
      {}.tap do |result|
        result[:requests] = requests.serialize
        result[:limits] = limits.serialize
      end
    end

    def kind_sym
      :spec_resources
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kuby-crdb-0.1.0 lib/kuby/crdb/dsl/crdb/v1alpha1/spec_resources.rb