Skip to content

Commit

Permalink
remove auth-path from kubeconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
deads2k committed May 11, 2015
1 parent 6498fc1 commit 19784db
Show file tree
Hide file tree
Showing 43 changed files with 8 additions and 335 deletions.
3 changes: 0 additions & 3 deletions contrib/completions/bash/kubectl
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,6 @@ _kubectl_config_set-credentials()
flags_with_completion=()
flags_completion=()

flags+=("--auth-path=")
flags+=("--client-certificate=")
flags+=("--client-key=")
flags+=("--embed-certs")
Expand Down Expand Up @@ -916,8 +915,6 @@ _kubectl()

flags+=("--alsologtostderr")
flags+=("--api-version=")
flags+=("--auth-path=")
two_word_flags+=("-a")
flags+=("--certificate-authority=")
flags+=("--client-certificate=")
flags+=("--client-key=")
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl-api-versions.1
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ Print available API versions.
\fB\-\-api\-version\fP=""
The API version to use when talking to the server

.PP
\fB\-a\fP, \fB\-\-auth\-path\fP=""
Path to the auth info file. If missing, prompt the user. Only used if using https.

.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority.
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl-cluster-info.1
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ Display addresses of the master and services with label kubernetes.io/cluster\-s
\fB\-\-api\-version\fP=""
The API version to use when talking to the server

.PP
\fB\-a\fP, \fB\-\-auth\-path\fP=""
Path to the auth info file. If missing, prompt the user. Only used if using https.

.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority.
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl-config-set-cluster.1
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ Specifying a name that already exists will merge new fields on top of existing v
\fB\-\-alsologtostderr\fP=false
log to standard error as well as files

.PP
\fB\-a\fP, \fB\-\-auth\-path\fP=""
Path to the auth info file. If missing, prompt the user. Only used if using https.

.PP
\fB\-\-client\-certificate\fP=""
Path to a client key file for TLS.
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl-config-set-context.1
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ Specifying a name that already exists will merge new fields on top of existing v
\fB\-\-api\-version\fP=""
The API version to use when talking to the server

.PP
\fB\-a\fP, \fB\-\-auth\-path\fP=""
Path to the auth info file. If missing, prompt the user. Only used if using https.

.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority.
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl-config-set-credentials.1
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ Bearer token and basic auth are mutually exclusive.


.SH OPTIONS
.PP
\fB\-\-auth\-path\fP=""
auth\-path for the user entry in kubeconfig

.PP
\fB\-\-client\-certificate\fP=""
path to client\-certificate for the user entry in kubeconfig
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl-config-set.1
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ PROPERTY\_VALUE is the new value you wish to set.
\fB\-\-api\-version\fP=""
The API version to use when talking to the server

.PP
\fB\-a\fP, \fB\-\-auth\-path\fP=""
Path to the auth info file. If missing, prompt the user. Only used if using https.

.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority.
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl-config-unset.1
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ PROPERTY\_NAME is a dot delimited name where each token represents either a attr
\fB\-\-api\-version\fP=""
The API version to use when talking to the server

.PP
\fB\-a\fP, \fB\-\-auth\-path\fP=""
Path to the auth info file. If missing, prompt the user. Only used if using https.

.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority.
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl-config-use-context.1
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ Sets the current\-context in a kubeconfig file
\fB\-\-api\-version\fP=""
The API version to use when talking to the server

.PP
\fB\-a\fP, \fB\-\-auth\-path\fP=""
Path to the auth info file. If missing, prompt the user. Only used if using https.

.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority.
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl-config-view.1
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ You can use \-\-output=template \-\-template=TEMPLATE to extract specific values
\fB\-\-api\-version\fP=""
The API version to use when talking to the server

.PP
\fB\-a\fP, \fB\-\-auth\-path\fP=""
Path to the auth info file. If missing, prompt the user. Only used if using https.

.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority.
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl-config.1
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ The loading order follows these rules:
\fB\-\-api\-version\fP=""
The API version to use when talking to the server

.PP
\fB\-a\fP, \fB\-\-auth\-path\fP=""
Path to the auth info file. If missing, prompt the user. Only used if using https.

.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority.
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl-create.1
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ JSON and YAML formats are accepted.
\fB\-\-api\-version\fP=""
The API version to use when talking to the server

.PP
\fB\-a\fP, \fB\-\-auth\-path\fP=""
Path to the auth info file. If missing, prompt the user. Only used if using https.

.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority.
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl-delete.1
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ will be lost along with the rest of the resource.
\fB\-\-api\-version\fP=""
The API version to use when talking to the server

.PP
\fB\-a\fP, \fB\-\-auth\-path\fP=""
Path to the auth info file. If missing, prompt the user. Only used if using https.

.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority.
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl-describe.1
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ given resource.
\fB\-\-api\-version\fP=""
The API version to use when talking to the server

.PP
\fB\-a\fP, \fB\-\-auth\-path\fP=""
Path to the auth info file. If missing, prompt the user. Only used if using https.

.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority.
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl-exec.1
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ Execute a command in a container.
\fB\-\-api\-version\fP=""
The API version to use when talking to the server

.PP
\fB\-a\fP, \fB\-\-auth\-path\fP=""
Path to the auth info file. If missing, prompt the user. Only used if using https.

.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority.
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl-expose.1
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ selector for a new Service on the specified port.
\fB\-\-api\-version\fP=""
The API version to use when talking to the server

.PP
\fB\-a\fP, \fB\-\-auth\-path\fP=""
Path to the auth info file. If missing, prompt the user. Only used if using https.

.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority.
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl-get.1
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ of the \-\-template flag, you can filter the attributes of the fetched resource(
\fB\-\-api\-version\fP=""
The API version to use when talking to the server

.PP
\fB\-a\fP, \fB\-\-auth\-path\fP=""
Path to the auth info file. If missing, prompt the user. Only used if using https.

.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority.
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl-label.1
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ If \-\-resource\-version is specified, then updates will use this resource versi
\fB\-\-api\-version\fP=""
The API version to use when talking to the server

.PP
\fB\-a\fP, \fB\-\-auth\-path\fP=""
Path to the auth info file. If missing, prompt the user. Only used if using https.

.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority.
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl-log.1
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ Print the logs for a container in a pod. If the pod has only one container, the
\fB\-\-api\-version\fP=""
The API version to use when talking to the server

.PP
\fB\-a\fP, \fB\-\-auth\-path\fP=""
Path to the auth info file. If missing, prompt the user. Only used if using https.

.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority.
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl-namespace.1
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ namespace has been superceded by the context.namespace field of .kubeconfig file
\fB\-\-api\-version\fP=""
The API version to use when talking to the server

.PP
\fB\-a\fP, \fB\-\-auth\-path\fP=""
Path to the auth info file. If missing, prompt the user. Only used if using https.

.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority.
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl-port-forward.1
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ Forward one or more local ports to a pod.
\fB\-\-api\-version\fP=""
The API version to use when talking to the server

.PP
\fB\-a\fP, \fB\-\-auth\-path\fP=""
Path to the auth info file. If missing, prompt the user. Only used if using https.

.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority.
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl-proxy.1
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ Run a proxy to the Kubernetes API server.
\fB\-\-api\-version\fP=""
The API version to use when talking to the server

.PP
\fB\-a\fP, \fB\-\-auth\-path\fP=""
Path to the auth info file. If missing, prompt the user. Only used if using https.

.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority.
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl-resize.1
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ resize is sent to the server.
\fB\-\-api\-version\fP=""
The API version to use when talking to the server

.PP
\fB\-a\fP, \fB\-\-auth\-path\fP=""
Path to the auth info file. If missing, prompt the user. Only used if using https.

.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority.
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl-rolling-update.1
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@ existing controller and overwrite at least one (common) label in its replicaSele
\fB\-\-api\-version\fP=""
The API version to use when talking to the server

.PP
\fB\-a\fP, \fB\-\-auth\-path\fP=""
Path to the auth info file. If missing, prompt the user. Only used if using https.

.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority.
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl-run-container.1
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ Creates a replication controller to manage the created container(s).
\fB\-\-api\-version\fP=""
The API version to use when talking to the server

.PP
\fB\-a\fP, \fB\-\-auth\-path\fP=""
Path to the auth info file. If missing, prompt the user. Only used if using https.

.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority.
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl-stop.1
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ If the resource is resizable it will be resized to 0 before deletion.
\fB\-\-api\-version\fP=""
The API version to use when talking to the server

.PP
\fB\-a\fP, \fB\-\-auth\-path\fP=""
Path to the auth info file. If missing, prompt the user. Only used if using https.

.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority.
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl-update.1
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ JSON and YAML formats are accepted.
\fB\-\-api\-version\fP=""
The API version to use when talking to the server

.PP
\fB\-a\fP, \fB\-\-auth\-path\fP=""
Path to the auth info file. If missing, prompt the user. Only used if using https.

.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority.
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl-version.1
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ Print the client and server version information.
\fB\-\-api\-version\fP=""
The API version to use when talking to the server

.PP
\fB\-a\fP, \fB\-\-auth\-path\fP=""
Path to the auth info file. If missing, prompt the user. Only used if using https.

.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority.
Expand Down
4 changes: 0 additions & 4 deletions docs/man/man1/kubectl.1
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ Find more information at
\fB\-\-api\-version\fP=""
The API version to use when talking to the server

.PP
\fB\-a\fP, \fB\-\-auth\-path\fP=""
Path to the auth info file. If missing, prompt the user. Only used if using https.

.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority.
Expand Down
4 changes: 0 additions & 4 deletions pkg/client/clientcmd/api/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,12 @@ func ShortenConfig(config *Config) {
}

// Flatten changes the config object into a self contained config (useful for making secrets)
// AuthPath is not handled.
func FlattenConfig(config *Config) error {
for key, authInfo := range config.AuthInfos {
baseDir, err := MakeAbs(path.Dir(authInfo.LocationOfOrigin), "")
if err != nil {
return err
}
if len(authInfo.AuthPath) != 0 {
return fmt.Errorf("auth path of %v is not empty: %v", key, authInfo.AuthPath)
}

if err := FlattenContent(&authInfo.ClientCertificate, &authInfo.ClientCertificateData, baseDir); err != nil {
return err
Expand Down
2 changes: 0 additions & 2 deletions pkg/client/clientcmd/api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ type Cluster struct {
type AuthInfo struct {
// LocationOfOrigin indicates where this object came from. It is used for round tripping config post-merge, but never serialized.
LocationOfOrigin string
// AuthPath is the path to a kubernetes auth file (~/.kubernetes_auth). If you provide an AuthPath, the other options specified are ignored
AuthPath string `json:"auth-path,omitempty"`
// ClientCertificate is the path to a client cert file for TLS.
ClientCertificate string `json:"client-certificate,omitempty"`
// ClientCertificateData contains PEM-encoded data from a client cert file for TLS. Overrides ClientCertificate
Expand Down
6 changes: 0 additions & 6 deletions pkg/client/clientcmd/api/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ func ExampleOfOptionsConfig() {
APIVersion: "v1beta1",
InsecureSkipTLSVerify: false,
}
defaultConfig.AuthInfos["black-mage-via-file"] = AuthInfo{
AuthPath: "path/to/my/.kubernetes_auth",
}
defaultConfig.AuthInfos["white-mage-via-cert"] = AuthInfo{
ClientCertificate: "path/to/my/client-cert-filename",
ClientKey: "path/to/my/client-key-filename",
Expand Down Expand Up @@ -116,9 +113,6 @@ func ExampleOfOptionsConfig() {
// preferences:
// colors: true
// users:
// black-mage-via-file:
// LocationOfOrigin: ""
// auth-path: path/to/my/.kubernetes_auth
// red-mage-via-token:
// LocationOfOrigin: ""
// token: my-secret-token
Expand Down
2 changes: 0 additions & 2 deletions pkg/client/clientcmd/api/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ type Cluster struct {

// AuthInfo contains information that describes identity information. This is use to tell the kubernetes cluster who you are.
type AuthInfo struct {
// AuthPath is the path to a kubernetes auth file (~/.kubernetes_auth). If you provide an AuthPath, the other options specified are ignored
AuthPath string `json:"auth-path,omitempty"`
// ClientCertificate is the path to a client cert file for TLS.
ClientCertificate string `json:"client-certificate,omitempty"`
// ClientCertificateData contains PEM-encoded data from a client cert file for TLS. Overrides ClientCertificate
Expand Down
Loading

0 comments on commit 19784db

Please sign in to comment.