Class PodDnsProps.Builder

  • All Implemented Interfaces:
    software.amazon.jsii.Builder<PodDnsProps>
    Enclosing interface:
    PodDnsProps

    @Stability(Stable)
    public static final class PodDnsProps.Builder
    extends Object
    implements software.amazon.jsii.Builder<PodDnsProps>
    A builder for PodDnsProps
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • hostnameAsFqdn

        @Stability(Stable)
        public PodDnsProps.Builder hostnameAsFqdn​(Boolean hostnameAsFqdn)
        Sets the value of PodDnsProps#getHostnameAsFqdn
        Parameters:
        hostnameAsFqdn - If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters to FQDN. If a pod does not have FQDN, this has no effect.
        Returns:
        this
      • nameservers

        @Stability(Stable)
        public PodDnsProps.Builder nameservers​(List<String> nameservers)
        Parameters:
        nameservers - A list of IP addresses that will be used as DNS servers for the Pod. There can be at most 3 IP addresses specified. When the policy is set to "NONE", the list must contain at least one IP address, otherwise this property is optional. The servers listed will be combined to the base nameservers generated from the specified DNS policy with duplicate addresses removed.
        Returns:
        this
      • options

        @Stability(Stable)
        public PodDnsProps.Builder options​(List<? extends DnsOption> options)
        Sets the value of PodDnsProps.getOptions()
        Parameters:
        options - List of objects where each object may have a name property (required) and a value property (optional). The contents in this property will be merged to the options generated from the specified DNS policy. Duplicate entries are removed.
        Returns:
        this
      • searches

        @Stability(Stable)
        public PodDnsProps.Builder searches​(List<String> searches)
        Sets the value of PodDnsProps.getSearches()
        Parameters:
        searches - A list of DNS search domains for hostname lookup in the Pod. When specified, the provided list will be merged into the base search domain names generated from the chosen DNS policy. Duplicate domain names are removed.

        Kubernetes allows for at most 6 search domains.

        Returns:
        this
      • build

        @Stability(Stable)
        public PodDnsProps build()
        Builds the configured instance.
        Specified by:
        build in interface software.amazon.jsii.Builder<PodDnsProps>
        Returns:
        a new instance of PodDnsProps
        Throws:
        NullPointerException - if any required attribute was not provided