Exemplo n.º 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)
Exemplo n.º 2
0
    def Args(parser):
        Deploy.CommonArgs(parser)

        # Flags specific to VPCAccess
        managed_group = flags.GetManagedArgGroup(parser)
        flags.AddEgressSettingsFlag(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.AddMinInstancesFlag(parser)
        flags.AddDeployTagFlag(parser)
        flags.AddIngressFlag(parser)

        # Flags inherited from gcloud builds submit
        flags.AddConfigFlags(parser)
        flags.AddSourceFlag(parser)
        flags.AddBuildTimeoutFlag(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)
Exemplo n.º 3
0
    def Args(parser):
        Update.CommonArgs(parser)

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

        # Flags not specific to any platform
        flags.AddMinInstancesFlag(parser)
        flags.AddServiceAccountFlagAlpha(parser)
        flags.AddDeployTagFlag(parser)
Exemplo n.º 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')
Exemplo n.º 5
0
    def Args(parser):
        Update.CommonArgs(parser)

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

        # Flags only supported on GKE and Knative
        cluster_group = flags.GetClusterArgGroup(parser)
        flags.AddEndpointVisibilityEnum(cluster_group)

        # Flags not specific to any platform
        flags.AddDeployTagFlag(parser)
        flags.AddMinInstancesFlag(parser)
Exemplo n.º 6
0
    def Args(parser):
        Deploy.CommonArgs(parser)

        # Flags only supported on GKE and Knative
        cluster_group = flags.GetClusterArgGroup(parser)
        flags.AddEndpointVisibilityEnum(cluster_group)

        # 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)
Exemplo n.º 7
0
    def Args(parser):
        Deploy.CommonArgs(parser)

        # Flags specific to VPCAccess
        flags.AddVpcConnectorArg(parser)

        # Flags not specific to any platform
        flags.AddMinInstancesFlag(parser)
        flags.AddServiceAccountFlagAlpha(parser)
        flags.AddDeployTagFlag(parser)

        # Flags inherited from gcloud builds submit
        flags.AddConfigFlags(parser)
        flags.AddSourceFlag(parser)
        flags.AddBuildTimeoutFlag(parser)
        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.AddNoCacheFlag(parser, True)
        build_flags.AddIgnoreFileFlag(parser, True)
 def CommonArgs(parser):
     service_presentation = presentation_specs.ResourcePresentationSpec(
         'SERVICE',
         resource_args.GetServiceResourceSpec(),
         'Service to proxy locally.',
         required=True,
         prefixes=False)
     flags.AddPortFlag(
         parser,
         help_text='Local port number to expose the proxied service. '
         'If not specified, it will be set to 8080.')
     flags.AddTokenFlag(parser)
     flags.AddDeployTagFlag(
         parser,
         help_text=
         'Traffic tag of the service to expose via the proxy. If not '
         'specified, the default service URL will be proxied which may '
         'serve different revisions based on traffic-splits. '
         'Custom tags can be used to proxy specific revisions. Please see '
         'https://cloud.google.com/run/docs/rollouts-rollbacks-traffic-migration#tags.'
     )
     concept_parsers.ConceptParser([service_presentation
                                    ]).AddToParser(parser)