Class: Kuby::Kubernetes::RegistrySecret
- Inherits:
-
KubeDSL::DSL::V1::Secret
- Object
- KubeDSL::DSL::V1::Secret
- Kuby::Kubernetes::RegistrySecret
- Defined in:
- lib/kuby/kubernetes/registry_secret.rb
Instance Method Summary collapse
-
#initialize(&block) ⇒ RegistrySecret
constructor
A new instance of RegistrySecret.
- #serialize ⇒ Object
Constructor Details
#initialize(&block) ⇒ RegistrySecret
Returns a new instance of RegistrySecret.
9 10 11 |
# File 'lib/kuby/kubernetes/registry_secret.rb', line 9 def initialize(&block) instance_eval(&block) if block end |
Instance Method Details
#serialize ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/kuby/kubernetes/registry_secret.rb', line 13 def serialize super.tap do |result| result[:type] = 'kubernetes.io/dockerconfigjson' result[:data] = { :".dockerconfigjson" => Base64.strict_encode64({ auths: docker_configs.each_with_object({}) do |dc, ret| ret.merge!(dc.serialize) end }.to_json) } end end |