Beispiel #1
0
def ParseCreateNodePoolOptionsBase(args):
    if (args.IsSpecified('enable_cloud_endpoints')
            and properties.VALUES.container.new_scopes_behavior.GetBool()):
        raise util.Error(
            'Flag --[no-]enable-cloud-endpoints is not allowed if '
            'property container/ new_scopes_behavior is set to true.')
    flags.WarnForUnspecifiedAutorepair(args)
    return api_adapter.CreateNodePoolOptions(
        accelerators=args.accelerator,
        machine_type=args.machine_type,
        disk_size_gb=args.disk_size,
        scopes=args.scopes,
        node_version=args.node_version,
        enable_cloud_endpoints=args.enable_cloud_endpoints,
        num_nodes=args.num_nodes,
        local_ssd_count=args.local_ssd_count,
        tags=args.tags,
        node_labels=args.node_labels,
        node_taints=args.node_taints,
        enable_autoscaling=args.enable_autoscaling,
        max_nodes=args.max_nodes,
        min_cpu_platform=args.min_cpu_platform,
        min_nodes=args.min_nodes,
        image_type=args.image_type,
        image=args.image,
        image_project=args.image_project,
        image_family=args.image_family,
        preemptible=args.preemptible,
        enable_autorepair=args.enable_autorepair,
        enable_autoupgrade=args.enable_autoupgrade,
        service_account=args.service_account,
        disk_type=args.disk_type)
Beispiel #2
0
def ParseCreateOptionsBase(args):
    flags.MungeBasicAuthFlags(args)
    if (args.IsSpecified('enable_cloud_endpoints')
            and properties.VALUES.container.new_scopes_behavior.GetBool()):
        raise util.Error(
            'Flag --[no-]enable-cloud-endpoints is not allowed if '
            'property container/ new_scopes_behavior is set to true.')
    flags.WarnForUnspecifiedAutorepair(args)
    cluster_ipv4_cidr = args.cluster_ipv4_cidr
    enable_master_authorized_networks = args.enable_master_authorized_networks
    return api_adapter.CreateClusterOptions(
        accelerators=args.accelerator,
        additional_zones=args.additional_zones,
        addons=args.addons,
        cluster_ipv4_cidr=cluster_ipv4_cidr,
        cluster_secondary_range_name=args.cluster_secondary_range_name,
        cluster_version=args.cluster_version,
        node_version=args.node_version,
        create_subnetwork=args.create_subnetwork,
        disk_type=args.disk_type,
        enable_autorepair=args.enable_autorepair,
        enable_autoscaling=args.enable_autoscaling,
        enable_autoupgrade=args.enable_autoupgrade,
        enable_cloud_endpoints=args.enable_cloud_endpoints,
        enable_cloud_logging=args.enable_cloud_logging,
        enable_cloud_monitoring=args.enable_cloud_monitoring,
        enable_ip_alias=args.enable_ip_alias,
        enable_kubernetes_alpha=args.enable_kubernetes_alpha,
        enable_legacy_authorization=args.enable_legacy_authorization,
        enable_master_authorized_networks=enable_master_authorized_networks,
        enable_network_policy=args.enable_network_policy,
        image_type=args.image_type,
        image=args.image,
        image_project=args.image_project,
        image_family=args.image_family,
        issue_client_certificate=args.issue_client_certificate,
        labels=args.labels,
        local_ssd_count=args.local_ssd_count,
        maintenance_window=args.maintenance_window,
        master_authorized_networks=args.master_authorized_networks,
        max_nodes=args.max_nodes,
        max_nodes_per_pool=args.max_nodes_per_pool,
        min_cpu_platform=args.min_cpu_platform,
        min_nodes=args.min_nodes,
        network=args.network,
        node_disk_size_gb=args.disk_size,
        node_labels=args.node_labels,
        node_locations=args.node_locations,
        node_machine_type=args.machine_type,
        node_taints=args.node_taints,
        num_nodes=args.num_nodes,
        password=args.password,
        preemptible=args.preemptible,
        scopes=args.scopes,
        service_account=args.service_account,
        services_ipv4_cidr=args.services_ipv4_cidr,
        services_secondary_range_name=args.services_secondary_range_name,
        subnetwork=args.subnetwork,
        tags=args.tags,
        user=args.username)