Sha256: 699e8da85610a2084c064c70a4e7f51e7d5dd7bd355651f4a946b6cd0dc816bb
Contents?: true
Size: 1010 Bytes
Versions: 1
Compression:
Stored size: 1010 Bytes
Contents
module Kuby::CRDB::DSL::CRDB::V1alpha1 class SpecAffinity < ::KubeDSL::DSLObject object_field(:pod_affinity) { Kuby::CRDB::DSL::CRDB::V1alpha1::SpecAffinityPodAffinity.new } object_field(:node_affinity) { Kuby::CRDB::DSL::CRDB::V1alpha1::SpecAffinityNodeAffinity.new } object_field(:pod_anti_affinity) { Kuby::CRDB::DSL::CRDB::V1alpha1::SpecAffinityPodAntiAffinity.new } validates :pod_affinity, object: { kind_of: Kuby::CRDB::DSL::CRDB::V1alpha1::SpecAffinityPodAffinity } validates :node_affinity, object: { kind_of: Kuby::CRDB::DSL::CRDB::V1alpha1::SpecAffinityNodeAffinity } validates :pod_anti_affinity, object: { kind_of: Kuby::CRDB::DSL::CRDB::V1alpha1::SpecAffinityPodAntiAffinity } def serialize {}.tap do |result| result[:podAffinity] = pod_affinity.serialize result[:nodeAffinity] = node_affinity.serialize result[:podAntiAffinity] = pod_anti_affinity.serialize end end def kind_sym :spec_affinity 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_affinity.rb |