mirror of https://github.com/k3s-io/k3s
commit
662a4291f3
|
@ -420,11 +420,18 @@ _kubectl_create_namespace()
|
||||||
|
|
||||||
flags+=("--dry-run")
|
flags+=("--dry-run")
|
||||||
flags+=("--generator=")
|
flags+=("--generator=")
|
||||||
|
flags+=("--no-headers")
|
||||||
flags+=("--output=")
|
flags+=("--output=")
|
||||||
two_word_flags+=("-o")
|
two_word_flags+=("-o")
|
||||||
flags+=("--output-version=")
|
flags+=("--output-version=")
|
||||||
flags+=("--save-config")
|
flags+=("--save-config")
|
||||||
flags+=("--schema-cache-dir=")
|
flags+=("--schema-cache-dir=")
|
||||||
|
flags+=("--show-all")
|
||||||
|
flags+=("-a")
|
||||||
|
flags+=("--show-labels")
|
||||||
|
flags+=("--sort-by=")
|
||||||
|
flags+=("--template=")
|
||||||
|
two_word_flags+=("-t")
|
||||||
flags+=("--validate")
|
flags+=("--validate")
|
||||||
flags+=("--alsologtostderr")
|
flags+=("--alsologtostderr")
|
||||||
flags+=("--api-version=")
|
flags+=("--api-version=")
|
||||||
|
@ -471,11 +478,18 @@ _kubectl_create_secret_docker-registry()
|
||||||
flags+=("--docker-username=")
|
flags+=("--docker-username=")
|
||||||
flags+=("--dry-run")
|
flags+=("--dry-run")
|
||||||
flags+=("--generator=")
|
flags+=("--generator=")
|
||||||
|
flags+=("--no-headers")
|
||||||
flags+=("--output=")
|
flags+=("--output=")
|
||||||
two_word_flags+=("-o")
|
two_word_flags+=("-o")
|
||||||
flags+=("--output-version=")
|
flags+=("--output-version=")
|
||||||
flags+=("--save-config")
|
flags+=("--save-config")
|
||||||
flags+=("--schema-cache-dir=")
|
flags+=("--schema-cache-dir=")
|
||||||
|
flags+=("--show-all")
|
||||||
|
flags+=("-a")
|
||||||
|
flags+=("--show-labels")
|
||||||
|
flags+=("--sort-by=")
|
||||||
|
flags+=("--template=")
|
||||||
|
two_word_flags+=("-t")
|
||||||
flags+=("--validate")
|
flags+=("--validate")
|
||||||
flags+=("--alsologtostderr")
|
flags+=("--alsologtostderr")
|
||||||
flags+=("--api-version=")
|
flags+=("--api-version=")
|
||||||
|
@ -523,11 +537,18 @@ _kubectl_create_secret_generic()
|
||||||
flags+=("--from-file=")
|
flags+=("--from-file=")
|
||||||
flags+=("--from-literal=")
|
flags+=("--from-literal=")
|
||||||
flags+=("--generator=")
|
flags+=("--generator=")
|
||||||
|
flags+=("--no-headers")
|
||||||
flags+=("--output=")
|
flags+=("--output=")
|
||||||
two_word_flags+=("-o")
|
two_word_flags+=("-o")
|
||||||
flags+=("--output-version=")
|
flags+=("--output-version=")
|
||||||
flags+=("--save-config")
|
flags+=("--save-config")
|
||||||
flags+=("--schema-cache-dir=")
|
flags+=("--schema-cache-dir=")
|
||||||
|
flags+=("--show-all")
|
||||||
|
flags+=("-a")
|
||||||
|
flags+=("--show-labels")
|
||||||
|
flags+=("--sort-by=")
|
||||||
|
flags+=("--template=")
|
||||||
|
two_word_flags+=("-t")
|
||||||
flags+=("--type=")
|
flags+=("--type=")
|
||||||
flags+=("--validate")
|
flags+=("--validate")
|
||||||
flags+=("--alsologtostderr")
|
flags+=("--alsologtostderr")
|
||||||
|
|
|
@ -25,6 +25,10 @@ Create a namespace with the specified name.
|
||||||
\fB\-\-generator\fP="namespace/v1"
|
\fB\-\-generator\fP="namespace/v1"
|
||||||
The name of the API generator to use.
|
The name of the API generator to use.
|
||||||
|
|
||||||
|
.PP
|
||||||
|
\fB\-\-no\-headers\fP=false
|
||||||
|
When using the default output, don't print headers.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
\fB\-o\fP, \fB\-\-output\fP=""
|
\fB\-o\fP, \fB\-\-output\fP=""
|
||||||
Output format. One of: json|yaml|wide|name|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See golang template [
|
Output format. One of: json|yaml|wide|name|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See golang template [
|
||||||
|
@ -43,6 +47,23 @@ Create a namespace with the specified name.
|
||||||
\fB\-\-schema\-cache\-dir\fP="\~/.kube/schema"
|
\fB\-\-schema\-cache\-dir\fP="\~/.kube/schema"
|
||||||
If non\-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
|
If non\-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
|
||||||
|
|
||||||
|
.PP
|
||||||
|
\fB\-a\fP, \fB\-\-show\-all\fP=false
|
||||||
|
When printing, show all resources (default hide terminated pods.)
|
||||||
|
|
||||||
|
.PP
|
||||||
|
\fB\-\-show\-labels\fP=false
|
||||||
|
When printing, show all labels as the last column (default hide labels column)
|
||||||
|
|
||||||
|
.PP
|
||||||
|
\fB\-\-sort\-by\fP=""
|
||||||
|
If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string.
|
||||||
|
|
||||||
|
.PP
|
||||||
|
\fB\-\-template\fP=""
|
||||||
|
Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [
|
||||||
|
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]].
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
\fB\-\-validate\fP=true
|
\fB\-\-validate\fP=true
|
||||||
If true, use a schema to validate the input before sending it
|
If true, use a schema to validate the input before sending it
|
||||||
|
|
|
@ -56,6 +56,10 @@ by creating a dockercfg secret and attaching it to your service account.
|
||||||
\fB\-\-generator\fP="secret\-for\-docker\-registry/v1"
|
\fB\-\-generator\fP="secret\-for\-docker\-registry/v1"
|
||||||
The name of the API generator to use.
|
The name of the API generator to use.
|
||||||
|
|
||||||
|
.PP
|
||||||
|
\fB\-\-no\-headers\fP=false
|
||||||
|
When using the default output, don't print headers.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
\fB\-o\fP, \fB\-\-output\fP=""
|
\fB\-o\fP, \fB\-\-output\fP=""
|
||||||
Output format. One of: json|yaml|wide|name|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See golang template [
|
Output format. One of: json|yaml|wide|name|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See golang template [
|
||||||
|
@ -74,6 +78,23 @@ by creating a dockercfg secret and attaching it to your service account.
|
||||||
\fB\-\-schema\-cache\-dir\fP="\~/.kube/schema"
|
\fB\-\-schema\-cache\-dir\fP="\~/.kube/schema"
|
||||||
If non\-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
|
If non\-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
|
||||||
|
|
||||||
|
.PP
|
||||||
|
\fB\-a\fP, \fB\-\-show\-all\fP=false
|
||||||
|
When printing, show all resources (default hide terminated pods.)
|
||||||
|
|
||||||
|
.PP
|
||||||
|
\fB\-\-show\-labels\fP=false
|
||||||
|
When printing, show all labels as the last column (default hide labels column)
|
||||||
|
|
||||||
|
.PP
|
||||||
|
\fB\-\-sort\-by\fP=""
|
||||||
|
If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string.
|
||||||
|
|
||||||
|
.PP
|
||||||
|
\fB\-\-template\fP=""
|
||||||
|
Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [
|
||||||
|
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]].
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
\fB\-\-validate\fP=true
|
\fB\-\-validate\fP=true
|
||||||
If true, use a schema to validate the input before sending it
|
If true, use a schema to validate the input before sending it
|
||||||
|
|
|
@ -45,6 +45,10 @@ symlinks, devices, pipes, etc).
|
||||||
\fB\-\-generator\fP="secret/v1"
|
\fB\-\-generator\fP="secret/v1"
|
||||||
The name of the API generator to use.
|
The name of the API generator to use.
|
||||||
|
|
||||||
|
.PP
|
||||||
|
\fB\-\-no\-headers\fP=false
|
||||||
|
When using the default output, don't print headers.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
\fB\-o\fP, \fB\-\-output\fP=""
|
\fB\-o\fP, \fB\-\-output\fP=""
|
||||||
Output format. One of: json|yaml|wide|name|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See golang template [
|
Output format. One of: json|yaml|wide|name|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See golang template [
|
||||||
|
@ -63,6 +67,23 @@ symlinks, devices, pipes, etc).
|
||||||
\fB\-\-schema\-cache\-dir\fP="\~/.kube/schema"
|
\fB\-\-schema\-cache\-dir\fP="\~/.kube/schema"
|
||||||
If non\-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
|
If non\-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
|
||||||
|
|
||||||
|
.PP
|
||||||
|
\fB\-a\fP, \fB\-\-show\-all\fP=false
|
||||||
|
When printing, show all resources (default hide terminated pods.)
|
||||||
|
|
||||||
|
.PP
|
||||||
|
\fB\-\-show\-labels\fP=false
|
||||||
|
When printing, show all labels as the last column (default hide labels column)
|
||||||
|
|
||||||
|
.PP
|
||||||
|
\fB\-\-sort\-by\fP=""
|
||||||
|
If non\-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string.
|
||||||
|
|
||||||
|
.PP
|
||||||
|
\fB\-\-template\fP=""
|
||||||
|
Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [
|
||||||
|
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]].
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
\fB\-\-type\fP=""
|
\fB\-\-type\fP=""
|
||||||
The type of secret to create
|
The type of secret to create
|
||||||
|
|
|
@ -53,10 +53,15 @@ kubectl create namespace NAME [--dry-run]
|
||||||
```
|
```
|
||||||
--dry-run[=false]: If true, only print the object that would be sent, without sending it.
|
--dry-run[=false]: If true, only print the object that would be sent, without sending it.
|
||||||
--generator="namespace/v1": The name of the API generator to use.
|
--generator="namespace/v1": The name of the API generator to use.
|
||||||
|
--no-headers[=false]: When using the default output, don't print headers.
|
||||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md].
|
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md].
|
||||||
--output-version="": Output the formatted object with the given version (default api-version).
|
--output-version="": Output the formatted object with the given version (default api-version).
|
||||||
--save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
|
--save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
|
||||||
--schema-cache-dir="~/.kube/schema": If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
|
--schema-cache-dir="~/.kube/schema": If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
|
||||||
|
-a, --show-all[=false]: When printing, show all resources (default hide terminated pods.)
|
||||||
|
--show-labels[=false]: When printing, show all labels as the last column (default hide labels column)
|
||||||
|
--sort-by="": If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string.
|
||||||
|
--template="": Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
|
||||||
--validate[=true]: If true, use a schema to validate the input before sending it
|
--validate[=true]: If true, use a schema to validate the input before sending it
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -92,7 +97,7 @@ kubectl create namespace NAME [--dry-run]
|
||||||
|
|
||||||
* [kubectl create](kubectl_create.md) - Create a resource by filename or stdin
|
* [kubectl create](kubectl_create.md) - Create a resource by filename or stdin
|
||||||
|
|
||||||
###### Auto generated by spf13/cobra on 14-Dec-2015
|
###### Auto generated by spf13/cobra on 10-Feb-2016
|
||||||
|
|
||||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||||
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_create_namespace.md?pixel)]()
|
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_create_namespace.md?pixel)]()
|
||||||
|
|
|
@ -68,10 +68,15 @@ kubectl create secret docker-registry NAME --docker-username=user --docker-passw
|
||||||
--docker-username="": Username for Docker registry authentication
|
--docker-username="": Username for Docker registry authentication
|
||||||
--dry-run[=false]: If true, only print the object that would be sent, without sending it.
|
--dry-run[=false]: If true, only print the object that would be sent, without sending it.
|
||||||
--generator="secret-for-docker-registry/v1": The name of the API generator to use.
|
--generator="secret-for-docker-registry/v1": The name of the API generator to use.
|
||||||
|
--no-headers[=false]: When using the default output, don't print headers.
|
||||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md].
|
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md].
|
||||||
--output-version="": Output the formatted object with the given version (default api-version).
|
--output-version="": Output the formatted object with the given version (default api-version).
|
||||||
--save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
|
--save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
|
||||||
--schema-cache-dir="~/.kube/schema": If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
|
--schema-cache-dir="~/.kube/schema": If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
|
||||||
|
-a, --show-all[=false]: When printing, show all resources (default hide terminated pods.)
|
||||||
|
--show-labels[=false]: When printing, show all labels as the last column (default hide labels column)
|
||||||
|
--sort-by="": If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string.
|
||||||
|
--template="": Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
|
||||||
--validate[=true]: If true, use a schema to validate the input before sending it
|
--validate[=true]: If true, use a schema to validate the input before sending it
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -107,7 +112,7 @@ kubectl create secret docker-registry NAME --docker-username=user --docker-passw
|
||||||
|
|
||||||
* [kubectl create secret](kubectl_create_secret.md) - Create a secret using specified subcommand.
|
* [kubectl create secret](kubectl_create_secret.md) - Create a secret using specified subcommand.
|
||||||
|
|
||||||
###### Auto generated by spf13/cobra on 14-Dec-2015
|
###### Auto generated by spf13/cobra on 10-Feb-2016
|
||||||
|
|
||||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||||
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_create_secret_docker-registry.md?pixel)]()
|
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_create_secret_docker-registry.md?pixel)]()
|
||||||
|
|
|
@ -71,10 +71,15 @@ kubectl create secret generic NAME [--type=string] [--from-file=[key=]source] [-
|
||||||
--from-file=[]: Key files can be specified using their file path, in which case a default name will be given to them, or optionally with a name and file path, in which case the given name will be used. Specifying a directory will iterate each named file in the directory that is a valid secret key.
|
--from-file=[]: Key files can be specified using their file path, in which case a default name will be given to them, or optionally with a name and file path, in which case the given name will be used. Specifying a directory will iterate each named file in the directory that is a valid secret key.
|
||||||
--from-literal=[]: Specify a key and literal value to insert in secret (i.e. mykey=somevalue)
|
--from-literal=[]: Specify a key and literal value to insert in secret (i.e. mykey=somevalue)
|
||||||
--generator="secret/v1": The name of the API generator to use.
|
--generator="secret/v1": The name of the API generator to use.
|
||||||
|
--no-headers[=false]: When using the default output, don't print headers.
|
||||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md].
|
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md].
|
||||||
--output-version="": Output the formatted object with the given version (default api-version).
|
--output-version="": Output the formatted object with the given version (default api-version).
|
||||||
--save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
|
--save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
|
||||||
--schema-cache-dir="~/.kube/schema": If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
|
--schema-cache-dir="~/.kube/schema": If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
|
||||||
|
-a, --show-all[=false]: When printing, show all resources (default hide terminated pods.)
|
||||||
|
--show-labels[=false]: When printing, show all labels as the last column (default hide labels column)
|
||||||
|
--sort-by="": If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string.
|
||||||
|
--template="": Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
|
||||||
--type="": The type of secret to create
|
--type="": The type of secret to create
|
||||||
--validate[=true]: If true, use a schema to validate the input before sending it
|
--validate[=true]: If true, use a schema to validate the input before sending it
|
||||||
```
|
```
|
||||||
|
@ -111,7 +116,7 @@ kubectl create secret generic NAME [--type=string] [--from-file=[key=]source] [-
|
||||||
|
|
||||||
* [kubectl create secret](kubectl_create_secret.md) - Create a secret using specified subcommand.
|
* [kubectl create secret](kubectl_create_secret.md) - Create a secret using specified subcommand.
|
||||||
|
|
||||||
###### Auto generated by spf13/cobra on 14-Dec-2015
|
###### Auto generated by spf13/cobra on 10-Feb-2016
|
||||||
|
|
||||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||||
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_create_secret_generic.md?pixel)]()
|
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_create_secret_generic.md?pixel)]()
|
||||||
|
|
|
@ -760,6 +760,14 @@ runTests() {
|
||||||
[[ "$(kubectl get secret/test-secret --namespace=test-secrets -o yaml "${kube_flags[@]}" | grep '.dockercfg:')" ]]
|
[[ "$(kubectl get secret/test-secret --namespace=test-secrets -o yaml "${kube_flags[@]}" | grep '.dockercfg:')" ]]
|
||||||
# Clean-up
|
# Clean-up
|
||||||
kubectl delete secret test-secret --namespace=test-secrets
|
kubectl delete secret test-secret --namespace=test-secrets
|
||||||
|
|
||||||
|
### Create a secret using output flags
|
||||||
|
# Pre-condition: no secret exists
|
||||||
|
kube::test::get_object_assert 'secrets --namespace=test-secrets' "{{range.items}}{{$id_field}}:{{end}}" ''
|
||||||
|
# Command
|
||||||
|
[[ "$(kubectl create secret generic test-secret --namespace=test-secrets --from-literal=key1=value1 --output=go-template --template=\"{{.metadata.name}}:\" | grep 'test-secret:')" ]]
|
||||||
|
## Clean-up
|
||||||
|
kubectl delete secret test-secret --namespace=test-secrets
|
||||||
# Clean up
|
# Clean up
|
||||||
kubectl delete namespace test-secrets
|
kubectl delete namespace test-secrets
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,7 @@ func NewCmdCreateNamespace(f *cmdutil.Factory, cmdOut io.Writer) *cobra.Command
|
||||||
}
|
}
|
||||||
cmdutil.AddApplyAnnotationFlags(cmd)
|
cmdutil.AddApplyAnnotationFlags(cmd)
|
||||||
cmdutil.AddValidateFlags(cmd)
|
cmdutil.AddValidateFlags(cmd)
|
||||||
|
cmdutil.AddPrinterFlags(cmd)
|
||||||
cmdutil.AddGeneratorFlags(cmd, cmdutil.NamespaceV1GeneratorName)
|
cmdutil.AddGeneratorFlags(cmd, cmdutil.NamespaceV1GeneratorName)
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,6 +79,7 @@ func NewCmdCreateSecretGeneric(f *cmdutil.Factory, cmdOut io.Writer) *cobra.Comm
|
||||||
}
|
}
|
||||||
cmdutil.AddApplyAnnotationFlags(cmd)
|
cmdutil.AddApplyAnnotationFlags(cmd)
|
||||||
cmdutil.AddValidateFlags(cmd)
|
cmdutil.AddValidateFlags(cmd)
|
||||||
|
cmdutil.AddPrinterFlags(cmd)
|
||||||
cmdutil.AddGeneratorFlags(cmd, cmdutil.SecretV1GeneratorName)
|
cmdutil.AddGeneratorFlags(cmd, cmdutil.SecretV1GeneratorName)
|
||||||
cmd.Flags().StringSlice("from-file", []string{}, "Key files can be specified using their file path, in which case a default name will be given to them, or optionally with a name and file path, in which case the given name will be used. Specifying a directory will iterate each named file in the directory that is a valid secret key.")
|
cmd.Flags().StringSlice("from-file", []string{}, "Key files can be specified using their file path, in which case a default name will be given to them, or optionally with a name and file path, in which case the given name will be used. Specifying a directory will iterate each named file in the directory that is a valid secret key.")
|
||||||
cmd.Flags().StringSlice("from-literal", []string{}, "Specify a key and literal value to insert in secret (i.e. mykey=somevalue)")
|
cmd.Flags().StringSlice("from-literal", []string{}, "Specify a key and literal value to insert in secret (i.e. mykey=somevalue)")
|
||||||
|
@ -145,6 +146,7 @@ func NewCmdCreateSecretDockerRegistry(f *cmdutil.Factory, cmdOut io.Writer) *cob
|
||||||
}
|
}
|
||||||
cmdutil.AddApplyAnnotationFlags(cmd)
|
cmdutil.AddApplyAnnotationFlags(cmd)
|
||||||
cmdutil.AddValidateFlags(cmd)
|
cmdutil.AddValidateFlags(cmd)
|
||||||
|
cmdutil.AddPrinterFlags(cmd)
|
||||||
cmdutil.AddGeneratorFlags(cmd, cmdutil.SecretForDockerRegistryV1GeneratorName)
|
cmdutil.AddGeneratorFlags(cmd, cmdutil.SecretForDockerRegistryV1GeneratorName)
|
||||||
cmd.Flags().String("docker-username", "", "Username for Docker registry authentication")
|
cmd.Flags().String("docker-username", "", "Username for Docker registry authentication")
|
||||||
cmd.MarkFlagRequired("docker-username")
|
cmd.MarkFlagRequired("docker-username")
|
||||||
|
|
|
@ -318,8 +318,6 @@ func AddApplyAnnotationFlags(cmd *cobra.Command) {
|
||||||
func AddGeneratorFlags(cmd *cobra.Command, defaultGenerator string) {
|
func AddGeneratorFlags(cmd *cobra.Command, defaultGenerator string) {
|
||||||
cmd.Flags().String("generator", defaultGenerator, "The name of the API generator to use.")
|
cmd.Flags().String("generator", defaultGenerator, "The name of the API generator to use.")
|
||||||
cmd.Flags().Bool("dry-run", false, "If true, only print the object that would be sent, without sending it.")
|
cmd.Flags().Bool("dry-run", false, "If true, only print the object that would be sent, without sending it.")
|
||||||
cmd.Flags().StringP("output", "o", "", "Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md].")
|
|
||||||
cmd.Flags().String("output-version", "", "Output the formatted object with the given version (default api-version).")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func ReadConfigDataFromReader(reader io.Reader, source string) ([]byte, error) {
|
func ReadConfigDataFromReader(reader io.Reader, source string) ([]byte, error) {
|
||||||
|
|
Loading…
Reference in New Issue