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')
def Args(parser): """Adds --platform and the various related args.""" flags.AddPlatformAndLocationFlags(parser)