Exemplo n.º 1
0
  def Args(parser):
    # Flags specific to managed CR
    managed_group = flags.GetManagedArgGroup(parser)
    flags.AddRegionArg(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)
    namespace_presentation = presentation_specs.ResourcePresentationSpec(
        '--namespace',
        resource_args.GetNamespaceResourceSpec(),
        'Namespace to replace service.',
        required=True,
        prefixes=False)
    concept_parsers.ConceptParser(
        [namespace_presentation]).AddToParser(cluster_group)

    # Flags not specific to any platform
    flags.AddAsyncFlag(parser)
    flags.AddPlatformArg(parser)
    parser.add_argument(
        'FILE',
        action='store',
        type=arg_parsers.YAMLFileContents(),
        help='The absolute path to the YAML file with a Knative '
        'service definition for the service to update or deploy.')
Exemplo 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)
Exemplo n.º 3
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)
Exemplo n.º 4
0
 def CommonArgs(cls, parser):
     # Flags specific to managed CR
     managed_group = flags.GetManagedArgGroup(parser)
     flags.AddRegionArgWithDefault(managed_group)
     # Flags specific to CRoGKE
     gke_group = flags.GetGkeArgGroup(parser)
     namespace_presentation = presentation_specs.ResourcePresentationSpec(
         '--namespace',
         resource_args.GetNamespaceResourceSpec(),
         'Namespace to list services in.',
         required=True,
         prefixes=False)
     concept_parsers.ConceptParser(
         [resource_args.CLUSTER_PRESENTATION,
          namespace_presentation]).AddToParser(gke_group)
     # Flags not specific to any platform
     flags.AddServiceFlag(parser)
     parser.display_info.AddFormat(
         'table('
         '{ready_column},'
         'name:label=REVISION,'
         'active.yesno(yes="yes", no=""),'
         'service_name:label=SERVICE,'
         'creation_timestamp.date("%Y-%m-%d %H:%M:%S %Z"):label=DEPLOYED,'
         'author:label="DEPLOYED BY")'.format(
             ready_column=pretty_print.READY_COLUMN))
     parser.display_info.AddUriFunc(cls._GetResourceUri)
Exemplo n.º 5
0
 def CommonArgs(cls, parser):
   # Flags specific to managed CR
   managed_group = flags.GetManagedArgGroup(parser)
   flags.AddRegionArgWithDefault(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)
   namespace_presentation = presentation_specs.ResourcePresentationSpec(
       '--namespace',
       resource_args.GetNamespaceResourceSpec(),
       'Namespace to list configurations in.',
       required=True,
       prefixes=False)
   concept_parsers.ConceptParser(
       [namespace_presentation]).AddToParser(cluster_group)
   # Flags not specific to any platform
   flags.AddPlatformArg(parser)
   parser.display_info.AddFormat(
       'table('
       '{ready_column},'
       'metadata.name:label=CONFIGURATION,'
       'region:label=REGION,'
       'status.latestCreatedRevisionName:label="LATEST REVISION",'
       'status.latestReadyRevisionName:label="READY REVISION")'.format(
           ready_column=pretty_print.READY_COLUMN))
   parser.display_info.AddUriFunc(cls._GetResourceUri)
Exemplo n.º 6
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)
Exemplo n.º 7
0
 def CommonArgs(cls, parser):
     # Flags specific to managed CR
     managed_group = flags.GetManagedArgGroup(parser)
     concept_parsers.ConceptParser([
         resource_args.CLOUD_RUN_LOCATION_PRESENTATION
     ]).AddToParser(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)
     namespace_presentation = presentation_specs.ResourcePresentationSpec(
         '--namespace',
         resource_args.GetNamespaceResourceSpec(),
         'Namespace to list services in.',
         required=True,
         prefixes=False)
     concept_parsers.ConceptParser([namespace_presentation
                                    ]).AddToParser(cluster_group)
     # Flags not specific to any platform
     flags.AddPlatformArg(parser)
     parser.display_info.AddUriFunc(cls._GetResourceUri)
Exemplo n.º 8
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.º 9
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)
Exemplo n.º 10
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.º 11
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)
Exemplo n.º 12
0
 def CommonArgs(cls, parser):
     # Flags specific to managed CR
     managed_group = flags.GetManagedArgGroup(parser)
     flags.AddRegionArg(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)
     namespace_presentation = presentation_specs.ResourcePresentationSpec(
         '--namespace',
         resource_args.GetNamespaceResourceSpec(),
         'Namespace to list triggers in.',
         required=True,
         prefixes=False)
     concept_parsers.ConceptParser([namespace_presentation
                                    ]).AddToParser(cluster_group)
     # Flags not specific to any platform
     flags.AddPlatformArg(parser)
     events_flags.AddTargetServiceFlag(parser)
     parser.display_info.AddFormat("""table(
     {ready_column},
     firstof(id,metadata.name):label=TRIGGER,
     filter_attributes.extract({type_field}).join():label="EVENT TYPE",
     subscriber:label=TARGET)""".format(
         ready_column=pretty_print.READY_COLUMN,
         type_field=trigger.EVENT_TYPE_FIELD))
     parser.display_info.AddUriFunc(cls._GetResourceUri)
Exemplo n.º 13
0
 def CommonArgs(cls, parser):
     # Flags specific to managed CR
     managed_group = flags.GetManagedArgGroup(parser)
     flags.AddRegionArg(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)
     namespace_presentation = presentation_specs.ResourcePresentationSpec(
         '--namespace',
         resource_args.GetNamespaceResourceSpec(),
         'Namespace to list routes in.',
         required=True,
         prefixes=False)
     concept_parsers.ConceptParser([namespace_presentation
                                    ]).AddToParser(cluster_group)
     parser.display_info.AddFormat("""table(
 {ready_column},
 metadata.name:label=ROUTE)
 """.format(ready_column=pretty_print.READY_COLUMN))
     # Flags not specific to any platform
     flags.AddPlatformArg(parser)
     parser.display_info.AddUriFunc(cls._GetResourceUri)
Exemplo n.º 14
0
 def CommonArgs(parser):
     # Flags specific to managed CR
     managed_group = flags.GetManagedArgGroup(parser)
     flags.AddRegionArg(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
     flags.AddPlatformArg(parser)
     events_flags.AddEventTypeFlagArg(parser)
     events_flags.AddTargetServiceFlag(parser, required=True)
     events_flags.AddBrokerFlag(parser)
     events_flags.AddParametersFlags(parser)
     events_flags.AddSecretsFlag(parser)
     trigger_presentation = presentation_specs.ResourcePresentationSpec(
         'trigger',
         events_resource_args.GetTriggerResourceSpec(),
         'Name of the trigger to create',
         required=True)
     concept_parsers.ConceptParser([trigger_presentation
                                    ]).AddToParser(parser)
Exemplo n.º 15
0
 def CommonArgs(cls, parser):
     # Flags specific to managed CR
     managed_group = flags.GetManagedArgGroup(parser)
     concept_parsers.ConceptParser([
         resource_args.CLOUD_RUN_LOCATION_PRESENTATION
     ]).AddToParser(managed_group)
     # Flags specific to CRoGKE
     gke_group = flags.GetGkeArgGroup(parser)
     namespace_presentation = presentation_specs.ResourcePresentationSpec(
         '--namespace',
         resource_args.GetNamespaceResourceSpec(),
         'Namespace list services in.',
         required=True,
         prefixes=False)
     concept_parsers.ConceptParser(
         [resource_args.CLUSTER_PRESENTATION,
          namespace_presentation]).AddToParser(gke_group)
     parser.display_info.AddFormat("""table(
     {ready_column},
     firstof(id,metadata.name):label=SERVICE,
     region:label=REGION,
     latest_created_revision:label="LATEST REVISION",
     serving_revisions.list():label="SERVING REVISION",
     last_modifier:label="LAST DEPLOYED BY",
     last_transition_time:label="LAST DEPLOYED AT")""".format(
         ready_column=pretty_print.READY_COLUMN))
     parser.display_info.AddUriFunc(cls._GetResourceUri)
Exemplo n.º 16
0
 def CommonArgs(cls, parser):
     # Flags specific to managed CR
     managed_group = flags.GetManagedArgGroup(parser)
     concept_parsers.ConceptParser([
         resource_args.CLOUD_RUN_LOCATION_PRESENTATION
     ]).AddToParser(managed_group)
     # Flags specific to CRoGKE
     gke_group = flags.GetGkeArgGroup(parser)
     namespace_presentation = presentation_specs.ResourcePresentationSpec(
         '--namespace',
         resource_args.GetNamespaceResourceSpec(),
         'Namespace list triggers in.',
         required=True,
         prefixes=False)
     concept_parsers.ConceptParser(
         [resource_args.CLUSTER_PRESENTATION,
          namespace_presentation]).AddToParser(gke_group)
     # Flags not specific to any platform
     parser.display_info.AddFormat("""table(
     {ready_column},
     firstof(id,metadata.name):label=TRIGGER,
     region:label=REGION,
     broker:label=BROKER,
     subscriber:label=SUBSCRIBER)""".format(
         ready_column=pretty_print.READY_COLUMN))
     parser.display_info.AddUriFunc(cls._GetResourceUri)
Exemplo n.º 17
0
 def CommonArgs(parser):
     # Flags specific to managed CR
     managed_group = flags.GetManagedArgGroup(parser)
     flags.AddRegionArg(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
     parser.add_argument(
         '--service',
         required=True,
         help='Create domain mapping for the given service.')
     domain_mapping_presentation = presentation_specs.ResourcePresentationSpec(
         '--domain',
         resource_args.GetDomainMappingResourceSpec(),
         'Domain name is the ID of DomainMapping resource.',
         required=True,
         prefixes=False)
     concept_parsers.ConceptParser([domain_mapping_presentation
                                    ]).AddToParser(parser)
     parser.display_info.AddFormat("""table(
     name:label=NAME,
     type:label="RECORD TYPE",
     rrdata:label=CONTENTS)""")
Exemplo n.º 18
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)
Exemplo n.º 19
0
    def Args(parser):
        Update.CommonArgs(parser)

        # Flags specific to managed CR
        managed_group = flags.GetManagedArgGroup(parser)
        flags.AddSandboxArg(managed_group)
        flags.AddConfidentialFlag(managed_group)
        flags.AddCustomAudiencesFlag(managed_group)
        flags.AddSessionAffinityFlag(managed_group)
        flags.AddEncryptionKeyShutdownHoursFlag(managed_group)
Exemplo n.º 20
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)
Exemplo n.º 21
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)
Exemplo n.º 22
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.º 23
0
 def Args(parser):
   Deploy.CommonArgs(parser)
   # Flags specific to managed CR
   managed_group = flags.GetManagedArgGroup(parser)
   flags.AddRevisionSuffixArg(managed_group)
   # Flags specific to connecting to a cluster
   cluster_group = flags.GetClusterArgGroup(parser)
   flags.AddSecretsFlags(cluster_group)
   flags.AddConfigMapsFlags(cluster_group)
   # Flags not specific to any platform
   flags.AddMinInstancesFlag(parser)
   flags.AddCommandFlag(parser)
   flags.AddArgsFlag(parser)
Exemplo n.º 24
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.º 25
0
 def CommonArgs(parser):
     # Flags specific to managed CR
     managed_group = flags.GetManagedArgGroup(parser)
     flags.AddRegionArg(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
     flags.AddPlatformArg(parser)
     parser.display_info.AddFormat("""table(
     source_kind:label=CATEGORY:sort=1)""")
Exemplo n.º 26
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)
Exemplo n.º 27
0
 def CommonArgs(parser):
   # Flags specific to managed CR
   managed_group = flags.GetManagedArgGroup(parser)
   flags.AddRegionArg(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(),
       'Service to delete.',
       required=True,
       prefixes=False)
   concept_parsers.ConceptParser([service_presentation]).AddToParser(parser)
Exemplo n.º 28
0
 def CommonArgs(parser):
     # Flags specific to managed CR
     managed_group = flags.GetManagedArgGroup(parser)
     flags.AddRegionArg(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
     route_presentation = presentation_specs.ResourcePresentationSpec(
         'ROUTE',
         resource_args.GetRouteResourceSpec(),
         'Route to describe.',
         required=True,
         prefixes=False)
     concept_parsers.ConceptParser([route_presentation]).AddToParser(parser)
     parser.display_info.AddFormat('yaml')
Exemplo n.º 29
0
 def CommonArgs(parser):
   # Flags specific to managed CR
   managed_group = flags.GetManagedArgGroup(parser)
   flags.AddRegionArg(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
   domain_mapping_presentation = presentation_specs.ResourcePresentationSpec(
       '--domain',
       resource_args.GetDomainMappingResourceSpec(),
       'Domain name is the ID of DomainMapping resource.',
       required=True,
       prefixes=False)
   concept_parsers.ConceptParser([
       domain_mapping_presentation]).AddToParser(parser)
Exemplo n.º 30
0
  def Args(parser):
    # Flags specific to managed CR
    managed_group = flags.GetManagedArgGroup(parser)
    flags.AddRegionArg(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
    flags.AddAsyncFlag(parser)
    flags.AddPlatformArg(parser)
    parser.add_argument(
        'FILE',
        action='store',
        help='The absolute path to the YAML file with a Knative '
        'service definition for the service to update or deploy.')