
    J                     J   S r SSKJr  SSKJr  SSKJr  SSKJr  S rS rS r	S	 r
S
 rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS r S  r!S! r"S" r#S# r$S4S$ jr%S% r&S& r'S' r(S( r)S) r*S* r+S+ r,S, r-S- r.S. r/S/ r0S0 r1S1 r2S2 r3g3)5z5Flags and helpers for the container related commands.    )absolute_import)division)unicode_literals)arg_parsersc                 $    U R                  SSS9  g )Nz--auth-provider-cmd-pathzV
      Path to the gcloud executable for the auth provider field in kubeconfig.
      helpadd_argumentparsers    <lib/googlecloudsdk/command_lib/edge_cloud/container/flags.pyAddAuthProviderCmdPathr      s     
      c                 $    U R                  SSS9  g )Nz--admin-usersz
      Username (Google email address) of the user who should be granted
      cluster-admin initially. This currently supports exactly one admin. If
      not set, the account issuing the creation request will be used by
      default.
      r   r
   r   s    r   AddAdminUsersr   !   s    
  r   c                 &    U R                  SSSS9  g )Nz--cluster-ipv4-cidrz10.0.0.0/17z
      All pods in the cluster are assigned an RFC1918 IPv4 address from this
      block. This field cannot be changed after creation.
      defaultr	   r
   r   s    r   AddClusterIPV4CIDRr   -   s     
  r   c                 &    U R                  SSSS9  g )Nz--services-ipv4-cidrz10.96.0.0/12z
      All services in the cluster are assigned an RFC1918 IPv4 address from
      this block. This field cannot be changed after creation.
      r   r
   r   s    r   AddServicesIPV4CIDRr   8   s     
  r   c                 $    U R                  SSS9  g )Nz--default-max-pods-per-nodez,The default maximum number of pods per node.r   r
   r   s    r   AddDefaultMaxPodsPerNoder   C   s    #9  r   c                 $    U R                  SSS9  g )Nz--fleet-projectz?Name of the Fleet host project where the cluster is registered.r   r
   r   s    r   AddFleetProjectr   J   s    L  r   c                 N    U R                  SS[        R                  " 5       SS9  g )Nz--labels	KEY=VALUEa/  
      List of label KEY=VALUE pairs to add.

      Keys must start with a lowercase character and contain only hyphens
      (-), underscores (```_```), lowercase characters, and numbers. Values must
      contain only hyphens (-), underscores (```_```), lowercase characters, and
      numbers.
      )metavartyper	   r   r   ArgDictr   s    r   	AddLabelsr#   Q   s,     
	  r   c                 $    U R                  SSS9  g )Nz--maintenance-window-recurrencea  
      An RFC 5545 (https://tools.ietf.org/html/rfc5545#section-3.8.5.3)
        recurrence rule for how the cluster maintenance window recurs. They go
        on for the span of time between the start and the end time. E.g.
        FREQ=WEEKLY;BYDAY=SU.
      r   r
   r   s    r   AddMaintenanceWindowRecurrencer%   a   s    '
  r   c                 $    U R                  SSS9  g )Nz--maintenance-window-endz
      End time of the recurring cluster maintenance window in the RFC 3339
      (https://www.rfc-editor.org/rfc/rfc3339.txt) format. E.g.
      "2021-01-01T00:00:00Z" or "2021-01-01T00:00:00-05:00"
      r   r
   r   s    r   AddMaintenanceWindowEndr'   m   s     
  r   c                 $    U R                  SSS9  g )Nz--maintenance-window-startz
      Start time of the recurring cluster maintenance window in the RFC 3339
      (https://www.rfc-editor.org/rfc/rfc3339.txt) format. E.g.
      "2021-01-01T00:00:00Z" or "2021-01-01T00:00:00-05:00"
      r   r
   r   s    r   AddMaintenanceWindowStartr)   x   s    "
  r   c                 $    U R                  SSS9  g )Nz--cluster-ipv6-cidrz
      If specified, all pods in the cluster are assigned an RFC4193 IPv6 address
      from this block. This field cannot be changed after creation.
      r   r
   r   s    r   AddClusterIPV6CIDRr+      s    
  r   c                 $    U R                  SSS9  g )Nz--services-ipv6-cidrz
      If specified, all services in the cluster are assigned an RFC4193 IPv6
      address from this block. This field cannot be changed after creation.
      r   r
   r   s    r   AddServicesIPV6CIDRr-      s    
  r   c                 $    U R                  SSS9  g )Nz--control-plane-kms-keyaZ  
      Google Cloud KMS key that will be used to secure persistent disks of the
      control plane VMs of a remote control plane cluster. The Edge Container
      service account for this project must have
      `roles/cloudkms.cryptoKeyEncrypterDecrypter` on the key.

      If not provided, a Google-managed key will be used by default.
      r   r
   r   s    r   AddControlPlaneKMSKeyr/      s    
  
r   c                 L    U R                  S[        R                  " 5       SS9  g )Nz--system-addons-configa5  
      If specified as a YAML/JSON file, customized configuration in this file
      will be applied to the system add-ons.

      For example,

      {
        "systemAddonsConfig": {
          "ingress": {
            "disabled": true,
            "ipv4_vip": "10.0.0.1"
          }
        }
      }
      r    r	   r   r   YAMLFileContentsr   s    r   AddSystemAddonsConfigr4      s)    '')
  r   c                 N    U R                  S[        R                  " 5       SSS9  g )Nz --external-lb-ipv4-address-poolsEXTERNAL_LB_IPV4_ADDRESSa  
      IPv4 address pools that are used for data plane load balancing of
      local control plane clusters. Existing pools cannot be updated
      after cluster creation; only adding new pools is allowed.
      Each address pool must be specified as one of the following
      two types of values:
        1. A IPv4 address range, for example, "10.0.0.1-10.0.0.10". A range that contains a single IP (e.g. "10.0.0.1-10.0.0.1") is allowed.
        2. A IPv4 CIDR block, for example, "10.0.0.1/24"
      Use comma when specifying multiple address pools, for example:
        --external-lb-ipv4-address-pools 10.0.0.1-10.0.0.10,10.0.0.1/24
      r    r   r	   r   r   ArgListr   s    r   AddExternalLbIpv4AddressPoolsr:      ,    ( (

	  r   c                 N    U R                  S[        R                  " 5       SSS9  g )Nz --external-lb-ipv6-address-poolsEXTERNAL_LB_IPV6_ADDRESSa  
      IPv6 address pools that are used for data plane load balancing of
      local control plane clusters. Existing pools cannot be updated
      after cluster creation; only adding new pools is allowed.
      Each address pool must be specified as one of the following
      two types of values:
        1. A IPv6 address range, for example, "2001:db8::1-2001:db8::a". A range that contains a single IP (e.g. "2001:db8::1-2001:db8::1") is allowed.
        2. A IPv6 CIDR block, for example, "2001:db8::/120"
      Use comma when specifying multiple address pools, for example:
        --external-lb-ipv6-address-pools 2001:db8::1-2001:db8::a,2001:db8::/120
      r7   r8   r   s    r   AddExternalLbIpv6AddressPoolsr>      r;   r   c                 P    SnU R                  SU[        R                  " 5       S9  g)z*Adds external load balancer address pools.a5  
      Path to a YAML/JSON file containing external load balancer pool configuration.
      External load balancer pools are used for data plane load balancing of
      local control plane clusters, with custom config such as address pool
      name. Either --external-lb-ipv4-address-pools or --external-lb-address-pools
      should be specified.
      Existing pools cannot be updated after cluster creation; only adding new
      pools is allowed currently.

      For example,

      ```
      {
        "externalLoadBalancerAddressPools": [
          {
            "addressPool": "MyLoadBalancerPool",
            "ipv4Range": ["10.200.0.200-10.200.0.204","10.200.0.300/30"],
            "avoidBuggyIps": "false",
            "manualAssign": "true"
          }
        ]
      }
      ```

      *address_pool*::: Optional. A name that identifies an address pool. If a name is not specified, an auto-generated one will be used.

      *ipv4_range*::: Mandatory. One or more ipv4 address range, each must be specified as one
      of the following two types of values:

        1. A IPv4 address range, for example, "10.0.0.1-10.0.0.10". A range that contains a single IP (e.g. "10.0.0.1-10.0.0.1") is allowed.

        2. A IPv4 CIDR block, for example, "10.0.0.1/24"

      *ipv6_range*::: Optional. One or more ipv6 address range, each must be specified as one
      of the following two types of values:

        1. A IPv6 address range, for example, "2001:db8::1-2001:db8::a". A range that contains a single IP (e.g. "2001:db8::1-2001:db8::1") is allowed.

        2. A IPv6 CIDR block, for example, "2001:db8::/120"

      *avoid_buggy_ips*::: Optional. If true, the pool omits IP addresses
      ending in .0 and .255. Some network hardware drops traffic to these
      special addresses.
      Its default value is false.

      *manual_assign*::: Optional. If true, addresses in this pool are not
      automatically assigned to Kubernetes Services. If true, an IP address in
      this pool is used only when it is specified explicitly by a service.
      Its default value is false.
  z--external-lb-address-pools)r	   r    Nr2   )r   *external_lb_config_address_pools_help_texts     r   #AddExternalLoadBalancerAddressPoolsrA      s2    10,f 	#5'')  r   c                 $    U R                  SSS9  g )Nz--control-plane-node-locationz_
      Google Edge Cloud zone where the local control plane nodes
      will be created.
      r   r
   r   s    r   AddControlPlaneNodeLocationrC     s    %
  r   c                 $    U R                  SSS9  g )Nz--control-plane-node-countz
      The number of local control plane nodes in a cluster. Use one to create
      a single-node control plane or use three to create a high availability
      control plane.
      Any other numbers of nodes will not be accepted.
      r   r
   r   s    r   AddControlPlaneNodeCountrE   (  s    "
  r   c                 $    U R                  SSS9  g )Nz--control-plane-machine-filterz
      Only machines matching this filter will be allowed to host
      local control plane nodes.
      The filtering language accepts strings like "name=<name>",
      and is documented here: [AIP-160](https://google.aip.dev/160).
      r   r
   r   s    r   AddControlPlaneMachineFilterrG   4  s    &
  r   c                 $    U R                  SSS9  g )Nz(--control-plane-shared-deployment-policya  
      Policy configuration about how user application is deployed for
      local control plane cluster. It supports two values, ALLOWED and
      DISALLOWED. ALLOWED means that user application can be deployed on
      control plane nodes. DISALLOWED means that user application can not be
      deployed on control plane nodes. Instead, it can only be deployed on
      worker nodes. By default, this value is DISALLOWED. The input is case
      insensitive.
      r   r
   r   s    r   %AddControlPlaneSharedDeploymentPolicyrI   @  s    0
  r   c                 $    U R                  SSS9  g )Nz#--control-plane-node-storage-schemazA
      Name for the storage schema of control plane nodes.
      r   r
   r   s    r    AddControlPlaneNodeStorageSchemarK   O  s    +
  r   c                 6    U R                  SS[        SS/SS9  g )Nz.--control-plane-node-system-partition-size-gibTd   ,  a  
      Specifies the system partition size in GiB for the control plane nodes.
      This parameter is optional. Valid values are 100 and 300 to set the system
      partition size to 100GiB and 300GiB, respectively. If this parameter is
      not specified, the system partition is created using the default size
      specified in the system storage schema applicable to the control plane
      nodes.
      hiddenr    choicesr	   r   intr   s    r   &AddControlPlaneNodeSystemPartitionSizerT   X  s*    6Cj
  r   c                 $    U R                  SSS9  g )Nz--lro-timeoutz8
      Overwrite the default LRO maximum timeout.
      r   r
   r   s    r   AddLROMaximumTimeoutrV   i  s    
  r   c                 $    U R                  SSS9  g )N	--versionz;
      Target cluster version. For example: "1.5.0".
      r   r
   r   s    r   
AddVersionrY   r  s    
  r   c                 &    U R                  SSSS9  g )Nz--release-channelRELEASE_CHANNEL_UNSPECIFIEDa  
      Release channel a cluster is subscribed to. It supports two values,
      NONE and REGULAR. NONE is used to opt out of any release channel. Clusters
      subscribed to the REGULAR channel will be automatically upgraded to
      versions that are considered GA quality, and cannot be manually upgraded.
      Additionally, if the REGULAR channel is used, a specific target version
      cannot be set with the 'version' flag. If left unspecified, the release
      channel will default to REGULAR.
      r   r
   r   s    r   AddReleaseChannelr\   {  s     +
  r   c                 &    U R                  SSSS9  g )NrX   TzI
      Target cluster version to upgrade to. For example: "1.5.1".
      requiredr	   r
   r   s    r   AddUpgradeVersionr`     s     
  r   c                 &    U R                  SSSS9  g )Nz
--scheduleTz{
      Schedule to upgrade a cluster after the request is acknowledged by Google.
      Support values: IMMEDIATELY.
      r^   r
   r   s    r   AddUpgradeSchedulerb     s     
  r   c                 &    U R                  SSSS9  g )Nz--offline-credential
store_truezV
      Once specified, an offline credential will be generated for the cluster.
      actionr	   r
   r   s    r   AddOfflineCredentialrg     s     
  r   c                 &    U R                  SSSS9  g )Nz--use-google-managed-keyrd   zl
      Once specified, a Google-managed key will be used for the control plane
      disk encryption.
      re   r
   r   s    r   AddUseGoogleManagedKeyri     s      
  r   c                 &    U R                  SUSS9  g )Nz--node-countz7
      Default nodeCount used by this node pool.
      r^   r
   )r   r_   s     r   AddNodeCountrk     s     
  r   c                 &    U R                  SSSS9  g )Nz--node-locationTzS
      Google Edge Cloud zone where nodes in this node pool will be created.
      r^   r
   r   s    r   AddNodeLocationrm     s     
  r   c                 $    U R                  SSS9  g )Nz--machine-filterz
      Only machines matching this filter will be allowed to join the node
      pool. The filtering language accepts strings like "name=<name>", and is
      documented in more detail at https://google.aip.dev/160.
      r   r
   r   s    r   AddMachineFilterro     s    
  r   c                 $    U R                  SSS9  g )Nz--local-disk-kms-keya,  
      Google Cloud KMS key that will be used to secure local disks on nodes
      in this node pool. The Edge Container service account for this project
      must have `roles/cloudkms.cryptoKeyEncrypterDecrypter` on the key.

      If not provided, a Google-managed key will be used instead.
      r   r
   r   s    r   AddLocalDiskKMSKeyrq     s    
  	r   c                 N    U R                  SSS[        R                  " 5       S9  g )N--node-labelsz
      Comma-delimited list of key-value pairs that comprise labels for the
      individual nodes in the node pool. This flag sets the Kubernetes
      labels, unlike `--labels` which sets the cloud resource labels.
      r   r	   r   r    r!   r   s    r   AddNodeLabelsForCreateNodePoolru     s.    

    	r   c                 N    U R                  SSS[        R                  " 5       S9  g )Nrs   a  
      Comma-delimited list of key-value pairs that comprise labels for the
      individual nodes in the node pool. This flag updates the Kubernetes
      labels, unlike `--update-labels`, `--remove-labels`, and `--clear-labels`
      which update the cloud resource labels.
      r   rt   r!   r   s    r   AddNodeLabelsForUpdateNodePoolrw     s.    
    
r   c                 $    U R                  SSS9  g )Nz--node-storage-schemaz:
      Name for the storage schema of worker nodes.
      r   r
   r   s    r   AddNodeStorageSchemary     s    
  r   c                 6    U R                  SS[        SS/SS9  g )Nz --node-system-partition-size-gibTrM   rN   a  
      Specifies the system partition size in GiB for the worker nodes. This
      parameter is optional. Valid values are 100 and 300 to set the system
      partition size to 100GiB and 300GiB, respectively. If this parameter is
      not specified, the system partition is created using the default size
      specified in the system storage schema applicable to the worker nodes.
      rO   rR   r   s    r   AddNodeSystemPartitionSizer{     s*    (Cj
  r   c                 L    U R                  S[        R                  " 5       SS9  g )Nz--offline-reboot-ttla  
        Specifies the maximum duration a node can reboot offline (without
        connection to Google) and then rejoin its cluster to resume its
        designated workloads. This duration is relative to the machine's most
        recent connection to Google. The maximum allowed duration is 7 days.
        To disallow offline reboot, set the duration to "PT0S". The parameter
        should be an ISO 8601 duration string, for example, "P1DT1H2M3S".
      r1   )r   r   Durationr   s    r   AddOfflineRebootTtLr~     s)    !
  r   c                 $    U R                  SSS9  g )Nz--zone-storage-kms-keya  
      Google Cloud KMS key that will be used to encrypt and decrypt the root key
      for zone storage encryption. The zone storage KMS key is only
      applicable to the storage infra cluster. The Edge Container service
      account for this project must have
      `roles/cloudkms.cryptoKeyEncrypterDecrypter` on the key.

      If not provided, a Google-managed key will be used by default.
      r   r
   r   s    r   AddZoneStorageKMSKeyr   $  s    
  r   c                 (    U R                  SSSSS9  g )Nz--enable-robin-cnsrd   Ta6  
      If set, Robin CNS will be enabled on the cluster.

      WARNING:
      Enabling Robin CNS is irreversible. Once enabled, it cannot be disabled.
      Enabling Robin CNS will take over all unused local Persistent Volumes (PVs)
      in the cluster. Any data on these PVs will be permanently lost.
      rf   rP   r	   r
   r   s    r   AddEnableRobinCNSr   3  s#    
	  r   c                 $    U R                  SSS9  g )Nz!--container-default-runtime-classzm
      Name of the default runtime class for containers. It supports two values
      RUNC and GVISOR.
      r   r
   r   s    r   AddContainerDefaultRuntimeClassr   C  s    )
  r   c                 $    U R                  SSS9  g )Nz--enable-cluster-isolationzU
      If set, the cluster will be created in a secure cluster isolation mode.
      r   r
   r   s    r   AddEnableClusterIsolationr   M  s    "
  r   c                 &    U R                  SSSS9  g )Nz$--enable-google-group-authenticationrd   zX
      If set, the cluster will be configured to use Google Group authentication.
      re   r
   r   s    r   "AddEnableGoogleGroupAuthenticationr   V  s     ,
  r   c                 (    U R                  SSSSS9  g )Nz--enable-remote-backuprd   TzT
      If set, the cluster will be created with remote backup featureenabled.
      r   r
   r   s    r   AddEnableRemoteBackupr   `  s#    
	  r   N)T)4__doc__
__future__r   r   r   googlecloudsdk.callioper   r   r   r   r   r   r   r#   r%   r'   r)   r+   r-   r/   r4   r:   r>   rA   rC   rE   rG   rI   rK   rT   rV   rY   r\   r`   rb   rg   ri   rk   rm   ro   rq   ru   rw   ry   r{   r~   r   r   r   r   r   r    r   r   <module>r      s    < &  ' /	 	,&&:z		" 

  r   