예제 #1
0
    def Args(parser):
        Deploy.CommonArgs(parser)

        # Flags specific to managed CR
        managed_group = flags.GetManagedArgGroup(parser)
        flags.AddSandboxArg(managed_group)
        flags.AddBinAuthzPolicyFlags(managed_group)
        flags.AddBinAuthzBreakglassFlag(managed_group)

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

        # Flags not specific to any platform
        flags.AddDeployTagFlag(parser)
        flags.AddIngressFlag(parser)
        flags.AddHttp2Flag(parser)

        # Flags specific to deploy from source
        flags.AddSourceFlag(parser)
        flags.AddConfigFlags(parser)
        # TODO(b/165145546): Remove advanced build flags for 'gcloud run deploy'
        build_flags.AddGcsSourceStagingDirFlag(parser, True)
        build_flags.AddGcsLogDirFlag(parser, True)
        build_flags.AddMachineTypeFlag(parser, True)
        build_flags.AddDiskSizeFlag(parser, True)
        build_flags.AddSubstitutionsFlag(parser, True)
        build_flags.AddWorkerPoolFlag(parser, True)
        build_flags.AddNoCacheFlag(parser, True)
        build_flags.AddIgnoreFileFlag(parser, True)
예제 #2
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')
예제 #3
0
    def Args(cls, parser):
        cls.CommonArgs(parser)

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

        # Flags not specific to any platform
        flags.AddTrafficTagsFlags(parser)
예제 #4
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')
예제 #5
0
  def Args(cls, parser):
    cls.CommonArgs(parser)

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