def ParseUpdateOptions(self, args, locations): opts = container_command_util.ParseUpdateOptionsBase(args, locations) opts.enable_pod_security_policy = args.enable_pod_security_policy opts.enable_autoprovisioning = args.enable_autoprovisioning opts.autoprovisioning_config_file = args.autoprovisioning_config_file opts.autoprovisioning_service_account = args.autoprovisioning_service_account opts.autoprovisioning_scopes = args.autoprovisioning_scopes opts.autoprovisioning_locations = args.autoprovisioning_locations opts.min_cpu = args.min_cpu opts.max_cpu = args.max_cpu opts.min_memory = args.min_memory opts.max_memory = args.max_memory opts.min_accelerator = args.min_accelerator opts.max_accelerator = args.max_accelerator opts.istio_config = args.istio_config opts.resource_usage_bigquery_dataset = args.resource_usage_bigquery_dataset opts.enable_intra_node_visibility = args.enable_intra_node_visibility opts.clear_resource_usage_bigquery_dataset = \ args.clear_resource_usage_bigquery_dataset opts.enable_network_egress_metering = args.enable_network_egress_metering opts.enable_resource_consumption_metering = args.enable_resource_consumption_metering flags.ValidateIstioConfigUpdateArgs(args.istio_config, args.disable_addons) opts.enable_stackdriver_kubernetes = args.enable_stackdriver_kubernetes opts.database_encryption_key = args.database_encryption_key opts.disable_database_encryption = args.disable_database_encryption # Top-level update options are automatically forced to be # mutually-exclusive, so we don't need special handling for these two. opts.identity_namespace = args.identity_namespace opts.disable_workload_identity = args.disable_workload_identity opts.enable_shielded_nodes = args.enable_shielded_nodes return opts
def ParseUpdateOptions(self, args, locations): opts = container_command_util.ParseUpdateOptionsBase(args, locations) opts.autoscaling_profile = args.autoscaling_profile opts.enable_pod_security_policy = args.enable_pod_security_policy opts.resource_usage_bigquery_dataset = args.resource_usage_bigquery_dataset opts.clear_resource_usage_bigquery_dataset = \ args.clear_resource_usage_bigquery_dataset opts.security_profile = args.security_profile opts.istio_config = args.istio_config opts.enable_intra_node_visibility = args.enable_intra_node_visibility opts.enable_network_egress_metering = args.enable_network_egress_metering opts.enable_resource_consumption_metering = args.enable_resource_consumption_metering flags.ValidateIstioConfigUpdateArgs(args.istio_config, args.disable_addons) opts.enable_peering_route_sharing = args.enable_peering_route_sharing opts.enable_stackdriver_kubernetes = args.enable_stackdriver_kubernetes opts.release_channel = args.release_channel # Top-level update options are automatically forced to be # mutually-exclusive, so we don't need special handling for these two. opts.identity_namespace = args.identity_namespace opts.disable_workload_identity = args.disable_workload_identity opts.enable_shielded_nodes = args.enable_shielded_nodes opts.disable_default_snat = args.disable_default_snat opts.enable_cost_management = args.enable_cost_management return opts
def ParseUpdateOptions(self, args, locations): opts = container_command_util.ParseUpdateOptionsBase(args, locations) opts.enable_autoprovisioning = args.enable_autoprovisioning opts.autoprovisioning_config_file = args.autoprovisioning_config_file opts.min_cpu = args.min_cpu opts.max_cpu = args.max_cpu opts.min_memory = args.min_memory opts.max_memory = args.max_memory opts.min_accelerator = args.min_accelerator opts.max_accelerator = args.max_accelerator opts.autoscaling_profile = args.autoscaling_profile opts.enable_pod_security_policy = args.enable_pod_security_policy opts.enable_binauthz = args.enable_binauthz opts.resource_usage_bigquery_dataset = args.resource_usage_bigquery_dataset opts.clear_resource_usage_bigquery_dataset = \ args.clear_resource_usage_bigquery_dataset opts.enable_vertical_pod_autoscaling = args.enable_vertical_pod_autoscaling opts.security_profile = args.security_profile opts.istio_config = args.istio_config opts.enable_intra_node_visibility = args.enable_intra_node_visibility opts.enable_network_egress_metering = args.enable_network_egress_metering flags.ValidateIstioConfigUpdateArgs(args.istio_config, args.disable_addons) opts.enable_peering_route_sharing = args.enable_peering_route_sharing return opts
def ParseUpdateOptions(self, args, locations): opts = container_command_util.ParseUpdateOptionsBase(args, locations) opts.autoscaling_profile = args.autoscaling_profile opts.enable_pod_security_policy = args.enable_pod_security_policy opts.resource_usage_bigquery_dataset = args.resource_usage_bigquery_dataset opts.clear_resource_usage_bigquery_dataset = \ args.clear_resource_usage_bigquery_dataset opts.security_profile = args.security_profile opts.istio_config = args.istio_config opts.enable_intra_node_visibility = args.enable_intra_node_visibility opts.enable_network_egress_metering = args.enable_network_egress_metering opts.enable_resource_consumption_metering = args.enable_resource_consumption_metering flags.ValidateIstioConfigUpdateArgs(args.istio_config, args.disable_addons) if args.disable_addons and api_adapter.NODELOCALDNS in args.disable_addons: # NodeLocalDNS is being enabled or disabled console_io.PromptContinue( message='Enabling/Disabling NodeLocal DNSCache causes a re-creation ' 'of all cluster nodes at versions 1.15 or above. ' 'This operation is long-running and will block other ' 'operations on the cluster (including delete) until it has run ' 'to completion.', cancel_on_no=True) opts.enable_peering_route_sharing = args.enable_peering_route_sharing opts.enable_stackdriver_kubernetes = args.enable_stackdriver_kubernetes opts.release_channel = args.release_channel # Top-level update options are automatically forced to be # mutually-exclusive, so we don't need special handling for these two. opts.identity_namespace = args.identity_namespace opts.disable_workload_identity = args.disable_workload_identity opts.enable_shielded_nodes = args.enable_shielded_nodes opts.disable_default_snat = args.disable_default_snat opts.enable_cost_management = args.enable_cost_management return opts
def ParseUpdateOptions(self, args, locations): opts = container_command_util.ParseUpdateOptionsBase(args, locations) opts.enable_autoprovisioning = args.enable_autoprovisioning opts.autoprovisioning_config_file = args.autoprovisioning_config_file opts.min_cpu = args.min_cpu opts.max_cpu = args.max_cpu opts.min_memory = args.min_memory opts.max_memory = args.max_memory opts.min_accelerator = args.min_accelerator opts.max_accelerator = args.max_accelerator opts.autoscaling_profile = args.autoscaling_profile opts.enable_pod_security_policy = args.enable_pod_security_policy opts.enable_binauthz = args.enable_binauthz opts.resource_usage_bigquery_dataset = args.resource_usage_bigquery_dataset opts.clear_resource_usage_bigquery_dataset = \ args.clear_resource_usage_bigquery_dataset opts.enable_vertical_pod_autoscaling = args.enable_vertical_pod_autoscaling opts.security_profile = args.security_profile opts.istio_config = args.istio_config opts.enable_intra_node_visibility = args.enable_intra_node_visibility opts.enable_network_egress_metering = args.enable_network_egress_metering flags.ValidateIstioConfigUpdateArgs(args.istio_config, args.disable_addons) opts.enable_peering_route_sharing = args.enable_peering_route_sharing # Top-level update options are automatically forced to be # mutually-exclusive, so we don't need special handling for these two. opts.identity_namespace = args.identity_namespace opts.disable_workload_identity = args.disable_workload_identity return opts
def ParseUpdateOptions(self, args, locations): opts = container_command_util.ParseUpdateOptionsBase(args, locations) opts.autoscaling_profile = args.autoscaling_profile opts.enable_pod_security_policy = args.enable_pod_security_policy opts.resource_usage_bigquery_dataset = args.resource_usage_bigquery_dataset opts.clear_resource_usage_bigquery_dataset = \ args.clear_resource_usage_bigquery_dataset opts.security_profile = args.security_profile opts.istio_config = args.istio_config opts.enable_intra_node_visibility = args.enable_intra_node_visibility opts.enable_network_egress_metering = args.enable_network_egress_metering opts.enable_resource_consumption_metering = args.enable_resource_consumption_metering flags.ValidateIstioConfigUpdateArgs(args.istio_config, args.disable_addons) if args.disable_addons and api_adapter.NODELOCALDNS in args.disable_addons: # NodeLocalDNS is being enabled or disabled console_io.PromptContinue( message= 'Enabling/Disabling NodeLocal DNSCache causes a re-creation ' 'of all cluster nodes at versions 1.15 or above. ' 'This operation is long-running and will block other ' 'operations on the cluster (including delete) until it has run ' 'to completion.', cancel_on_no=True) if args.disable_addons and api_adapter.GCEPDCSIDRIVER in args.disable_addons: pdcsi_disabled = args.disable_addons[api_adapter.GCEPDCSIDRIVER] if pdcsi_disabled: # GCE Persistent Disk CSI Driver is being disabled console_io.PromptContinue( message= 'If the GCE Persistent Disk CSI Driver is disabled, then any ' 'pods currently using PersistentVolumes owned by the driver ' 'will fail to terminate. Any new pods that try to use those ' 'PersistentVolumes will also fail to start.', cancel_on_no=True) opts.enable_stackdriver_kubernetes = args.enable_stackdriver_kubernetes opts.enable_logging_monitoring_system_only = args.enable_logging_monitoring_system_only opts.release_channel = args.release_channel opts.enable_tpu = args.enable_tpu opts.tpu_ipv4_cidr = args.tpu_ipv4_cidr opts.enable_tpu_service_networking = args.enable_tpu_service_networking # Top-level update options are automatically forced to be # mutually-exclusive, so we don't need special handling for these two. opts.identity_namespace = args.identity_namespace opts.enable_shielded_nodes = args.enable_shielded_nodes opts.disable_default_snat = args.disable_default_snat opts.enable_cost_management = args.enable_cost_management opts.enable_master_global_access = args.enable_master_global_access opts.enable_gvnic = args.enable_gvnic return opts
def ParseUpdateOptions(self, args, locations): opts = container_command_util.ParseUpdateOptionsBase(args, locations) opts.enable_autoprovisioning = args.enable_autoprovisioning opts.min_cpu = args.min_cpu opts.max_cpu = args.max_cpu opts.min_memory = args.min_memory opts.max_memory = args.max_memory opts.min_accelerator = args.min_accelerator opts.max_accelerator = args.max_accelerator opts.enable_pod_security_policy = args.enable_pod_security_policy opts.enable_binauthz = args.enable_binauthz opts.istio_config = args.istio_config flags.ValidateIstioConfigUpdateArgs(args.istio_config, args.disable_addons) return opts
def ParseUpdateOptions(self, args, locations): get_default = lambda key: getattr(args, key) flags.ValidateNotificationConfigFlag(args) opts = container_command_util.ParseUpdateOptionsBase(args, locations) opts.autoscaling_profile = args.autoscaling_profile opts.enable_pod_security_policy = args.enable_pod_security_policy opts.resource_usage_bigquery_dataset = args.resource_usage_bigquery_dataset opts.clear_resource_usage_bigquery_dataset = \ args.clear_resource_usage_bigquery_dataset opts.security_profile = args.security_profile opts.istio_config = args.istio_config opts.cloud_run_config = flags.GetLegacyCloudRunFlag( '{}_config', args, get_default) opts.enable_intra_node_visibility = args.enable_intra_node_visibility opts.enable_network_egress_metering = args.enable_network_egress_metering opts.enable_resource_consumption_metering = args.enable_resource_consumption_metering opts.workload_identity_certificate_authority = args.workload_identity_certificate_authority opts.disable_workload_identity_certificates = args.disable_workload_identity_certificates flags.ValidateIstioConfigUpdateArgs(args.istio_config, args.disable_addons) flags.ValidateCloudRunConfigUpdateArgs(opts.cloud_run_config, args.disable_addons) if args.disable_addons and api_adapter.NODELOCALDNS in args.disable_addons: # NodeLocalDNS is being enabled or disabled console_io.PromptContinue( message= 'Enabling/Disabling NodeLocal DNSCache causes a re-creation ' 'of all cluster nodes at versions 1.15 or above. ' 'This operation is long-running and will block other ' 'operations on the cluster (including delete) until it has run ' 'to completion.', cancel_on_no=True) opts.enable_stackdriver_kubernetes = args.enable_stackdriver_kubernetes opts.enable_logging_monitoring_system_only = args.enable_logging_monitoring_system_only opts.no_master_logs = args.no_master_logs opts.master_logs = args.master_logs opts.enable_master_metrics = args.enable_master_metrics opts.release_channel = args.release_channel opts.enable_tpu = args.enable_tpu opts.tpu_ipv4_cidr = args.tpu_ipv4_cidr opts.enable_tpu_service_networking = args.enable_tpu_service_networking # Top-level update options are automatically forced to be # mutually-exclusive, so we don't need special handling for these two. opts.identity_provider = args.identity_provider opts.enable_shielded_nodes = args.enable_shielded_nodes opts.disable_default_snat = args.disable_default_snat opts.enable_cost_management = args.enable_cost_management opts.enable_master_global_access = args.enable_master_global_access opts.enable_gvnic = args.enable_gvnic opts.notification_config = args.notification_config opts.kubernetes_objects_changes_target = args.kubernetes_objects_changes_target opts.kubernetes_objects_snapshots_target = args.kubernetes_objects_snapshots_target opts.enable_gke_oidc = args.enable_gke_oidc opts.enable_workload_monitoring_eap = args.enable_workload_monitoring_eap opts.disable_autopilot = args.disable_autopilot opts.enable_l4_ilb_subsetting = args.enable_l4_ilb_subsetting opts.cluster_dns = args.cluster_dns opts.cluster_dns_scope = args.cluster_dns_scope opts.cluster_dns_domain = args.cluster_dns_domain if opts.cluster_dns and opts.cluster_dns.lower() == 'clouddns': console_io.PromptContinue( message= 'Enabling CloudDNS is a one-way operation. Once enabled, ' 'this configuration cannot be disabled.' 'All the node-pools in the cluster need to be re-created by the user ' 'to start using CloudDNS for DNS lookups. It is highly recommended to' ' complete this step shortly after enabling CloudDNS.', cancel_on_no=True) return opts