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

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/container_v1/classes.rb,
generated/google/apis/container_v1/representations.rb,
generated/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

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ IpAllocationPolicy

Returns a new instance of IpAllocationPolicy



1047
1048
1049
# File 'generated/google/apis/container_v1/classes.rb', line 1047

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

Instance Attribute Details

#cluster_ipv4_cidrString

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 will be chosen with the default size. Set to /netmask (e.g. /14) to have a range be 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 clusterIpv4Cidr

Returns:

  • (String)


1018
1019
1020
# File 'generated/google/apis/container_v1/classes.rb', line 1018

def cluster_ipv4_cidr
  @cluster_ipv4_cidr
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)


990
991
992
# File 'generated/google/apis/container_v1/classes.rb', line 990

def create_subnetwork
  @create_subnetwork
end

#node_ipv4_cidrString

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 will be chosen with the default size. Set to /netmask (e.g. /14) to have a range be 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 nodeIpv4Cidr

Returns:

  • (String)


1031
1032
1033
# File 'generated/google/apis/container_v1/classes.rb', line 1031

def node_ipv4_cidr
  @node_ipv4_cidr
end

#services_ipv4_cidrString

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 will be chosen with the default size. Set to /netmask (e.g. /14) to have a range be 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 servicesIpv4Cidr

Returns:

  • (String)


1045
1046
1047
# File 'generated/google/apis/container_v1/classes.rb', line 1045

def services_ipv4_cidr
  @services_ipv4_cidr
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 choosen for the new subnetwork. Corresponds to the JSON property subnetworkName

Returns:

  • (String)


1004
1005
1006
# File 'generated/google/apis/container_v1/classes.rb', line 1004

def subnetwork_name
  @subnetwork_name
end

#use_ip_aliasesBoolean Also known as: use_ip_aliases?

Whether alias IPs will be used for pod IPs in the cluster. Corresponds to the JSON property useIpAliases

Returns:

  • (Boolean)


996
997
998
# File 'generated/google/apis/container_v1/classes.rb', line 996

def use_ip_aliases
  @use_ip_aliases
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1052
1053
1054
1055
1056
1057
1058
1059
# File 'generated/google/apis/container_v1/classes.rb', line 1052

def update!(**args)
  @create_subnetwork = args[:create_subnetwork] if args.key?(:create_subnetwork)
  @use_ip_aliases = args[:use_ip_aliases] if args.key?(:use_ip_aliases)
  @subnetwork_name = args[:subnetwork_name] if args.key?(:subnetwork_name)
  @cluster_ipv4_cidr = args[:cluster_ipv4_cidr] if args.key?(:cluster_ipv4_cidr)
  @node_ipv4_cidr = args[:node_ipv4_cidr] if args.key?(:node_ipv4_cidr)
  @services_ipv4_cidr = args[:services_ipv4_cidr] if args.key?(:services_ipv4_cidr)
end