Class: CDK8sPlus25::K8S::PodDNSConfig
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- CDK8sPlus25::K8S::PodDNSConfig
- Defined in:
- k8_s/pod_dns_config.rb
Overview
PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy.
Instance Attribute Summary collapse
-
#nameservers ⇒ Array<String>?
readonly
A list of DNS name server IP addresses.
-
#options ⇒ Array<CDK8sPlus25::K8S::PodDNSConfigOption>?
readonly
A list of DNS resolver options.
-
#searches ⇒ Array<String>?
readonly
A list of DNS search domains for host-name lookup.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(nameservers: nil, options: nil, searches: nil) ⇒ PodDNSConfig
constructor
A new instance of PodDNSConfig.
- #to_jsii ⇒ Object
Constructor Details
#initialize(nameservers: nil, options: nil, searches: nil) ⇒ PodDNSConfig
Returns a new instance of PodDNSConfig.
10 11 12 13 14 15 16 17 |
# File 'k8_s/pod_dns_config.rb', line 10 def initialize(nameservers: nil, options: nil, searches: nil) @nameservers = nameservers Jsii::Type.check_type(@nameservers, "eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=", "nameservers") unless @nameservers.nil? @options = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::CDK8sPlus25::K8S::PodDNSConfigOption.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@options, "eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImNkazhzLXBsdXMtMjUuazhzLlBvZERuc0NvbmZpZ09wdGlvbiJ9LCJraW5kIjoiYXJyYXkifX0=", "options") unless @options.nil? @searches = searches Jsii::Type.check_type(@searches, "eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=", "searches") unless @searches.nil? end |
Instance Attribute Details
#nameservers ⇒ Array<String>? (readonly)
A list of DNS name server IP addresses.
This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed.
24 25 26 |
# File 'k8_s/pod_dns_config.rb', line 24 def nameservers @nameservers end |
#options ⇒ Array<CDK8sPlus25::K8S::PodDNSConfigOption>? (readonly)
A list of DNS resolver options.
This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy.
30 31 32 |
# File 'k8_s/pod_dns_config.rb', line 30 def @options end |
#searches ⇒ Array<String>? (readonly)
A list of DNS search domains for host-name lookup.
This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed.
36 37 38 |
# File 'k8_s/pod_dns_config.rb', line 36 def searches @searches end |
Class Method Details
.jsii_properties ⇒ Object
38 39 40 41 42 43 44 |
# File 'k8_s/pod_dns_config.rb', line 38 def self.jsii_properties { :nameservers => "nameservers", :options => "options", :searches => "searches", } end |
Instance Method Details
#to_jsii ⇒ Object
46 47 48 49 50 51 52 53 54 |
# File 'k8_s/pod_dns_config.rb', line 46 def to_jsii result = {} result.merge!({ "nameservers" => @nameservers, "options" => @options, "searches" => @searches, }) result.compact end |