Exemplo n.º 1
0
 def Args(cls, parser):
     parser.add_argument(
         'CLUSTER_NAME',
         type=str,
         help='The name of the cluster being registered.',
     )
     hub_util.AddCommonArgs(parser)
     parser.add_argument(
         '--manifest-output-file',
         type=str,
         help=textwrap.dedent("""\
         The full path of the file into which the Connect agent installation
         manifest should be stored. If this option is provided, then the
         manifest will be written to this file and will not be deployed into
         the cluster by gcloud, and it will need to be deployed manually.
       """),
     )
     parser.add_argument(
         SERVICE_ACCOUNT_KEY_FILE_FLAG,
         required=True,
         type=str,
         help='The JSON file of a Google Cloud service account private key.',
     )
     parser.add_argument(
         '--proxy',
         type=str,
         help=textwrap.dedent("""\
         The proxy address in the format of http[s]://{hostname}.
         The proxy must support the HTTP CONNECT method in order for this
         connection to succeed.
       """),
     )
     parser.add_argument(
         '--version',
         type=str,
         help=textwrap.dedent("""\
     The version of the connect agent to install/upgrade if not using the
     latest connect version.
       """),
     )
     parser.add_argument(
         DOCKER_CREDENTIAL_FILE_FLAG,
         type=str,
         hidden=True,
         help=textwrap.dedent("""\
         The credentials to be used if a private registry is provided and
         auth is required. The contents of the file will be stored into a
         Secret and referenced from the imagePullSecrets of the Connect
         agent workload.
       """),
     )
     parser.add_argument(
         '--docker-registry',
         type=str,
         hidden=True,
         help=textwrap.dedent("""\
         The registry to pull GKE Connect agent image if not using
         gcr.io/gkeconnect.
       """),
     )
Exemplo n.º 2
0
 def Args(cls, parser):
     hub_util.AddCommonArgs(parser)
     parser.add_argument(
         '--gke-uri',
         type=str,
         help=textwrap.dedent("""\
         The URI of the GKE cluster that needs to be registered; for example,
         'https://container.googleapis.com/projects/my-project/locations/us-central1-a/clusters/my-cluster'
         The URI can obtain by calling:
             gcloud container clusters list --uri
         This is only valid if the represented cluster is a GKE cluster. The
         provided URI will be validated to confirm that it maps to the valid
         GKE cluster.
       """),
     )
     parser.add_argument(
         '--gke-cluster',
         type=str,
         help=textwrap.dedent("""\
         The location/name of the GKE cluster that needs to be registered.
         The location can be a zone or a region for e.g `us-central1-a/my-cluster`.
      """),
     )
Exemplo n.º 3
0
 def Args(cls, parser):
     hub_util.AddCommonArgs(parser)
Exemplo n.º 4
0
    def Args(cls, parser):
        parser.add_argument(
            'CLUSTER_NAME',
            type=str,
            help=textwrap.dedent("""\
            The name of the cluster being registered. This name is used to
            represent the cluster membership name in Hub.
         """),
        )
        hub_util.AddCommonArgs(parser)
        parser.add_argument(
            SERVICE_ACCOUNT_KEY_FILE_FLAG,
            type=str,
            help=textwrap.dedent("""\
            The JSON file of a Google Cloud service account private key. Defaults
            to using ``creds-gcp'' named secret json keyfile in gke-connect
            namespace. To create or update the ``creds-gcp'' secret keyfile in
            gke-connect namespace with your service account key file, run the
            following commad:

            kubectl delete secret creds-gcp -n gke-connect
            kubectl create secret generic creds-gcp -n gke-connect --from-file=creds-gcp.json=/path/to/file
         """),
        )
        parser.add_argument(
            '--gke-uri',
            type=str,
            help=textwrap.dedent("""\
            The URI of the GKE cluster that needs to be registered; for example,
            'https://container.googleapis.com/projects/my-project/locations/us-central1-a/clusters/my-cluster'
            The URI can obtain by calling:
                gcloud container clusters list --uri
            This is only valid if the represented cluster is a GKE cluster. The
            provided URI will be validated to confirm that it maps to the valid
            GKE cluster.
          """),
        )
        parser.add_argument(
            '--gke-cluster',
            type=str,
            help=textwrap.dedent("""\
            The location/name of the GKE cluster that needs to be registered.
            The location can be a zone or a region for e.g `us-central1-a/my-cluster`.
         """),
        )
        parser.add_argument(
            '--manifest-output-file',
            type=str,
            help=textwrap.dedent("""\
            The full path of the file into which the Connect agent installation
            manifest should be stored. If this option is provided, then the
            manifest will be written to this file and will not be deployed into
            the cluster by gcloud, and it will need to be deployed manually.
          """),
        )
        parser.add_argument(
            '--proxy',
            type=str,
            help=textwrap.dedent("""\
            The proxy address in the format of http[s]://{hostname}. The proxy
            must support the HTTP CONNECT method in order for this connection to
            succeed.
          """),
        )
        parser.add_argument(
            '--version',
            type=str,
            help=textwrap.dedent("""\
          The version of the connect agent to install/upgrade if not using the
          latest connect version.
          """),
        )
        parser.add_argument(
            DOCKER_CREDENTIAL_FILE_FLAG,
            type=str,
            hidden=True,
            help=textwrap.dedent("""\
          The credentials to be used if a private registry is provided and auth
          is required. The contents of the file will be stored into a Secret and
          referenced from the imagePullSecrets of the Connect agent workload.
          """),
        )
        parser.add_argument(
            '--docker-registry',
            type=str,
            hidden=True,
            help=textwrap.dedent("""\
            The registry to pull GKE Connect agent image if not using
            gcr.io/gkeconnect.
          """),
        )