Skip to content

Fix kubectl reference doc generation for release-1.11 #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions gen-kubectldocs/generators/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
manifest.json
8 changes: 4 additions & 4 deletions gen-kubectldocs/generators/read_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ limitations under the License.
package generators

import (
"io/ioutil"
"os"
// "io/ioutil"
// "os"
"sort"

"github.com/spf13/cobra"
"github.com/spf13/pflag"

"k8s.io/kubernetes/pkg/kubectl/cmd"
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
// cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
)

func GetSpec() KubectlSpec {
// Initialize a kubectl command that we can use to get the help documentation
kubectl := cmd.NewKubectlCommand(cmdutil.NewFactory(nil), os.Stdin, ioutil.Discard, ioutil.Discard)
kubectl := cmd.NewDefaultKubectlCommand()

// Create the structural representation
return NewKubectlSpec(kubectl)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# <strong>APP MANAGEMENT</strong>

This section contains commands for creating, updating, deleting, and
viewing your workloads in a Kubernetes cluster.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# <strong>GETTING STARTED</strong>

This section contains the most basic commands for getting a workload
running on your cluster.

- `run` will start running 1 or more instances of a container image on your cluster.
- `expose` will load balance traffic across the running instances, and can create a HA proxy for accessing the containers from outside the cluster.

Once your workloads are running, you can use the commands in the
[WORKING WITH APPS](#-strong-working-with-apps-strong-) section to
inspect them.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# <strong>WORKING WITH APPS</strong>

This section contains commands for inspecting and debugging your
applications.

- `logs` will print the logs from the specified pod + container.
- `exec` can be used to get an interactive shell on a pod + container.
- `describe` will print debug information about the given resource.
59 changes: 59 additions & 0 deletions gen-kubectldocs/generators/v1_11/toc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
categories:
- name: GETTING STARTED
include: _getting_started.md
commands:
- create
- get
- run
- expose
- delete
- name: APP MANAGEMENT
include: _app_management.md
commands:
- apply
- annotate
- autoscale
- convert
- edit
- label
- patch
- replace
- rollout
- scale
- set
- wait
- name: WORKING WITH APPS
include: _working_with_apps.md
commands:
- attach
- auth
- cp
- describe
- exec
- logs
- port-forward
- proxy
- top
- name: CLUSTER MANAGEMENT
commands:
- api-versions
- certificate
- cluster-info
- cordon
- drain
- taint
- uncordon
- name: KUBECTL SETTINGS AND USAGE
commands:
- alpha
- api-resources
- completion
- config
- explain
- options
- plugin
- version
- name: DEPRECATED COMMANDS
commands:
- rolling-update
- run-container