Class: CDK8sPlus25::K8S::KubePodTemplateProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- CDK8sPlus25::K8S::KubePodTemplateProps
- Defined in:
- k8_s/kube_pod_template_props.rb
Overview
PodTemplate describes a template for creating copies of a predefined pod.
Instance Attribute Summary collapse
-
#metadata ⇒ CDK8sPlus25::K8S::ObjectMeta?
readonly
Standard object's metadata.
-
#template ⇒ CDK8sPlus25::K8S::PodTemplateSpec?
readonly
Template defines the pods that will be created from this pod template.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metadata: nil, template: nil) ⇒ KubePodTemplateProps
constructor
A new instance of KubePodTemplateProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(metadata: nil, template: nil) ⇒ KubePodTemplateProps
Returns a new instance of KubePodTemplateProps.
9 10 11 12 13 14 |
# File 'k8_s/kube_pod_template_props.rb', line 9 def initialize(metadata: nil, template: nil) @metadata = .is_a?(Hash) ? ::CDK8sPlus25::K8S::ObjectMeta.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(@metadata, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1Lms4cy5PYmplY3RNZXRhIn0=", "metadata") unless @metadata.nil? @template = template.is_a?(Hash) ? ::CDK8sPlus25::K8S::PodTemplateSpec.new(**template.transform_keys(&:to_sym)) : template Jsii::Type.check_type(@template, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1Lms4cy5Qb2RUZW1wbGF0ZVNwZWMifQ==", "template") unless @template.nil? end |
Instance Attribute Details
#metadata ⇒ CDK8sPlus25::K8S::ObjectMeta? (readonly)
Standard object's metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
21 22 23 |
# File 'k8_s/kube_pod_template_props.rb', line 21 def @metadata end |
#template ⇒ CDK8sPlus25::K8S::PodTemplateSpec? (readonly)
Template defines the pods that will be created from this pod template.
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
27 28 29 |
# File 'k8_s/kube_pod_template_props.rb', line 27 def template @template end |
Class Method Details
.jsii_properties ⇒ Object
29 30 31 32 33 34 |
# File 'k8_s/kube_pod_template_props.rb', line 29 def self.jsii_properties { :metadata => "metadata", :template => "template", } end |
Instance Method Details
#to_jsii ⇒ Object
36 37 38 39 40 41 42 43 |
# File 'k8_s/kube_pod_template_props.rb', line 36 def to_jsii result = {} result.merge!({ "metadata" => @metadata, "template" => @template, }) result.compact end |