示例#1
0
文件: create.py 项目: linsole/CS61A
 def ParseCreateOptions(self, args):
     ops = ParseCreateOptionsBase(args)
     flags.WarnForNodeVersionAutoUpgrade(args)
     ops.enable_autoprovisioning = args.enable_autoprovisioning
     ops.autoprovisioning_config_file = args.autoprovisioning_config_file
     ops.autoprovisioning_service_account = args.autoprovisioning_service_account
     ops.autoprovisioning_scopes = args.autoprovisioning_scopes
     ops.autoprovisioning_locations = args.autoprovisioning_locations
     ops.min_cpu = args.min_cpu
     ops.max_cpu = args.max_cpu
     ops.min_memory = args.min_memory
     ops.max_memory = args.max_memory
     ops.min_accelerator = args.min_accelerator
     ops.max_accelerator = args.max_accelerator
     ops.min_cpu_platform = args.min_cpu_platform
     ops.workload_metadata_from_node = args.workload_metadata_from_node
     ops.enable_pod_security_policy = args.enable_pod_security_policy
     ops.allow_route_overlap = args.allow_route_overlap
     ops.private_cluster = args.private_cluster
     ops.istio_config = args.istio_config
     ops.enable_vertical_pod_autoscaling = args.enable_vertical_pod_autoscaling
     ops.security_group = args.security_group
     ops.identity_namespace = args.identity_namespace
     ops.enable_shielded_nodes = args.enable_shielded_nodes
     flags.ValidateIstioConfigCreateArgs(args.istio_config, args.addons)
     ops.database_encryption_key = args.database_encryption_key
     ops.shielded_secure_boot = args.shielded_secure_boot
     ops.shielded_integrity_monitoring = args.shielded_integrity_monitoring
     ops.maintenance_window_start = args.maintenance_window_start
     ops.maintenance_window_end = args.maintenance_window_end
     ops.maintenance_window_recurrence = args.maintenance_window_recurrence
     ops.release_channel = args.release_channel
     return ops
示例#2
0
 def ParseCreateOptions(self, args):
   ops = ParseCreateOptionsBase(args)
   ops.accelerators = args.accelerator
   ops.node_locations = args.node_locations
   ops.enable_autoprovisioning = args.enable_autoprovisioning
   ops.min_cpu = args.min_cpu
   ops.max_cpu = args.max_cpu
   ops.min_memory = args.min_memory
   ops.max_memory = args.max_memory
   ops.min_accelerator = args.min_accelerator
   ops.max_accelerator = args.max_accelerator
   ops.local_ssd_volume_configs = args.local_ssd_volumes
   ops.enable_binauthz = args.enable_binauthz
   ops.min_cpu_platform = args.min_cpu_platform
   ops.workload_metadata_from_node = args.workload_metadata_from_node
   ops.enable_shared_network = args.enable_shared_network
   ops.enable_pod_security_policy = args.enable_pod_security_policy
   ops.allow_route_overlap = args.allow_route_overlap
   ops.private_cluster = args.private_cluster
   ops.master_ipv4_cidr = args.master_ipv4_cidr
   ops.new_scopes_behavior = True
   ops.enable_tpu = args.enable_tpu
   ops.tpu_ipv4_cidr = args.tpu_ipv4_cidr
   ops.istio_config = args.istio_config
   flags.ValidateIstioConfigCreateArgs(args.istio_config, args.addons)
   return ops
示例#3
0
 def ParseCreateOptions(self, args):
     ops = ParseCreateOptionsBase(args)
     flags.WarnForNodeVersionAutoUpgrade(args)
     ops.enable_autoprovisioning = args.enable_autoprovisioning
     ops.autoprovisioning_config_file = args.autoprovisioning_config_file
     ops.autoprovisioning_service_account = args.autoprovisioning_service_account
     ops.autoprovisioning_scopes = args.autoprovisioning_scopes
     ops.autoprovisioning_locations = args.autoprovisioning_locations
     ops.min_cpu = args.min_cpu
     ops.max_cpu = args.max_cpu
     ops.min_memory = args.min_memory
     ops.max_memory = args.max_memory
     ops.min_accelerator = args.min_accelerator
     ops.max_accelerator = args.max_accelerator
     ops.min_cpu_platform = args.min_cpu_platform
     ops.workload_metadata_from_node = args.workload_metadata_from_node
     ops.enable_pod_security_policy = args.enable_pod_security_policy
     ops.allow_route_overlap = args.allow_route_overlap
     ops.private_cluster = args.private_cluster
     ops.enable_stackdriver_kubernetes = args.enable_stackdriver_kubernetes
     ops.enable_binauthz = args.enable_binauthz
     ops.istio_config = args.istio_config
     ops.enable_vertical_pod_autoscaling = args.enable_vertical_pod_autoscaling
     ops.enable_intra_node_visibility = args.enable_intra_node_visibility
     ops.security_group = args.security_group
     ops.identity_namespace = args.identity_namespace
     ops.enable_shielded_nodes = args.enable_shielded_nodes
     flags.ValidateIstioConfigCreateArgs(args.istio_config, args.addons)
     ops.database_encryption = flags.GetDatabaseEncryptionOption(args)
     return ops
示例#4
0
 def ParseCreateOptions(self, args):
     ops = ParseCreateOptionsBase(args)
     ops.enable_autoprovisioning = args.enable_autoprovisioning
     ops.min_cpu = args.min_cpu
     ops.max_cpu = args.max_cpu
     ops.min_memory = args.min_memory
     ops.max_memory = args.max_memory
     ops.min_accelerator = args.min_accelerator
     ops.max_accelerator = args.max_accelerator
     ops.min_cpu_platform = args.min_cpu_platform
     ops.workload_metadata_from_node = args.workload_metadata_from_node
     ops.enable_pod_security_policy = args.enable_pod_security_policy
     ops.allow_route_overlap = args.allow_route_overlap
     ops.new_scopes_behavior = True
     ops.private_cluster = args.private_cluster
     ops.enable_private_nodes = args.enable_private_nodes
     ops.enable_private_endpoint = args.enable_private_endpoint
     ops.master_ipv4_cidr = args.master_ipv4_cidr
     ops.enable_stackdriver_kubernetes = args.enable_stackdriver_kubernetes
     ops.enable_binauthz = args.enable_binauthz
     ops.enable_tpu = args.enable_tpu
     ops.tpu_ipv4_cidr = args.tpu_ipv4_cidr
     ops.istio_config = args.istio_config
     ops.enable_vertical_pod_autoscaling = args.enable_vertical_pod_autoscaling
     ops.default_max_pods_per_node = args.default_max_pods_per_node
     flags.ValidateIstioConfigCreateArgs(args.istio_config, args.addons)
     return ops
示例#5
0
 def ParseCreateOptions(self, args):
     ops = ParseCreateOptionsBase(args)
     flags.WarnForNodeVersionAutoUpgrade(args)
     flags.ValidateSurgeUpgradeSettings(args)
     ops.boot_disk_kms_key = args.boot_disk_kms_key
     ops.min_cpu_platform = args.min_cpu_platform
     ops.enable_pod_security_policy = args.enable_pod_security_policy
     ops.allow_route_overlap = args.allow_route_overlap
     ops.private_cluster = args.private_cluster
     ops.istio_config = args.istio_config
     ops.enable_vertical_pod_autoscaling = args.enable_vertical_pod_autoscaling
     ops.security_group = args.security_group
     ops.identity_namespace = args.identity_namespace
     flags.ValidateIstioConfigCreateArgs(args.istio_config, args.addons)
     ops.release_channel = args.release_channel
     ops.max_surge_upgrade = args.max_surge_upgrade
     ops.max_unavailable_upgrade = args.max_unavailable_upgrade
     ops.autoscaling_profile = args.autoscaling_profile
     ops.enable_tpu_service_networking = args.enable_tpu_service_networking
     ops.enable_logging_monitoring_system_only = args.enable_logging_monitoring_system_only
     ops.enable_master_global_access = args.enable_master_global_access
     ops.enable_gvnic = args.enable_gvnic
     ops.system_config_from_file = args.system_config_from_file
     ops.disable_default_snat = args.disable_default_snat
     return ops
示例#6
0
  def ParseCreateOptions(self, args):
    ops = ParseCreateOptionsBase(args)
    flags.WarnForNodeVersionAutoUpgrade(args)
    flags.ValidateSurgeUpgradeSettings(args)
    ops.boot_disk_kms_key = args.boot_disk_kms_key
    ops.autoscaling_profile = args.autoscaling_profile
    ops.local_ssd_volume_configs = args.local_ssd_volumes
    ops.enable_pod_security_policy = args.enable_pod_security_policy
    ops.allow_route_overlap = args.allow_route_overlap
    ops.private_cluster = args.private_cluster
    ops.enable_private_nodes = args.enable_private_nodes
    ops.enable_private_endpoint = args.enable_private_endpoint
    ops.master_ipv4_cidr = args.master_ipv4_cidr
    ops.enable_tpu_service_networking = args.enable_tpu_service_networking
    ops.istio_config = args.istio_config
    ops.identity_namespace = args.identity_namespace
    ops.security_group = args.security_group
    flags.ValidateIstioConfigCreateArgs(args.istio_config, args.addons)
    ops.enable_vertical_pod_autoscaling = args.enable_vertical_pod_autoscaling
    ops.security_profile = args.security_profile
    ops.security_profile_runtime_rules = args.security_profile_runtime_rules
    ops.node_pool_name = args.node_pool_name
    ops.enable_network_egress_metering = args.enable_network_egress_metering
    ops.enable_resource_consumption_metering = args.enable_resource_consumption_metering
    ops.enable_private_ipv6_access = args.enable_private_ipv6_access
    ops.release_channel = args.release_channel
    ops.max_surge_upgrade = args.max_surge_upgrade
    ops.max_unavailable_upgrade = args.max_unavailable_upgrade
    ops.linux_sysctls = args.linux_sysctls
    ops.disable_default_snat = args.disable_default_snat

    ops.node_config = args.node_config

    ops.enable_cost_management = args.enable_cost_management
    return ops
示例#7
0
文件: create.py 项目: bopopescu/wip
    def ParseCreateOptions(self, args):
        ops = ParseCreateOptionsBase(args)
        flags.WarnForNodeVersionAutoUpgrade(args)
        ops.enable_autoprovisioning = args.enable_autoprovisioning
        ops.autoprovisioning_config_file = args.autoprovisioning_config_file
        ops.min_cpu = args.min_cpu
        ops.max_cpu = args.max_cpu
        ops.min_memory = args.min_memory
        ops.max_memory = args.max_memory
        ops.min_accelerator = args.min_accelerator
        ops.max_accelerator = args.max_accelerator
        ops.autoscaling_profile = args.autoscaling_profile
        ops.local_ssd_volume_configs = args.local_ssd_volumes
        ops.enable_binauthz = args.enable_binauthz
        ops.workload_metadata_from_node = args.workload_metadata_from_node
        ops.enable_pod_security_policy = args.enable_pod_security_policy
        ops.allow_route_overlap = args.allow_route_overlap
        ops.private_cluster = args.private_cluster
        ops.enable_private_nodes = args.enable_private_nodes
        ops.enable_private_endpoint = args.enable_private_endpoint
        ops.master_ipv4_cidr = args.master_ipv4_cidr
        ops.enable_tpu_service_networking = args.enable_tpu_service_networking
        ops.istio_config = args.istio_config
        ops.enable_stackdriver_kubernetes = args.enable_stackdriver_kubernetes
        ops.enable_managed_pod_identity = args.enable_managed_pod_identity
        ops.identity_namespace = args.identity_namespace
        ops.federating_service_account = args.federating_service_account
        ops.resource_usage_bigquery_dataset = args.resource_usage_bigquery_dataset
        ops.security_group = args.security_group
        flags.ValidateIstioConfigCreateArgs(args.istio_config, args.addons)
        ops.enable_vertical_pod_autoscaling = args.enable_vertical_pod_autoscaling
        ops.security_profile = args.security_profile
        ops.security_profile_runtime_rules = args.security_profile_runtime_rules
        ops.node_pool_name = args.node_pool_name
        ops.enable_network_egress_metering = args.enable_network_egress_metering
        ops.enable_private_ipv6_access = args.enable_private_ipv6_access
        ops.enable_intra_node_visibility = args.enable_intra_node_visibility
        ops.enable_peering_route_sharing = args.enable_peering_route_sharing
        ops.enable_shielded_nodes = args.enable_shielded_nodes
        ops.release_channel = args.release_channel
        kms_ref = args.CONCEPTS.kms_key.Parse()
        if kms_ref:
            ops.database_encryption = kms_ref.RelativeName()
        else:
            # Check for partially specified database-encryption-key.
            for keyword in [
                    'database-encryption-key',
                    'database-encryption-key-keyring',
                    'database-encryption-key-location',
                    'database-encryption-key-project'
            ]:
                if getattr(args, keyword.replace('-', '_'), None):
                    raise exceptions.InvalidArgumentException(
                        '--database-encryption-key', 'not fully specified.')
        ops.max_surge_upgrade = args.max_surge_upgrade
        ops.max_unavailable_upgrade = args.max_unavailable_upgrade
        ops.linux_sysctls = args.linux_sysctls

        return ops
示例#8
0
文件: create.py 项目: linsole/CS61A
    def ParseCreateOptions(self, args):
        ops = ParseCreateOptionsBase(args)
        flags.WarnForNodeVersionAutoUpgrade(args)
        ops.enable_autoprovisioning = args.enable_autoprovisioning
        ops.autoprovisioning_config_file = args.autoprovisioning_config_file
        ops.min_cpu = args.min_cpu
        ops.max_cpu = args.max_cpu
        ops.min_memory = args.min_memory
        ops.max_memory = args.max_memory
        ops.min_accelerator = args.min_accelerator
        ops.max_accelerator = args.max_accelerator
        ops.autoscaling_profile = args.autoscaling_profile
        ops.local_ssd_volume_configs = args.local_ssd_volumes
        ops.workload_metadata_from_node = args.workload_metadata_from_node
        ops.enable_pod_security_policy = args.enable_pod_security_policy
        ops.allow_route_overlap = args.allow_route_overlap
        ops.private_cluster = args.private_cluster
        ops.enable_private_nodes = args.enable_private_nodes
        ops.enable_private_endpoint = args.enable_private_endpoint
        ops.master_ipv4_cidr = args.master_ipv4_cidr
        ops.enable_tpu_service_networking = args.enable_tpu_service_networking
        ops.istio_config = args.istio_config
        ops.enable_managed_pod_identity = args.enable_managed_pod_identity
        ops.identity_namespace = args.identity_namespace
        ops.federating_service_account = args.federating_service_account
        ops.security_group = args.security_group
        flags.ValidateIstioConfigCreateArgs(args.istio_config, args.addons)
        ops.enable_vertical_pod_autoscaling = args.enable_vertical_pod_autoscaling
        ops.security_profile = args.security_profile
        ops.security_profile_runtime_rules = args.security_profile_runtime_rules
        ops.node_pool_name = args.node_pool_name
        ops.enable_network_egress_metering = args.enable_network_egress_metering
        ops.enable_resource_consumption_metering = args.enable_resource_consumption_metering
        ops.enable_private_ipv6_access = args.enable_private_ipv6_access
        ops.enable_peering_route_sharing = args.enable_peering_route_sharing
        ops.enable_shielded_nodes = args.enable_shielded_nodes
        ops.release_channel = args.release_channel
        ops.autoprovisioning_service_account = args.autoprovisioning_service_account
        ops.autoprovisioning_scopes = args.autoprovisioning_scopes
        ops.autoprovisioning_locations = args.autoprovisioning_locations
        ops.database_encryption_key = args.database_encryption_key
        ops.max_surge_upgrade = args.max_surge_upgrade
        ops.max_unavailable_upgrade = args.max_unavailable_upgrade
        ops.linux_sysctls = args.linux_sysctls
        ops.disable_default_snat = args.disable_default_snat

        ops.shielded_secure_boot = args.shielded_secure_boot
        ops.shielded_integrity_monitoring = args.shielded_integrity_monitoring
        ops.node_config = args.node_config

        ops.maintenance_window_start = args.maintenance_window_start
        ops.maintenance_window_end = args.maintenance_window_end
        ops.maintenance_window_recurrence = args.maintenance_window_recurrence

        ops.enable_cost_management = args.enable_cost_management

        return ops
示例#9
0
    def ParseCreateOptions(self, args, location, project_id):
        get_default = lambda key: AttrValue(args, key, self.default_flag_values
                                            )
        ops = ParseCreateOptionsBase(args, self.autopilot, get_default,
                                     location, project_id)
        flags.WarnForNodeVersionAutoUpgrade(args)
        flags.ValidateSurgeUpgradeSettings(args)
        ops.boot_disk_kms_key = get_default('boot_disk_kms_key')
        ops.min_cpu_platform = get_default('min_cpu_platform')
        ops.enable_pod_security_policy = get_default(
            'enable_pod_security_policy')

        ops.allow_route_overlap = get_default('allow_route_overlap')
        ops.private_cluster = get_default('private_cluster')
        ops.istio_config = get_default('istio_config')
        ops.enable_vertical_pod_autoscaling = \
            get_default('enable_vertical_pod_autoscaling')
        ops.security_group = get_default('security_group')
        flags.ValidateIstioConfigCreateArgs(get_default('istio_config'),
                                            get_default('addons'))
        ops.max_surge_upgrade = get_default('max_surge_upgrade')
        ops.max_unavailable_upgrade = get_default('max_unavailable_upgrade')
        ops.autoscaling_profile = get_default('autoscaling_profile')
        ops.enable_tpu_service_networking = \
            get_default('enable_tpu_service_networking')
        ops.enable_logging_monitoring_system_only = \
            get_default('enable_logging_monitoring_system_only')
        ops.enable_gvnic = get_default('enable_gvnic')
        ops.system_config_from_file = get_default('system_config_from_file')
        ops.datapath_provider = get_default('datapath_provider')
        ops.dataplane_v2 = get_default('enable_dataplane_v2')
        ops.enable_l4_ilb_subsetting = get_default('enable_l4_ilb_subsetting')
        ops.disable_default_snat = get_default('disable_default_snat')
        ops.cluster_dns = get_default('cluster_dns')
        ops.cluster_dns_scope = get_default('cluster_dns_scope')
        ops.cluster_dns_domain = get_default('cluster_dns_domain')
        ops.enable_master_metrics = get_default('enable_master_metrics')
        ops.master_logs = get_default('master_logs')
        ops.notification_config = get_default('notification_config')
        ops.enable_confidential_nodes = get_default(
            'enable_confidential_nodes')
        ops.kubernetes_objects_changes_target = \
            getattr(args, 'kubernetes_objects_changes_target', None)
        ops.kubernetes_objects_snapshots_target = \
            getattr(args, 'kubernetes_objects_snapshots_target', None)
        ops.enable_gcfs = get_default('enable_gcfs')
        ops.workload_identity_certificate_authority = get_default(
            'workload_identity_certificate_authority')
        ops.ephemeral_storage = get_default('ephemeral_storage')
        ops.enable_workload_monitoring_eap = \
          get_default('enable_workload_monitoring_eap')
        ops.private_endpoint_subnetwork = \
            get_default('private_endpoint_subnetwork')
        ops.cross_connect_subnetworks = \
            get_default('cross_connect_subnetworks')
        return ops
示例#10
0
 def ParseCreateOptions(self, args):
     ops = ParseCreateOptionsBase(args)
     ops.enable_autoprovisioning = args.enable_autoprovisioning
     ops.min_cpu = args.min_cpu
     ops.max_cpu = args.max_cpu
     ops.min_memory = args.min_memory
     ops.max_memory = args.max_memory
     ops.min_accelerator = args.min_accelerator
     ops.max_accelerator = args.max_accelerator
     ops.local_ssd_volume_configs = args.local_ssd_volumes
     ops.enable_binauthz = args.enable_binauthz
     ops.workload_metadata_from_node = args.workload_metadata_from_node
     ops.enable_pod_security_policy = args.enable_pod_security_policy
     ops.allow_route_overlap = args.allow_route_overlap
     ops.private_cluster = args.private_cluster
     ops.enable_private_nodes = args.enable_private_nodes
     ops.enable_private_endpoint = args.enable_private_endpoint
     ops.master_ipv4_cidr = args.master_ipv4_cidr
     ops.new_scopes_behavior = True
     ops.enable_tpu = args.enable_tpu
     ops.tpu_ipv4_cidr = args.tpu_ipv4_cidr
     ops.istio_config = args.istio_config
     ops.enable_stackdriver_kubernetes = args.enable_stackdriver_kubernetes
     ops.default_max_pods_per_node = args.default_max_pods_per_node
     ops.enable_managed_pod_identity = args.enable_managed_pod_identity
     ops.managed_pod_identity_federating_sa = \
             args.managed_pod_identity_federating_sa
     ops.resource_usage_bigquery_dataset = args.resource_usage_bigquery_dataset
     ops.security_group = args.security_group
     flags.ValidateIstioConfigCreateArgs(args.istio_config, args.addons)
     ops.enable_vertical_pod_autoscaling = args.enable_vertical_pod_autoscaling
     ops.security_profile = args.security_profile
     ops.security_profile_runtime_rules = args.security_profile_runtime_rules
     ops.autoprovisioning_config_file = args.autoprovisioning_config_file
     kms_ref = args.CONCEPTS.kms_key.Parse()
     if kms_ref:
         ops.database_encryption = kms_ref.RelativeName()
     else:
         # Check for partially specified database-encryption-key.
         for keyword in [
                 'database-encryption-key',
                 'database-encryption-key-keyring',
                 'database-encryption-key-location',
                 'database-encryption-key-project'
         ]:
             if getattr(args, keyword.replace('-', '_'), None):
                 raise exceptions.InvalidArgumentException(
                     '--database-encryption-key', 'not fully specified.')
     return ops
示例#11
0
    def ParseCreateOptions(self, args):
        get_default = lambda key: AttrValue(args, key, self.default_flag_values
                                            )
        ops = ParseCreateOptionsBase(args, self.autogke, get_default)
        flags.WarnForNodeVersionAutoUpgrade(args)
        flags.ValidateSurgeUpgradeSettings(args)
        flags.ValidateNotificationConfigFlag(args)
        ops.boot_disk_kms_key = get_default('boot_disk_kms_key')
        ops.min_cpu_platform = get_default('min_cpu_platform')
        ops.enable_pod_security_policy = get_default(
            'enable_pod_security_policy')

        ops.allow_route_overlap = get_default('allow_route_overlap')
        ops.private_cluster = get_default('private_cluster')
        ops.istio_config = get_default('istio_config')
        ops.enable_vertical_pod_autoscaling = \
            get_default('enable_vertical_pod_autoscaling')
        ops.security_group = get_default('security_group')
        flags.ValidateIstioConfigCreateArgs(get_default('istio_config'),
                                            get_default('addons'))
        ops.max_surge_upgrade = get_default('max_surge_upgrade')
        ops.max_unavailable_upgrade = get_default('max_unavailable_upgrade')
        ops.autoscaling_profile = get_default('autoscaling_profile')
        ops.enable_tpu_service_networking = \
            get_default('enable_tpu_service_networking')
        ops.enable_logging_monitoring_system_only = \
            get_default('enable_logging_monitoring_system_only')
        ops.enable_gvnic = get_default('enable_gvnic')
        ops.system_config_from_file = get_default('system_config_from_file')
        ops.datapath_provider = get_default('datapath_provider')
        ops.dataplane_v2 = get_default('enable_dataplane_v2')
        ops.disable_default_snat = get_default('disable_default_snat')
        ops.enable_master_metrics = get_default('enable_master_metrics')
        ops.master_logs = get_default('master_logs')
        ops.notification_config = get_default('notification_config')
        ops.private_ipv6_google_access_type = \
            get_default('private_ipv6_google_access_type')
        ops.enable_confidential_nodes = get_default(
            'enable_confidential_nodes')
        ops.kubernetes_objects_changes_target = \
            getattr(args, 'kubernetes_objects_changes_target', None)
        ops.kubernetes_objects_snapshots_target = \
            getattr(args, 'kubernetes_objects_snapshots_target', None)
        ops.enable_gcfs = get_default('enable_gcfs')
        return ops
示例#12
0
 def ParseCreateOptions(self, args):
     ops = ParseCreateOptionsBase(args)
     flags.WarnForNodeVersionAutoUpgrade(args)
     ops.enable_autoprovisioning = args.enable_autoprovisioning
     ops.autoprovisioning_config_file = args.autoprovisioning_config_file
     ops.autoprovisioning_service_account = args.autoprovisioning_service_account
     ops.autoprovisioning_scopes = args.autoprovisioning_scopes
     ops.autoprovisioning_locations = args.autoprovisioning_locations
     ops.min_cpu = args.min_cpu
     ops.max_cpu = args.max_cpu
     ops.min_memory = args.min_memory
     ops.max_memory = args.max_memory
     ops.min_accelerator = args.min_accelerator
     ops.max_accelerator = args.max_accelerator
     ops.min_cpu_platform = args.min_cpu_platform
     ops.workload_metadata_from_node = args.workload_metadata_from_node
     ops.enable_pod_security_policy = args.enable_pod_security_policy
     ops.allow_route_overlap = args.allow_route_overlap
     ops.private_cluster = args.private_cluster
     ops.enable_stackdriver_kubernetes = args.enable_stackdriver_kubernetes
     ops.enable_binauthz = args.enable_binauthz
     ops.istio_config = args.istio_config
     ops.enable_vertical_pod_autoscaling = args.enable_vertical_pod_autoscaling
     ops.enable_intra_node_visibility = args.enable_intra_node_visibility
     ops.security_group = args.security_group
     ops.identity_namespace = args.identity_namespace
     ops.enable_shielded_nodes = args.enable_shielded_nodes
     flags.ValidateIstioConfigCreateArgs(args.istio_config, args.addons)
     kms_ref = args.CONCEPTS.kms_key.Parse()
     if kms_ref:
         ops.database_encryption = kms_ref.RelativeName()
     else:
         # Check for partially specified database-encryption-key.
         for keyword in [
                 'database-encryption-key',
                 'database-encryption-key-keyring',
                 'database-encryption-key-location',
                 'database-encryption-key-project'
         ]:
             if getattr(args, keyword.replace('-', '_'), None):
                 raise exceptions.InvalidArgumentException(
                     '--database-encryption-key', 'not fully specified.')
     return ops
示例#13
0
 def ParseCreateOptions(self, args):
   ops = ParseCreateOptionsBase(args)
   flags.WarnForNodeVersionAutoUpgrade(args)
   flags.ValidateSurgeUpgradeSettings(args)
   ops.boot_disk_kms_key = args.boot_disk_kms_key
   ops.min_cpu_platform = args.min_cpu_platform
   ops.enable_pod_security_policy = args.enable_pod_security_policy
   ops.allow_route_overlap = args.allow_route_overlap
   ops.private_cluster = args.private_cluster
   ops.istio_config = args.istio_config
   ops.enable_vertical_pod_autoscaling = args.enable_vertical_pod_autoscaling
   ops.security_group = args.security_group
   ops.identity_namespace = args.identity_namespace
   flags.ValidateIstioConfigCreateArgs(args.istio_config, args.addons)
   ops.release_channel = args.release_channel
   ops.max_surge_upgrade = args.max_surge_upgrade
   ops.max_unavailable_upgrade = args.max_unavailable_upgrade
   ops.autoscaling_profile = args.autoscaling_profile
   return ops
示例#14
0
 def ParseCreateOptions(self, args):
     get_default = lambda key: AttrValue(args, key, self.default_flag_values
                                         )
     ops = ParseCreateOptionsBase(args, self.autogke, get_default)
     flags.WarnForNodeVersionAutoUpgrade(args)
     flags.ValidateSurgeUpgradeSettings(args)
     flags.ValidateNotificationConfigFlag(args)
     ops.boot_disk_kms_key = get_default('boot_disk_kms_key')
     ops.autoscaling_profile = get_default('autoscaling_profile')
     ops.local_ssd_volume_configs = get_default('local_ssd_volumes')
     ops.enable_pod_security_policy = get_default(
         'enable_pod_security_policy')
     ops.allow_route_overlap = get_default('allow_route_overlap')
     ops.private_cluster = get_default('private_cluster')
     ops.enable_private_nodes = get_default('enable_private_nodes')
     ops.enable_private_endpoint = get_default('enable_private_endpoint')
     ops.master_ipv4_cidr = get_default('master_ipv4_cidr')
     ops.enable_tpu_service_networking = \
         get_default('enable_tpu_service_networking')
     ops.istio_config = get_default('istio_config')
     ops.security_group = get_default('security_group')
     flags.ValidateIstioConfigCreateArgs(get_default('istio_config'),
                                         get_default('addons'))
     ops.enable_vertical_pod_autoscaling = \
         get_default('enable_vertical_pod_autoscaling')
     ops.security_profile = get_default('security_profile')
     ops.security_profile_runtime_rules = \
         get_default('security_profile_runtime_rules')
     ops.node_pool_name = get_default('node_pool_name')
     ops.enable_network_egress_metering = \
         get_default('enable_network_egress_metering')
     ops.enable_resource_consumption_metering = \
         get_default('enable_resource_consumption_metering')
     ops.enable_private_ipv6_access = get_default(
         'enable_private_ipv6_access')
     ops.max_surge_upgrade = get_default('max_surge_upgrade')
     ops.max_unavailable_upgrade = get_default('max_unavailable_upgrade')
     ops.linux_sysctls = get_default('linux_sysctls')
     ops.enable_l4_ilb_subsetting = get_default('enable_l4_ilb_subsetting')
     ops.disable_default_snat = get_default('disable_default_snat')
     ops.system_config_from_file = get_default('system_config_from_file')
     ops.enable_cost_management = get_default('enable_cost_management')
     ops.enable_logging_monitoring_system_only = \
         get_default('enable_logging_monitoring_system_only')
     ops.datapath_provider = get_default('datapath_provider')
     ops.dataplane_v2 = get_default('enable_dataplane_v2')
     ops.enable_gvnic = get_default('enable_gvnic')
     ops.enable_master_metrics = get_default('enable_master_metrics')
     ops.master_logs = get_default('master_logs')
     ops.notification_config = get_default('notification_config')
     ops.private_ipv6_google_access_type = \
         get_default('private_ipv6_google_access_type')
     ops.enable_confidential_nodes = get_default(
         'enable_confidential_nodes')
     ops.cluster_dns = get_default('cluster_dns')
     ops.cluster_dns_scope = get_default('cluster_dns_scope')
     ops.cluster_dns_domain = get_default('cluster_dns_domain')
     ops.kubernetes_objects_changes_target = \
         getattr(args, 'kubernetes_objects_changes_target', None)
     ops.kubernetes_objects_snapshots_target = \
         getattr(args, 'kubernetes_objects_snapshots_target', None)
     ops.enable_gcfs = get_default('enable_gcfs')
     ops.workload_identity_certificate_authority = get_default(
         'workload_identity_certificate_authority')
     return ops