Beispiel #1
0
  def Args(parser):
    _Args(parser)
    group = parser.add_mutually_exclusive_group()
    _AddAdditionalZonesFlag(group, deprecated=True)
    flags.AddNodeLocationsFlag(group)

    flags.AddAcceleratorArgs(parser)
    flags.AddAddonsFlags(parser)
    flags.AddClusterAutoscalingFlags(parser)
    flags.AddEnableAutoRepairFlag(parser)
    flags.AddEnableBinAuthzFlag(parser, hidden=True)
    flags.AddEnableKubernetesAlphaFlag(parser)
    flags.AddEnableLegacyAuthorizationFlag(parser)
    flags.AddIPAliasFlags(parser)
    flags.AddIstioConfigFlag(parser)
    flags.AddLabelsFlag(parser)
    flags.AddLocalSSDAndLocalSSDVolumeConfigsFlag(parser)
    flags.AddMaintenanceWindowFlag(parser)
    flags.AddMasterAuthorizedNetworksFlags(parser)
    flags.AddMinCpuPlatformFlag(parser)
    flags.AddWorkloadMetadataFromNodeFlag(parser)
    flags.AddNetworkPolicyFlags(parser)
    flags.AddEnableSharedNetworkFlag(parser, hidden=True)
    flags.AddAutoprovisioningFlags(parser, hidden=False)
    flags.AddNodeTaintsFlag(parser)
    flags.AddPreemptibleFlag(parser)
    flags.AddPodSecurityPolicyFlag(parser)
    flags.AddAllowRouteOverlapFlag(parser)
    flags.AddPrivateClusterFlags(parser, hidden=False)
    flags.AddClusterNodeIdentityFlags(parser)
    flags.AddTpuFlags(parser, hidden=False)
Beispiel #2
0
 def Args(parser):
     _Args(parser)
     group = parser.add_mutually_exclusive_group()
     _AddAdditionalZonesFlag(group, deprecated=True)
     flags.AddNodeLocationsFlag(group)
     flags.AddBetaAddonsFlags(parser)
     flags.AddClusterAutoscalingFlags(parser)
     flags.AddMaxPodsPerNodeFlag(parser)
     flags.AddEnableAutoRepairFlag(parser, for_create=True)
     flags.AddEnableBinAuthzFlag(parser)
     flags.AddEnableKubernetesAlphaFlag(parser)
     flags.AddEnableLegacyAuthorizationFlag(parser)
     flags.AddIPAliasFlags(parser)
     flags.AddIstioConfigFlag(parser)
     flags.AddLabelsFlag(parser)
     flags.AddLocalSSDFlag(parser)
     flags.AddMaintenanceWindowFlag(parser)
     flags.AddMasterAuthorizedNetworksFlags(parser)
     flags.AddMinCpuPlatformFlag(parser)
     flags.AddWorkloadMetadataFromNodeFlag(parser)
     flags.AddNetworkPolicyFlags(parser)
     flags.AddNodeTaintsFlag(parser)
     flags.AddPreemptibleFlag(parser)
     flags.AddPodSecurityPolicyFlag(parser)
     flags.AddAllowRouteOverlapFlag(parser)
     flags.AddClusterNodeIdentityFlags(parser)
     flags.AddPrivateClusterFlags(parser, with_deprecated=True)
     flags.AddEnableStackdriverKubernetesFlag(parser)
     flags.AddTpuFlags(parser, hidden=False)
     flags.AddAutoprovisioningFlags(parser)
     flags.AddVerticalPodAutoscalingFlag(parser)
     flags.AddResourceUsageExportFlags(parser)
Beispiel #3
0
    def Args(parser):
        _Args(parser)
        group = parser.add_mutually_exclusive_group()
        _AddAdditionalZonesFlag(group, deprecated=True)

        flags.AddAcceleratorArgs(parser)
        flags.AddAddonsFlags(parser)
        flags.AddClusterAutoscalingFlags(parser)
        flags.AddClusterScopesFlag(parser)
        flags.AddEnableAuditLoggingFlag(parser, hidden=True)
        flags.AddEnableAutoRepairFlag(parser)
        flags.AddEnableAutoUpgradeFlag(parser)
        flags.AddEnableKubernetesAlphaFlag(parser)
        flags.AddEnableLegacyAuthorizationFlag(parser)
        flags.AddIPAliasFlags(parser, hidden=False)
        flags.AddLabelsFlag(parser)
        flags.AddLocalSSDFlag(parser)
        flags.AddMaintenanceWindowFlag(parser, hidden=True)
        flags.AddMasterAuthorizedNetworksFlags(parser)
        flags.AddMinCpuPlatformFlag(parser)
        flags.AddWorkloadMetadataFromNodeFlag(parser, hidden=True)
        flags.AddNetworkPolicyFlags(parser, hidden=False)
        flags.AddNodeLocationsFlag(group)
        flags.AddNodeTaintsFlag(parser, hidden=True)
        flags.AddPreemptibleFlag(parser)
        flags.AddServiceAccountFlag(parser)
Beispiel #4
0
    def Args(parser):
        """Register flags for this command.

    Args:
      parser: An argparse.ArgumentParser-like object. It is mocked out in order
        to capture some information, but behaves like an ArgumentParser.
    """
        _AddCommonArgs(parser)
        group = parser.add_mutually_exclusive_group(required=True)
        group_locations = group.add_mutually_exclusive_group()
        _AddMutuallyExclusiveArgs(group, base.ReleaseTrack.GA)
        flags.AddNodeLocationsFlag(group_locations)
        flags.AddClusterAutoscalingFlags(parser, group)
        flags.AddMasterAuthorizedNetworksFlags(parser,
                                               enable_group_for_update=group)
        flags.AddEnableLegacyAuthorizationFlag(group)
        flags.AddStartIpRotationFlag(group)
        flags.AddStartCredentialRotationFlag(group)
        flags.AddCompleteIpRotationFlag(group)
        flags.AddCompleteCredentialRotationFlag(group)
        flags.AddUpdateLabelsFlag(group)
        flags.AddRemoveLabelsFlag(group)
        flags.AddNetworkPolicyFlags(group)
        flags.AddLoggingServiceFlag(group, enable_kubernetes=False)
        flags.AddMonitoringServiceFlag(group, enable_kubernetes=False)
        flags.AddMaintenanceWindowFlag(group, add_unset_text=True)
Beispiel #5
0
  def Args(parser):
    _Args(parser)
    group = parser.add_mutually_exclusive_group()
    _AddAdditionalZonesFlag(group, deprecated=True)
    flags.AddNodeLocationsFlag(group)
    flags.AddAlphaAddonsFlags(parser)
    flags.AddClusterAutoscalingFlags(parser)
    flags.AddMaxPodsPerNodeFlag(parser)
    flags.AddEnableAutoRepairFlag(parser, for_create=True)
    flags.AddEnableBinAuthzFlag(parser)
    flags.AddEnableKubernetesAlphaFlag(parser)
    flags.AddEnableLegacyAuthorizationFlag(parser)
    flags.AddIPAliasFlags(parser)
    flags.AddIstioConfigFlag(parser)
    flags.AddLabelsFlag(parser)
    flags.AddLocalSSDAndLocalSSDVolumeConfigsFlag(parser)
    flags.AddMaintenanceWindowFlag(parser)
    flags.AddMasterAuthorizedNetworksFlags(parser)
    flags.AddMinCpuPlatformFlag(parser)
    flags.AddWorkloadMetadataFromNodeFlag(parser)
    flags.AddNetworkPolicyFlags(parser)
    flags.AddAutoprovisioningFlags(parser, hidden=False)
    flags.AddAutoscalingProfilesFlag(parser, hidden=True)
    flags.AddNodeTaintsFlag(parser)
    flags.AddPreemptibleFlag(parser)
    flags.AddPodSecurityPolicyFlag(parser)
    flags.AddAllowRouteOverlapFlag(parser)
    flags.AddPrivateClusterFlags(parser, with_deprecated=True, with_alpha=True)
    flags.AddClusterNodeIdentityFlags(parser)
    flags.AddTpuFlags(parser, hidden=False, enable_tpu_service_networking=True)
    flags.AddEnableStackdriverKubernetesFlag(parser)
    flags.AddManagedPodIdentityFlags(parser)
    flags.AddWorkloadIdentityFlags(parser)
    flags.AddResourceUsageExportFlags(parser)
    flags.AddAuthenticatorSecurityGroupFlags(parser)
    flags.AddVerticalPodAutoscalingFlag(parser)
    flags.AddSecurityProfileForCreateFlags(parser)
    flags.AddInitialNodePoolNameArg(parser, hidden=False)
    flags.AddEnablePrivateIpv6AccessFlag(parser, hidden=True)
    flags.AddEnableShieldedContainersFlags(parser)

    versioning_groups = parser.add_mutually_exclusive_group("""\
`--release-channel` cannot be specified if `--cluster-version` or
`--node-version` are specified.
""")
    flags.AddReleaseChannelFlag(versioning_groups)

    cluster_version_group = versioning_groups.add_group()
    flags.AddClusterVersionFlag(cluster_version_group)
    flags.AddNodeVersionFlag(cluster_version_group)
    flags.AddEnableAutoUpgradeFlag(parser, default=True)

    kms_flag_overrides = {
        'kms-key': '--database-encryption-key',
        'kms-keyring': '--database-encryption-key-keyring',
        'kms-location': '--database-encryption-key-location',
        'kms-project': '--database-encryption-key-project'
    }
    kms_resource_args.AddKmsKeyResourceArg(
        parser, 'cluster', flag_overrides=kms_flag_overrides)
Beispiel #6
0
 def Args(parser):
     _AddCommonArgs(parser)
     group = parser.add_mutually_exclusive_group(required=True)
     _AddMutuallyExclusiveArgs(group, base.ReleaseTrack.BETA)
     flags.AddClusterAutoscalingFlags(parser, group)
     group_locations = group.add_mutually_exclusive_group()
     _AddAdditionalZonesArg(group_locations, deprecated=True)
     flags.AddNodeLocationsFlag(group_locations)
     group_logging_monitoring = group.add_group()
     flags.AddLoggingServiceFlag(group_logging_monitoring,
                                 enable_kubernetes=True)
     flags.AddMonitoringServiceFlag(group_logging_monitoring,
                                    enable_kubernetes=True)
     flags.AddMasterAuthorizedNetworksFlags(parser,
                                            enable_group_for_update=group)
     flags.AddEnableLegacyAuthorizationFlag(group)
     flags.AddStartIpRotationFlag(group)
     flags.AddStartCredentialRotationFlag(group)
     flags.AddCompleteIpRotationFlag(group)
     flags.AddCompleteCredentialRotationFlag(group)
     flags.AddUpdateLabelsFlag(group)
     flags.AddRemoveLabelsFlag(group)
     flags.AddNetworkPolicyFlags(group)
     flags.AddMaintenanceWindowFlag(group, add_unset_text=True)
     flags.AddPodSecurityPolicyFlag(group)
     flags.AddEnableBinAuthzFlag(group)
     flags.AddAutoprovisioningFlags(group)
     flags.AddVerticalPodAutoscalingFlag(group)
     flags.AddResourceUsageExportFlags(group, is_update=True)
     flags.AddIstioConfigFlag(parser)
     flags.AddEnableIntraNodeVisibilityFlag(group)
     flags.AddWorkloadIdentityFlags(group)
     flags.AddWorkloadIdentityUpdateFlags(group)
     flags.AddEnableShieldedNodesFlags(group)
Beispiel #7
0
 def Args(parser):
     _Args(parser)
     _AddAdditionalZonesFlag(parser, deprecated=True)
     flags.AddNodeLocationsFlag(parser)
     flags.AddAddonsFlags(parser)
     flags.AddClusterAutoscalingFlags(parser)
     flags.AddMaxPodsPerNodeFlag(parser)
     flags.AddEnableAutoRepairFlag(parser, for_create=True)
     flags.AddEnableKubernetesAlphaFlag(parser)
     flags.AddEnableStackdriverKubernetesFlag(parser)
     flags.AddEnableLegacyAuthorizationFlag(parser)
     flags.AddIPAliasFlags(parser)
     flags.AddLabelsFlag(parser)
     flags.AddLocalSSDFlag(parser)
     flags.AddMaintenanceWindowFlag(parser)
     flags.AddMasterAuthorizedNetworksFlags(parser)
     flags.AddMinCpuPlatformFlag(parser)
     flags.AddNetworkPolicyFlags(parser)
     flags.AddNodeTaintsFlag(parser)
     flags.AddPreemptibleFlag(parser)
     flags.AddClusterNodeIdentityFlags(parser)
     flags.AddPrivateClusterFlags(parser,
                                  with_deprecated=False,
                                  with_alpha=False)
     flags.AddClusterVersionFlag(parser)
     flags.AddNodeVersionFlag(parser)
     flags.AddEnableAutoUpgradeFlag(parser)
     flags.AddTpuFlags(parser, hidden=False)
     flags.AddResourceUsageExportFlags(parser)
Beispiel #8
0
 def Args(parser):
     _AddCommonArgs(parser)
     group = parser.add_mutually_exclusive_group(required=True)
     _AddMutuallyExclusiveArgs(group, base.ReleaseTrack.BETA)
     flags.AddClusterAutoscalingFlags(parser, group)
     group_locations = group.add_mutually_exclusive_group()
     _AddAdditionalZonesArg(group_locations, deprecated=True)
     flags.AddNodeLocationsFlag(group_locations)
     group_logging_monitoring = group.add_group()
     flags.AddLoggingServiceFlag(group_logging_monitoring,
                                 enable_kubernetes=True)
     flags.AddMonitoringServiceFlag(group_logging_monitoring,
                                    enable_kubernetes=True)
     flags.AddMasterAuthorizedNetworksFlags(parser,
                                            enable_group_for_update=group)
     flags.AddEnableLegacyAuthorizationFlag(group)
     flags.AddStartIpRotationFlag(group)
     flags.AddStartCredentialRotationFlag(group)
     flags.AddCompleteIpRotationFlag(group)
     flags.AddCompleteCredentialRotationFlag(group)
     flags.AddUpdateLabelsFlag(group)
     flags.AddRemoveLabelsFlag(group)
     flags.AddNetworkPolicyFlags(group)
     flags.AddMaintenanceWindowFlag(group, add_unset_text=True)
     flags.AddPodSecurityPolicyFlag(group)
     flags.AddEnableBinAuthzFlag(group)
     flags.AddAutoprovisioningFlags(group)
     flags.AddVerticalPodAutoscalingFlag(group, hidden=True)
     # TODO(b/118979273): unhide the flags once the beta launch of GKE resource
     # usage export is ready.
     flags.AddResourceUsageExportFlags(group,
                                       add_clear_flag=True,
                                       hidden=True)
     flags.AddIstioConfigFlag(parser)
Beispiel #9
0
    def Args(parser):
        _Args(parser)
        group = parser.add_mutually_exclusive_group()
        _AddAdditionalZonesFlag(group, deprecated=True)
        flags.AddNodeLocationsFlag(group)

        flags.AddAddonsFlags(parser)
        flags.AddClusterAutoscalingFlags(parser)
        flags.AddClusterNodeIdentityFlags(parser)
        flags.AddEnableAutoRepairFlag(parser)
        flags.AddEnableKubernetesAlphaFlag(parser)
        flags.AddEnableLegacyAuthorizationFlag(parser)
        flags.AddIPAliasFlags(parser, hidden=False)
        flags.AddLabelsFlag(parser)
        flags.AddLocalSSDFlag(parser)
        flags.AddMaintenanceWindowFlag(parser)
        flags.AddMasterAuthorizedNetworksFlags(parser)
        flags.AddMinCpuPlatformFlag(parser)
        # TODO(b/64091817) Un-hide once we're ready to release.
        flags.AddWorkloadMetadataFromNodeFlag(parser, hidden=True)
        flags.AddNetworkPolicyFlags(parser, hidden=True)
        flags.AddNodeTaintsFlag(parser)
        flags.AddPreemptibleFlag(parser)
        flags.AddNodeVersionFlag(parser)
        flags.AddPodSecurityPolicyFlag(parser, hidden=True)
        flags.AddAllowRouteOverlapFlag(parser)
Beispiel #10
0
 def Args(parser):
     _AddCommonArgs(parser)
     group = parser.add_mutually_exclusive_group(required=True)
     _AddMutuallyExclusiveArgs(group, base.ReleaseTrack.ALPHA)
     flags.AddClusterAutoscalingFlags(parser, group)
     group_locations = group.add_mutually_exclusive_group()
     _AddAdditionalZonesArg(group_locations, deprecated=True)
     flags.AddNodeLocationsFlag(group_locations)
     group_logging_monitoring = group.add_group()
     flags.AddLoggingServiceFlag(group_logging_monitoring,
                                 enable_kubernetes=True)
     flags.AddMonitoringServiceFlag(group_logging_monitoring,
                                    enable_kubernetes=True)
     flags.AddMasterAuthorizedNetworksFlags(parser,
                                            enable_group_for_update=group)
     flags.AddEnableLegacyAuthorizationFlag(group)
     flags.AddStartIpRotationFlag(group)
     flags.AddStartCredentialRotationFlag(group)
     flags.AddCompleteIpRotationFlag(group)
     flags.AddCompleteCredentialRotationFlag(group)
     flags.AddUpdateLabelsFlag(group)
     flags.AddRemoveLabelsFlag(group)
     flags.AddNetworkPolicyFlags(group)
     flags.AddAutoprovisioningFlags(group, hidden=False)
     flags.AddMaintenanceWindowFlag(group, add_unset_text=True)
     flags.AddPodSecurityPolicyFlag(group)
     flags.AddEnableBinAuthzFlag(group, hidden=True)
     flags.AddResourceUsageBigqueryDatasetFlag(group, add_clear_flag=True)
     flags.AddVerticalPodAutoscalingFlag(group, hidden=True)
Beispiel #11
0
 def Args(parser):
     _Args(parser)
     group = parser.add_mutually_exclusive_group()
     _AddAdditionalZonesFlag(group, deprecated=True)
     flags.AddNodeLocationsFlag(group)
     flags.AddBetaAddonsFlags(parser)
     flags.AddClusterAutoscalingFlags(parser)
     flags.AddMaxPodsPerNodeFlag(parser)
     flags.AddEnableAutoRepairFlag(parser, for_create=True)
     flags.AddEnableBinAuthzFlag(parser)
     flags.AddEnableKubernetesAlphaFlag(parser)
     flags.AddEnableLegacyAuthorizationFlag(parser)
     flags.AddIPAliasFlags(parser)
     flags.AddIstioConfigFlag(parser)
     flags.AddLabelsFlag(parser)
     flags.AddLocalSSDFlag(parser)
     flags.AddMaintenanceWindowFlag(parser)
     flags.AddMasterAuthorizedNetworksFlags(parser)
     flags.AddMinCpuPlatformFlag(parser)
     flags.AddWorkloadMetadataFromNodeFlag(parser)
     flags.AddNetworkPolicyFlags(parser)
     flags.AddNodeTaintsFlag(parser)
     flags.AddPreemptibleFlag(parser)
     flags.AddPodSecurityPolicyFlag(parser)
     flags.AddAllowRouteOverlapFlag(parser)
     flags.AddClusterNodeIdentityFlags(parser)
     flags.AddPrivateClusterFlags(parser,
                                  with_deprecated=True,
                                  with_alpha=False)
     flags.AddEnableStackdriverKubernetesFlag(parser)
     flags.AddTpuFlags(parser, hidden=False)
     flags.AddAutoprovisioningFlags(parser)
     flags.AddVerticalPodAutoscalingFlag(parser)
     flags.AddResourceUsageExportFlags(parser)
     flags.AddAuthenticatorSecurityGroupFlags(parser)
     flags.AddEnableIntraNodeVisibilityFlag(parser)
     flags.AddWorkloadIdentityFlags(parser)
     flags.AddEnableShieldedNodesFlags(parser)
     flags.AddClusterVersionFlag(parser)
     flags.AddNodeVersionFlag(parser)
     flags.AddEnableAutoUpgradeFlag(parser, default=True)
     kms_flag_overrides = {
         'kms-key': '--database-encryption-key',
         'kms-keyring': '--database-encryption-key-keyring',
         'kms-location': '--database-encryption-key-location',
         'kms-project': '--database-encryption-key-project'
     }
     kms_resource_args.AddKmsKeyResourceArg(
         parser, 'cluster', flag_overrides=kms_flag_overrides)
Beispiel #12
0
 def Args(parser):
     _AddCommonArgs(parser)
     group = parser.add_mutually_exclusive_group(required=True)
     _AddMutuallyExclusiveArgs(group, base.ReleaseTrack.BETA)
     flags.AddClusterAutoscalingFlags(parser, group)
     _AddAdditionalZonesArg(group)
     flags.AddMasterAuthorizedNetworksFlags(parser, group)
     flags.AddEnableLegacyAuthorizationFlag(group)
     flags.AddStartIpRotationFlag(group)
     flags.AddCompleteIpRotationFlag(group)
     flags.AddUpdateLabelsFlag(group)
     flags.AddRemoveLabelsFlag(group)
     flags.AddNetworkPolicyFlags(group)
     flags.AddLoggingServiceFlag(group)
     flags.AddEnableAuditLoggingFlag(group, hidden=True)
     flags.AddMaintenanceWindowFlag(group, add_unset_text=True)
Beispiel #13
0
 def Args(parser):
     _Args(parser)
     _AddAdditionalZonesFlag(parser)
     flags.AddAddonsFlags(parser, add_disable_addons_flag=True)
     flags.AddClusterAutoscalingFlags(parser)
     flags.AddEnableAutoRepairFlag(parser, suppressed=True)
     flags.AddEnableKubernetesAlphaFlag(parser, suppressed=True)
     flags.AddEnableLegacyAuthorizationFlag(parser, hidden=True)
     flags.AddIPAliasFlags(parser, hidden=True)
     flags.AddLabelsFlag(parser, suppressed=True)
     flags.AddLocalSSDFlag(parser, suppressed=True)
     flags.AddMaintenanceWindowFlag(parser, hidden=True)
     flags.AddMasterAuthorizedNetworksFlags(parser, hidden=True)
     flags.AddNetworkPolicyFlags(parser, hidden=True)
     flags.AddNodeTaintsFlag(parser, hidden=True)
     flags.AddPreemptibleFlag(parser, suppressed=True)
     flags.AddDeprecatedClusterNodeIdentityFlags(parser)
Beispiel #14
0
 def Args(parser):
     _Args(parser)
     _AddAdditionalZonesFlag(parser)
     flags.AddClusterAutoscalingFlags(parser, hidden=True)
     flags.AddEnableAutoRepairFlag(parser, suppressed=True)
     flags.AddEnableAutoUpgradeFlag(parser, suppressed=True)
     flags.AddEnableKubernetesAlphaFlag(parser, suppressed=True)
     flags.AddEnableLegacyAuthorizationFlag(parser, hidden=True)
     flags.AddIPAliasFlags(parser, hidden=True)
     flags.AddLabelsFlag(parser, suppressed=True)
     flags.AddLocalSSDFlag(parser, suppressed=True)
     flags.AddMaintenanceWindowFlag(parser, hidden=True)
     flags.AddMasterAuthorizedNetworksFlags(parser, hidden=True)
     flags.AddNetworkPolicyFlags(parser, hidden=True)
     flags.AddNodeTaintsFlag(parser, hidden=True)
     flags.AddOldClusterScopesFlag(parser)
     flags.AddPreemptibleFlag(parser, suppressed=True)
     flags.AddServiceAccountFlag(parser, suppressed=True)
Beispiel #15
0
 def Args(parser):
     _Args(parser)
     _AddAdditionalZonesFlag(parser, deprecated=True)
     flags.AddNodeLocationsFlag(parser)
     flags.AddAddonsFlags(parser)
     flags.AddClusterAutoscalingFlags(parser)
     flags.AddEnableAutoRepairFlag(parser, for_create=True)
     flags.AddEnableKubernetesAlphaFlag(parser)
     flags.AddEnableLegacyAuthorizationFlag(parser)
     flags.AddIPAliasFlags(parser)
     flags.AddLabelsFlag(parser)
     flags.AddLocalSSDFlag(parser)
     flags.AddMaintenanceWindowFlag(parser)
     flags.AddMasterAuthorizedNetworksFlags(parser)
     flags.AddMinCpuPlatformFlag(parser)
     flags.AddNetworkPolicyFlags(parser)
     flags.AddNodeTaintsFlag(parser)
     flags.AddPreemptibleFlag(parser)
     flags.AddDeprecatedClusterNodeIdentityFlags(parser)
Beispiel #16
0
 def Args(parser):
   _AddCommonArgs(parser)
   group = parser.add_mutually_exclusive_group(required=True)
   _AddMutuallyExclusiveArgs(group, base.ReleaseTrack.ALPHA)
   flags.AddClusterAutoscalingFlags(parser, group)
   group_locations = group.add_mutually_exclusive_group()
   _AddAdditionalZonesArg(group_locations, deprecated=True)
   flags.AddNodeLocationsFlag(group_locations)
   flags.AddMasterAuthorizedNetworksFlags(parser, group)
   flags.AddEnableLegacyAuthorizationFlag(group)
   flags.AddStartIpRotationFlag(group)
   flags.AddCompleteIpRotationFlag(group)
   flags.AddUpdateLabelsFlag(group)
   flags.AddRemoveLabelsFlag(group)
   flags.AddNetworkPolicyFlags(group, hidden=False)
   flags.AddLoggingServiceFlag(group)
   flags.AddAutoprovisioningFlags(parser, group, hidden=False)
   flags.AddMaintenanceWindowFlag(group, add_unset_text=True)
   flags.AddPodSecurityPolicyFlag(group, hidden=True)
   flags.AddEnableBinAuthzFlag(group, hidden=True)
Beispiel #17
0
    def Args(parser):
        """Register flags for this command.

    Args:
      parser: An argparse.ArgumentParser-like object. It is mocked out in order
          to capture some information, but behaves like an ArgumentParser.
    """
        _AddCommonArgs(parser)
        group = parser.add_mutually_exclusive_group(required=True)
        _AddMutuallyExclusiveArgs(group)
        flags.AddClusterAutoscalingFlags(parser, group, hidden=True)
        flags.AddMasterAuthorizedNetworksFlags(parser, group, hidden=True)
        flags.AddEnableLegacyAuthorizationFlag(group, hidden=True)
        flags.AddStartIpRotationFlag(group, hidden=True)
        flags.AddCompleteIpRotationFlag(group, hidden=True)
        flags.AddUpdateLabelsFlag(group, suppressed=True)
        flags.AddRemoveLabelsFlag(group, suppressed=True)
        flags.AddNetworkPolicyFlags(group, hidden=True)
        flags.AddLoggingServiceFlag(group, hidden=True)
        flags.AddEnableAuditLoggingFlag(group, hidden=True)
        flags.AddMaintenanceWindowFlag(group, hidden=True, add_unset_text=True)
Beispiel #18
0
    def Args(parser):
        _Args(parser)
        group = parser.add_mutually_exclusive_group()
        _AddAdditionalZonesFlag(group, deprecated=True)
        flags.AddNodeLocationsFlag(group)

        flags.AddAcceleratorArgs(parser)
        flags.AddAddonsFlags(parser)
        flags.AddClusterAutoscalingFlags(parser)
        flags.AddEnableAutoRepairFlag(parser)
        flags.AddEnableBinAuthzFlag(parser, hidden=True)
        flags.AddEnableKubernetesAlphaFlag(parser)
        flags.AddEnableLegacyAuthorizationFlag(parser)
        flags.AddIPAliasFlags(parser)
        flags.AddIstioConfigFlag(parser)
        flags.AddLabelsFlag(parser)
        flags.AddLocalSSDAndLocalSSDVolumeConfigsFlag(parser)
        flags.AddMaintenanceWindowFlag(parser)
        flags.AddMasterAuthorizedNetworksFlags(parser)
        flags.AddMinCpuPlatformFlag(parser)
        flags.AddWorkloadMetadataFromNodeFlag(parser)
        flags.AddNetworkPolicyFlags(parser)
        flags.AddEnableSharedNetworkFlag(parser, hidden=True)
        flags.AddAutoprovisioningFlags(parser, hidden=False)
        flags.AddNodeTaintsFlag(parser)
        flags.AddPreemptibleFlag(parser)
        flags.AddPodSecurityPolicyFlag(parser)
        flags.AddAllowRouteOverlapFlag(parser)
        flags.AddPrivateClusterFlags(parser, hidden=False)
        flags.AddClusterNodeIdentityFlags(parser)
        flags.AddTpuFlags(parser, hidden=False)
        parser.add_argument(
            '--enable-stackdriver-kubernetes',
            action='store_true',
            default=False,
            hidden=True,
            help='Enable logging and monitoring beta experience. Cloud Logging '
            'and Cloud Monitoring are both required.')