Пример #1
0
 def CommonArgs(parser):
     # Flags specific to managed CR
     managed_group = flags.GetManagedArgGroup(parser)
     flags.AddRegionArg(managed_group)
     flags.AddServiceAccountFlag(managed_group)
     flags.AddCloudSQLFlags(managed_group)
     # Flags specific to CRoGKE
     gke_group = flags.GetGkeArgGroup(parser)
     concept_parsers.ConceptParser([resource_args.CLUSTER_PRESENTATION
                                    ]).AddToParser(gke_group)
     # Flags specific to connecting to a Kubernetes cluster (kubeconfig)
     kubernetes_group = flags.GetKubernetesArgGroup(parser)
     flags.AddKubeconfigFlags(kubernetes_group)
     # Flags specific to connecting to a cluster
     cluster_group = flags.GetClusterArgGroup(parser)
     flags.AddEndpointVisibilityEnum(cluster_group)
     flags.AddCpuFlag(cluster_group)
     # Flags not specific to any platform
     service_presentation = presentation_specs.ResourcePresentationSpec(
         'SERVICE',
         resource_args.GetServiceResourceSpec(prompt=True),
         'Service to update the configuration of.',
         required=True,
         prefixes=False)
     flags.AddPlatformArg(parser)
     flags.AddMutexEnvVarsFlags(parser)
     flags.AddMemoryFlag(parser)
     flags.AddConcurrencyFlag(parser)
     flags.AddTimeoutFlag(parser)
     flags.AddAsyncFlag(parser)
     flags.AddLabelsFlags(parser, add_create=False)
     flags.AddMaxInstancesFlag(parser)
     concept_parsers.ConceptParser([service_presentation
                                    ]).AddToParser(parser)
Пример #2
0
    def CommonArgs(parser):
        # Flags specific to managed CR
        managed_group = flags.GetManagedArgGroup(parser)
        flags.AddAllowUnauthenticatedFlag(managed_group)
        flags.AddServiceAccountFlag(managed_group)
        flags.AddCloudSQLFlags(managed_group)
        flags.AddRevisionSuffixArg(managed_group)

        # Flags specific to connecting to a cluster
        cluster_group = flags.GetClusterArgGroup(parser)
        flags.AddEndpointVisibilityEnum(cluster_group)

        # Flags not specific to any platform
        service_presentation = presentation_specs.ResourcePresentationSpec(
            'SERVICE',
            resource_args.GetServiceResourceSpec(prompt=True),
            'Service to deploy to.',
            required=True,
            prefixes=False)
        flags.AddImageArg(parser)
        flags.AddFunctionArg(parser)
        flags.AddMutexEnvVarsFlags(parser)
        flags.AddMemoryFlag(parser)
        flags.AddConcurrencyFlag(parser)
        flags.AddTimeoutFlag(parser)
        flags.AddAsyncFlag(parser)
        flags.AddLabelsFlags(parser)
        flags.AddMaxInstancesFlag(parser)
        flags.AddCommandFlag(parser)
        flags.AddArgsFlag(parser)
        flags.AddPortFlag(parser)
        flags.AddCpuFlag(parser)
        concept_parsers.ConceptParser([service_presentation
                                       ]).AddToParser(parser)
Пример #3
0
 def Args(parser):
   # Flags specific to managed CR
   managed_group = flags.GetManagedArgGroup(parser)
   flags.AddRegionArg(managed_group)
   flags.AddServiceAccountFlag(managed_group)
   # Flags specific to CRoGKE
   gke_group = flags.GetGkeArgGroup(parser)
   concept_parsers.ConceptParser([resource_args.CLUSTER_PRESENTATION
                                 ]).AddToParser(gke_group)
   # Flags specific to connecting to a Kubernetes cluster (kubeconfig)
   kubernetes_group = flags.GetKubernetesArgGroup(parser)
   flags.AddKubeconfigFlags(kubernetes_group)
   # Flags not specific to any platform
   service_presentation = presentation_specs.ResourcePresentationSpec(
       '--service',
       resource_args.GetServiceResourceSpec(prompt=True),
       'Service to update the configuration of.',
       required=True,
       prefixes=False)
   flags.AddAlphaPlatformArg(parser)
   flags.AddMutexEnvVarsFlags(parser)
   flags.AddMemoryFlag(parser)
   flags.AddConcurrencyFlag(parser)
   flags.AddTimeoutFlag(parser)
   flags.AddAsyncFlag(parser)
   concept_parsers.ConceptParser([service_presentation]).AddToParser(parser)
Пример #4
0
 def CommonArgs(parser):
     # Flags specific to managed CR
     managed_group = flags.GetManagedArgGroup(parser)
     flags.AddRegionArg(managed_group)
     flags.AddAllowUnauthenticatedFlag(managed_group)
     flags.AddRevisionSuffixArg(managed_group)
     flags.AddServiceAccountFlag(managed_group)
     flags.AddCloudSQLFlags(managed_group)
     # Flags specific to CRoGKE
     gke_group = flags.GetGkeArgGroup(parser)
     concept_parsers.ConceptParser([resource_args.CLUSTER_PRESENTATION
                                    ]).AddToParser(gke_group)
     # Flags not specific to any platform
     service_presentation = presentation_specs.ResourcePresentationSpec(
         'SERVICE',
         resource_args.GetServiceResourceSpec(prompt=True),
         'Service to deploy to.',
         required=True,
         prefixes=False)
     flags.AddSourceRefFlags(parser)
     flags.AddFunctionArg(parser)
     flags.AddMutexEnvVarsFlags(parser)
     flags.AddMemoryFlag(parser)
     flags.AddConcurrencyFlag(parser)
     flags.AddTimeoutFlag(parser)
     flags.AddAsyncFlag(parser)
     concept_parsers.ConceptParser([service_presentation
                                    ]).AddToParser(parser)
Пример #5
0
 def CommonArgs(parser):
     # Flags specific to managed CR
     managed_group = flags.GetManagedArgGroup(parser)
     flags.AddRegionArg(managed_group)
     flags.AddServiceAccountFlag(managed_group)
     flags.AddCloudSQLFlags(managed_group)
     # Flags specific to CRoGKE
     gke_group = flags.GetGkeArgGroup(parser)
     concept_parsers.ConceptParser([resource_args.CLUSTER_PRESENTATION
                                    ]).AddToParser(gke_group)
     # Flags not specific to any platform
     service_presentation = presentation_specs.ResourcePresentationSpec(
         'SERVICE',
         resource_args.GetServiceResourceSpec(prompt=True),
         'Service to update the configuration of.',
         required=True,
         prefixes=False)
     flags.AddMutexEnvVarsFlags(parser)
     flags.AddMemoryFlag(parser)
     flags.AddConcurrencyFlag(parser)
     flags.AddTimeoutFlag(parser)
     flags.AddAsyncFlag(parser)
     flags.AddLabelsFlags(parser, add_create=False)
     concept_parsers.ConceptParser([service_presentation
                                    ]).AddToParser(parser)
Пример #6
0
 def Args(parser):
     service_presentation = presentation_specs.ResourcePresentationSpec(
         'SERVICE',
         resource_args.GetServiceResourceSpec(prompt=True),
         'Service to deploy to.',
         required=True,
         prefixes=False)
     flags.AddSourceRefFlags(parser)
     flags.AddRegionArg(parser)
     flags.AddPlatformArg(parser)
     flags.AddKubeconfigFlags(parser)
     flags.AddFunctionArg(parser)
     flags.AddMutexEnvVarsFlags(parser)
     flags.AddCpuFlag(parser)
     flags.AddMemoryFlag(parser)
     flags.AddConcurrencyFlag(parser)
     flags.AddTimeoutFlag(parser)
     flags.AddAsyncFlag(parser)
     flags.AddEndpointVisibilityEnum(parser)
     flags.AddCloudSQLFlags(parser)
     flags.AddAllowUnauthenticatedFlag(parser)
     flags.AddServiceAccountFlag(parser)
     concept_parsers.ConceptParser(
         [resource_args.CLUSTER_PRESENTATION,
          service_presentation]).AddToParser(parser)
Пример #7
0
  def CommonArgs(parser):
    # Flags not specific to any platform
    service_presentation = presentation_specs.ResourcePresentationSpec(
        'JOB',
        resource_args.GetJobResourceSpec(prompt=True),
        'Job to create.',
        required=True,
        prefixes=False)
    flags.AddImageArg(parser)
    flags.AddLabelsFlag(parser)
    flags.AddParallelismFlag(parser)
    flags.AddCompletionsFlag(parser)
    flags.AddMaxAttemptsFlag(parser)
    flags.AddServiceAccountFlag(parser)
    flags.AddSetEnvVarsFlag(parser)
    flags.AddSetCloudSQLFlag(parser)
    flags.AddVpcConnectorArg(parser)
    flags.AddEgressSettingsFlag(parser)
    flags.AddMemoryFlag(parser)
    flags.AddCpuFlag(parser, managed_only=True)
    flags.AddCommandFlag(parser)
    flags.AddArgsFlag(parser)
    flags.AddClientNameAndVersionFlags(parser)
    flags.AddBinAuthzPolicyFlags(parser, with_clear=False)
    flags.AddBinAuthzBreakglassFlag(parser)

    polling_group = parser.add_mutually_exclusive_group()
    flags.AddAsyncFlag(polling_group)
    flags.AddWaitForCompletionFlag(polling_group)

    concept_parsers.ConceptParser([service_presentation]).AddToParser(parser)
    # No output by default, can be overridden by --format
    parser.display_info.AddFormat('none')
Пример #8
0
    def Args(parser):
        Update.CommonArgs(parser)

        # Flags specific to managed CR
        managed_group = flags.GetManagedArgGroup(parser)
        flags.AddServiceAccountFlag(managed_group)

        # Flags only supported on GKE and Knative
        cluster_group = flags.GetClusterArgGroup(parser)
        flags.AddMinInstancesFlag(cluster_group)
Пример #9
0
    def CommonArgs(parser):
        # Flags specific to managed CR
        managed_group = flags.GetManagedArgGroup(parser)
        flags.AddAllowUnauthenticatedFlag(managed_group)
        flags.AddBinAuthzPolicyFlags(managed_group)
        flags.AddBinAuthzBreakglassFlag(managed_group)
        flags.AddCloudSQLFlags(managed_group)
        flags.AddCpuThrottlingFlag(managed_group)
        flags.AddRevisionSuffixArg(managed_group)
        flags.AddVpcConnectorArgs(managed_group)
        flags.AddEgressSettingsFlag(managed_group)
        flags.AddCmekKeyFlag(managed_group)
        flags.AddCmekKeyRevocationActionTypeFlag(managed_group)

        # Flags specific to connecting to a cluster
        cluster_group = flags.GetClusterArgGroup(parser)
        flags.AddEndpointVisibilityEnum(cluster_group)
        flags.AddConfigMapsFlags(cluster_group)

        # Flags not specific to any platform
        service_presentation = presentation_specs.ResourcePresentationSpec(
            'SERVICE',
            resource_args.GetServiceResourceSpec(prompt=True),
            'Service to deploy to.',
            required=True,
            prefixes=False)
        flags.AddPlatformAndLocationFlags(parser)
        flags.AddFunctionArg(parser)
        flags.AddMutexEnvVarsFlags(parser)
        flags.AddMemoryFlag(parser)
        flags.AddConcurrencyFlag(parser)
        flags.AddTimeoutFlag(parser)
        flags.AddAsyncFlag(parser)
        flags.AddLabelsFlags(parser)
        flags.AddGeneralAnnotationFlags(parser)
        flags.AddMinInstancesFlag(parser)
        flags.AddMaxInstancesFlag(parser)
        flags.AddCommandFlag(parser)
        flags.AddArgsFlag(parser)
        flags.AddPortFlag(parser)
        flags.AddCpuFlag(parser)
        flags.AddNoTrafficFlag(parser)
        flags.AddDeployTagFlag(parser)
        flags.AddServiceAccountFlag(parser)
        flags.AddClientNameAndVersionFlags(parser)
        flags.AddIngressFlag(parser)
        flags.AddHttp2Flag(parser)
        flags.AddSourceAndImageFlags(parser)
        flags.AddSecretsFlags(parser)
        concept_parsers.ConceptParser([service_presentation
                                       ]).AddToParser(parser)
        # No output by default, can be overridden by --format
        parser.display_info.AddFormat('none')
Пример #10
0
 def Args(parser):
     service_presentation = presentation_specs.ResourcePresentationSpec(
         '--service',
         resource_args.GetServiceResourceSpec(prompt=True),
         'Service to update the configuration of.',
         required=True,
         prefixes=False)
     flags.AddRegionArg(parser)
     flags.AddMutexEnvVarsFlags(parser)
     flags.AddMemoryFlag(parser)
     flags.AddConcurrencyFlag(parser)
     flags.AddTimeoutFlag(parser)
     flags.AddServiceAccountFlag(parser)
     flags.AddAsyncFlag(parser)
     concept_parsers.ConceptParser(
         [resource_args.CLUSTER_PRESENTATION,
          service_presentation]).AddToParser(parser)
Пример #11
0
    def CommonArgs(parser):
        # Flags specific to managed CR
        managed_group = flags.GetManagedArgGroup(parser)
        flags.AddAllowUnauthenticatedFlag(managed_group)
        flags.AddCloudSQLFlags(managed_group)
        flags.AddRevisionSuffixArg(managed_group)
        flags.AddVpcConnectorArg(managed_group)

        # Flags specific to connecting to a cluster
        cluster_group = flags.GetClusterArgGroup(parser)
        flags.AddSecretsFlags(cluster_group)
        flags.AddConfigMapsFlags(cluster_group)
        flags.AddHttp2Flag(cluster_group)

        # Flags not specific to any platform
        service_presentation = presentation_specs.ResourcePresentationSpec(
            'SERVICE',
            resource_args.GetServiceResourceSpec(prompt=True),
            'Service to deploy to.',
            required=True,
            prefixes=False)
        flags.AddFunctionArg(parser)
        flags.AddMutexEnvVarsFlags(parser)
        flags.AddMemoryFlag(parser)
        flags.AddConcurrencyFlag(parser)
        flags.AddTimeoutFlag(parser)
        flags.AddAsyncFlag(parser)
        flags.AddLabelsFlags(parser)
        flags.AddMaxInstancesFlag(parser)
        flags.AddCommandFlag(parser)
        flags.AddArgsFlag(parser)
        flags.AddPortFlag(parser)
        flags.AddCpuFlag(parser)
        flags.AddNoTrafficFlag(parser)
        flags.AddServiceAccountFlag(parser)
        concept_parsers.ConceptParser([service_presentation
                                       ]).AddToParser(parser)
        # No output by default, can be overridden by --format
        parser.display_info.AddFormat('none')
Пример #12
0
    def Args(parser):
        Update.CommonArgs(parser)

        # Flags specific to managed CR
        managed_group = flags.GetManagedArgGroup(parser)
        flags.AddServiceAccountFlag(managed_group)
Пример #13
0
 def Args(parser):
     Update.Args(parser)
     labels_util.AddUpdateLabelsFlags(parser)
     flags.AddServiceAccountFlag(parser)
Пример #14
0
 def Args(parser):
     Deploy.CommonArgs(parser)
     managed_group = flags.GetManagedArgGroup(parser)
     flags.AddServiceAccountFlag(managed_group)
Пример #15
0
 def Args(parser):
     Deploy.Args(parser)
     labels_util.AddUpdateLabelsFlags(parser)
     flags.AddCloudSQLFlags(parser)
     flags.AddServiceAccountFlag(parser)