Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 3
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)
Ejemplo n.º 4
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')
Ejemplo n.º 5
0
 def Args(parser):
     Deploy.CommonArgs(parser)
     # Flags specific to CRoGKE
     gke_group = flags.GetGkeArgGroup(parser)
     flags.AddEndpointVisibilityEnum(gke_group)
     flags.AddCpuFlag(gke_group)
     # Flags not specific to any platform
     flags.AddPlatformArg(parser)
Ejemplo n.º 6
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')
Ejemplo n.º 7
0
    def Args(parser):
        Deploy.CommonArgs(parser)

        # 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
        flags.AddMinInstancesFlag(parser)
        flags.AddNoTrafficFlag(parser)
        flags.AddCpuFlag(parser)
Ejemplo n.º 8
0
 def Args(parser):
     Deploy.CommonArgs(parser)
     flags.AddLabelsFlags(parser)
     # 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
     flags.AddAlphaPlatformArg(parser)
     flags.AddSecretsFlags(parser)
     flags.AddConfigMapsFlags(parser)
     flags.AddScalingFlags(parser)
Ejemplo n.º 9
0
  def Args(parser):
    Update.CommonArgs(parser)

    # Flags specific to managed CR
    managed_group = flags.GetManagedArgGroup(parser)
    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
    flags.AddMinInstancesFlag(parser)
    flags.AddCpuFlag(parser)
Ejemplo n.º 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.AddCpuFlag(parser)
     flags.AddConcurrencyFlag(parser)
     flags.AddTimeoutFlag(parser)
     flags.AddAsyncFlag(parser)
     concept_parsers.ConceptParser(
         [resource_args.CLUSTER_PRESENTATION,
          service_presentation]).AddToParser(parser)
Ejemplo n.º 11
0
 def Args(parser):
     Update.CommonArgs(parser)
     # Flags specific to managed CR
     managed_group = flags.GetManagedArgGroup(parser)
     flags.AddVpcConnectorArg(managed_group)
     flags.AddRevisionSuffixArg(managed_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.AddSecretsFlags(cluster_group)
     flags.AddConfigMapsFlags(cluster_group)
     # Flags not specific to any platform
     flags.AddAlphaPlatformArg(parser)
     flags.AddScalingFlags(parser)
     flags.AddCommandFlag(parser)
     flags.AddArgsFlag(parser)
Ejemplo n.º 12
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')
Ejemplo n.º 13
0
  def Args(parser):
    Update.CommonArgs(parser)

    cluster_group = flags.GetClusterArgGroup(parser)
    flags.AddCpuFlag(cluster_group)