mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-19 01:47:43 +08:00

Tested with `kind` and GKE. Note: "nodes" shown in `docker buildx ls` are unrelated to Kubernetes "nodes". Probably buildx should come up with an alternative term. Usage: $ kind create cluster $ export KUBECONFIG="$(kind get kubeconfig-path --name="kind")" $ docker buildx create --driver kubernetes --driver-opt replicas=3 --use $ docker buildx build -t foo --load . `--load` loads the image into the local Docker. Driver opts: - `image=IMAGE` - Sets the container image to be used for running buildkit. - `namespace=NS` - Sets the Kubernetes namespace. Defaults to the current namespace. - `replicas=N` - Sets the number of `Pod` replicas. Defaults to 1. - `rootless=(true|false)` - Run the container as a non-root user without `securityContext.privileged`. Defaults to false. - `loadbalance=(sticky|random)` - Load-balancing strategy. If set to "sticky", the pod is chosen using the hash of the context path. Defaults to "sticky" Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
43 lines
1.9 KiB
Go
43 lines
1.9 KiB
Go
// Copyright 2018 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// +build go1.9
|
|
|
|
// Package google provides support for making OAuth2 authorized and authenticated
|
|
// HTTP requests to Google APIs. It supports the Web server flow, client-side
|
|
// credentials, service accounts, Google Compute Engine service accounts, and Google
|
|
// App Engine service accounts.
|
|
//
|
|
// A brief overview of the package follows. For more information, please read
|
|
// https://developers.google.com/accounts/docs/OAuth2
|
|
// and
|
|
// https://developers.google.com/accounts/docs/application-default-credentials.
|
|
//
|
|
// OAuth2 Configs
|
|
//
|
|
// Two functions in this package return golang.org/x/oauth2.Config values from Google credential
|
|
// data. Google supports two JSON formats for OAuth2 credentials: one is handled by ConfigFromJSON,
|
|
// the other by JWTConfigFromJSON. The returned Config can be used to obtain a TokenSource or
|
|
// create an http.Client.
|
|
//
|
|
//
|
|
// Credentials
|
|
//
|
|
// The Credentials type represents Google credentials, including Application Default
|
|
// Credentials.
|
|
//
|
|
// Use FindDefaultCredentials to obtain Application Default Credentials.
|
|
// FindDefaultCredentials looks in some well-known places for a credentials file, and
|
|
// will call AppEngineTokenSource or ComputeTokenSource as needed.
|
|
//
|
|
// DefaultClient and DefaultTokenSource are convenience methods. They first call FindDefaultCredentials,
|
|
// then use the credentials to construct an http.Client or an oauth2.TokenSource.
|
|
//
|
|
// Use CredentialsFromJSON to obtain credentials from either of the two JSON formats
|
|
// described in OAuth2 Configs, above. The TokenSource in the returned value is the
|
|
// same as the one obtained from the oauth2.Config returned from ConfigFromJSON or
|
|
// JWTConfigFromJSON, but the Credentials may contain additional information
|
|
// that is useful is some circumstances.
|
|
package google // import "golang.org/x/oauth2/google"
|