Class: Google::Apis::ContainerV1::IpAllocationPolicy

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/container_v1/classes.rb,
lib/google/apis/container_v1/representations.rb,
lib/google/apis/container_v1/representations.rb

Overview

Configuration for controlling how IPs are allocated in the cluster.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ IpAllocationPolicy

Returns a new instance of IpAllocationPolicy.



2828
2829
2830
# File 'lib/google/apis/container_v1/classes.rb', line 2828

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#additional_pod_ranges_configGoogle::Apis::ContainerV1::AdditionalPodRangesConfig

AdditionalPodRangesConfig is the configuration for additional pod secondary ranges supporting the ClusterUpdate message. Corresponds to the JSON property additionalPodRangesConfig



2685
2686
2687
# File 'lib/google/apis/container_v1/classes.rb', line 2685

def additional_pod_ranges_config
  @additional_pod_ranges_config
end

#cluster_ipv4_cidrString

This field is deprecated, use cluster_ipv4_cidr_block. Corresponds to the JSON property clusterIpv4Cidr

Returns:

  • (String)


2690
2691
2692
# File 'lib/google/apis/container_v1/classes.rb', line 2690

def cluster_ipv4_cidr
  @cluster_ipv4_cidr
end

#cluster_ipv4_cidr_blockString

The IP address range for the cluster pod IPs. If this field is set, then cluster.cluster_ipv4_cidr must be left blank. This field is only applicable when use_ip_aliases is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. Set to a CIDR notation (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. Corresponds to the JSON property clusterIpv4CidrBlock

Returns:

  • (String)


2702
2703
2704
# File 'lib/google/apis/container_v1/classes.rb', line 2702

def cluster_ipv4_cidr_block
  @cluster_ipv4_cidr_block
end

#cluster_secondary_range_nameString

The name of the secondary range to be used for the cluster CIDR block. The secondary range will be used for pod IP addresses. This must be an existing secondary range associated with the cluster subnetwork. This field is only applicable with use_ip_aliases is true and create_subnetwork is false. Corresponds to the JSON property clusterSecondaryRangeName

Returns:

  • (String)


2710
2711
2712
# File 'lib/google/apis/container_v1/classes.rb', line 2710

def cluster_secondary_range_name
  @cluster_secondary_range_name
end

#create_subnetworkBoolean Also known as: create_subnetwork?

Whether a new subnetwork will be created automatically for the cluster. This field is only applicable when use_ip_aliases is true. Corresponds to the JSON property createSubnetwork

Returns:

  • (Boolean)


2716
2717
2718
# File 'lib/google/apis/container_v1/classes.rb', line 2716

def create_subnetwork
  @create_subnetwork
end

#default_pod_ipv4_range_utilizationFloat

Output only. [Output only] The utilization of the cluster default IPv4 range for the pod. The ratio is Usage/[Total number of IPs in the secondary range], Usage=numNodes*numZones*podIPsPerNode. Corresponds to the JSON property defaultPodIpv4RangeUtilization

Returns:

  • (Float)


2724
2725
2726
# File 'lib/google/apis/container_v1/classes.rb', line 2724

def default_pod_ipv4_range_utilization
  @default_pod_ipv4_range_utilization
end

#ipv6_access_typeString

The ipv6 access type (internal or external) when create_subnetwork is true Corresponds to the JSON property ipv6AccessType

Returns:

  • (String)


2729
2730
2731
# File 'lib/google/apis/container_v1/classes.rb', line 2729

def ipv6_access_type
  @ipv6_access_type
end

#node_ipv4_cidrString

This field is deprecated, use node_ipv4_cidr_block. Corresponds to the JSON property nodeIpv4Cidr

Returns:

  • (String)


2734
2735
2736
# File 'lib/google/apis/container_v1/classes.rb', line 2734

def node_ipv4_cidr
  @node_ipv4_cidr
end

#node_ipv4_cidr_blockString

The IP address range of the instance IPs in this cluster. This is applicable only if create_subnetwork is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. Set to a CIDR notation (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. Corresponds to the JSON property nodeIpv4CidrBlock

Returns:

  • (String)


2745
2746
2747
# File 'lib/google/apis/container_v1/classes.rb', line 2745

def node_ipv4_cidr_block
  @node_ipv4_cidr_block
end

#pod_cidr_overprovision_configGoogle::Apis::ContainerV1::PodCidrOverprovisionConfig

[PRIVATE FIELD] Config for pod CIDR size overprovisioning. Corresponds to the JSON property podCidrOverprovisionConfig



2750
2751
2752
# File 'lib/google/apis/container_v1/classes.rb', line 2750

def pod_cidr_overprovision_config
  @pod_cidr_overprovision_config
end

#services_ipv4_cidrString

This field is deprecated, use services_ipv4_cidr_block. Corresponds to the JSON property servicesIpv4Cidr

Returns:

  • (String)


2755
2756
2757
# File 'lib/google/apis/container_v1/classes.rb', line 2755

def services_ipv4_cidr
  @services_ipv4_cidr
end

#services_ipv4_cidr_blockString

The IP address range of the services IPs in this cluster. If blank, a range will be automatically chosen with the default size. This field is only applicable when use_ip_aliases is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. Set to a CIDR notation (e.g. 10.96.0.0/14) from the RFC- 1918 private networks (e.g. 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. Corresponds to the JSON property servicesIpv4CidrBlock

Returns:

  • (String)


2767
2768
2769
# File 'lib/google/apis/container_v1/classes.rb', line 2767

def services_ipv4_cidr_block
  @services_ipv4_cidr_block
end

#services_ipv6_cidr_blockString

Output only. [Output only] The services IPv6 CIDR block for the cluster. Corresponds to the JSON property servicesIpv6CidrBlock

Returns:

  • (String)


2772
2773
2774
# File 'lib/google/apis/container_v1/classes.rb', line 2772

def services_ipv6_cidr_block
  @services_ipv6_cidr_block
end

#services_secondary_range_nameString

The name of the secondary range to be used as for the services CIDR block. The secondary range will be used for service ClusterIPs. This must be an existing secondary range associated with the cluster subnetwork. This field is only applicable with use_ip_aliases is true and create_subnetwork is false. Corresponds to the JSON property servicesSecondaryRangeName

Returns:

  • (String)


2780
2781
2782
# File 'lib/google/apis/container_v1/classes.rb', line 2780

def services_secondary_range_name
  @services_secondary_range_name
end

#stack_typeString

The IP stack type of the cluster Corresponds to the JSON property stackType

Returns:

  • (String)


2785
2786
2787
# File 'lib/google/apis/container_v1/classes.rb', line 2785

def stack_type
  @stack_type
end

#subnet_ipv6_cidr_blockString

Output only. [Output only] The subnet's IPv6 CIDR block used by nodes and pods. Corresponds to the JSON property subnetIpv6CidrBlock

Returns:

  • (String)


2790
2791
2792
# File 'lib/google/apis/container_v1/classes.rb', line 2790

def subnet_ipv6_cidr_block
  @subnet_ipv6_cidr_block
end

#subnetwork_nameString

A custom subnetwork name to be used if create_subnetwork is true. If this field is empty, then an automatic name will be chosen for the new subnetwork. Corresponds to the JSON property subnetworkName

Returns:

  • (String)


2796
2797
2798
# File 'lib/google/apis/container_v1/classes.rb', line 2796

def subnetwork_name
  @subnetwork_name
end

#tpu_ipv4_cidr_blockString

The IP address range of the Cloud TPUs in this cluster. If unspecified, a range will be automatically chosen with the default size. This field is only applicable when use_ip_aliases is true. If unspecified, the range will use the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. Set to a CIDR notation (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. Corresponds to the JSON property tpuIpv4CidrBlock

Returns:

  • (String)


2808
2809
2810
# File 'lib/google/apis/container_v1/classes.rb', line 2808

def tpu_ipv4_cidr_block
  @tpu_ipv4_cidr_block
end

#use_ip_aliasesBoolean Also known as: use_ip_aliases?

Whether alias IPs will be used for pod IPs in the cluster. This is used in conjunction with use_routes. It cannot be true if use_routes is true. If both use_ip_aliases and use_routes are false, then the server picks the default IP allocation mode Corresponds to the JSON property useIpAliases

Returns:

  • (Boolean)


2816
2817
2818
# File 'lib/google/apis/container_v1/classes.rb', line 2816

def use_ip_aliases
  @use_ip_aliases
end

#use_routesBoolean Also known as: use_routes?

Whether routes will be used for pod IPs in the cluster. This is used in conjunction with use_ip_aliases. It cannot be true if use_ip_aliases is true. If both use_ip_aliases and use_routes are false, then the server picks the default IP allocation mode Corresponds to the JSON property useRoutes

Returns:

  • (Boolean)


2825
2826
2827
# File 'lib/google/apis/container_v1/classes.rb', line 2825

def use_routes
  @use_routes
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
# File 'lib/google/apis/container_v1/classes.rb', line 2833

def update!(**args)
  @additional_pod_ranges_config = args[:additional_pod_ranges_config] if args.key?(:additional_pod_ranges_config)
  @cluster_ipv4_cidr = args[:cluster_ipv4_cidr] if args.key?(:cluster_ipv4_cidr)
  @cluster_ipv4_cidr_block = args[:cluster_ipv4_cidr_block] if args.key?(:cluster_ipv4_cidr_block)
  @cluster_secondary_range_name = args[:cluster_secondary_range_name] if args.key?(:cluster_secondary_range_name)
  @create_subnetwork = args[:create_subnetwork] if args.key?(:create_subnetwork)
  @default_pod_ipv4_range_utilization = args[:default_pod_ipv4_range_utilization] if args.key?(:default_pod_ipv4_range_utilization)
  @ipv6_access_type = args[:ipv6_access_type] if args.key?(:ipv6_access_type)
  @node_ipv4_cidr = args[:node_ipv4_cidr] if args.key?(:node_ipv4_cidr)
  @node_ipv4_cidr_block = args[:node_ipv4_cidr_block] if args.key?(:node_ipv4_cidr_block)
  @pod_cidr_overprovision_config = args[:pod_cidr_overprovision_config] if args.key?(:pod_cidr_overprovision_config)
  @services_ipv4_cidr = args[:services_ipv4_cidr] if args.key?(:services_ipv4_cidr)
  @services_ipv4_cidr_block = args[:services_ipv4_cidr_block] if args.key?(:services_ipv4_cidr_block)
  @services_ipv6_cidr_block = args[:services_ipv6_cidr_block] if args.key?(:services_ipv6_cidr_block)
  @services_secondary_range_name = args[:services_secondary_range_name] if args.key?(:services_secondary_range_name)
  @stack_type = args[:stack_type] if args.key?(:stack_type)
  @subnet_ipv6_cidr_block = args[:subnet_ipv6_cidr_block] if args.key?(:subnet_ipv6_cidr_block)
  @subnetwork_name = args[:subnetwork_name] if args.key?(:subnetwork_name)
  @tpu_ipv4_cidr_block = args[:tpu_ipv4_cidr_block] if args.key?(:tpu_ipv4_cidr_block)
  @use_ip_aliases = args[:use_ip_aliases] if args.key?(:use_ip_aliases)
  @use_routes = args[:use_routes] if args.key?(:use_routes)
end