From 98f1d119a485c7ff9dbc9378bdddc53bc162c668 Mon Sep 17 00:00:00 2001 From: Jason Young Date: Fri, 28 Apr 2017 13:32:33 -0700 Subject: [PATCH] update istioctl docs auto-generation script (#79) * update istioctl docs auto-generation script * istioctl: fix example usage formatting --- _docs/reference/istioctl-autogen/index.md | 12 -- .../istioctl-autogen/istioctl_kube-inject.md | 62 -------- _docs/reference/istioctl.md | 139 ------------------ _docs/reference/istioctl/index.md | 9 ++ .../istioctl.md | 26 +++- .../istioctl_completion.md | 8 +- .../istioctl_create.md | 13 +- .../istioctl_delete.md | 18 ++- .../istioctl_get.md | 25 +++- .../istioctl/istioctl_kube-inject.md | 81 ++++++++++ .../istioctl_mixer.md | 26 +++- .../istioctl_mixer_rule.md | 12 +- .../istioctl_mixer_rule_create.md | 19 ++- .../istioctl_mixer_rule_get.md | 19 ++- .../istioctl_replace.md | 17 ++- .../istioctl_version.md | 8 +- scripts/auto-generate-istioctl.sh | 63 ++++---- 17 files changed, 245 insertions(+), 312 deletions(-) delete mode 100644 _docs/reference/istioctl-autogen/index.md delete mode 100644 _docs/reference/istioctl-autogen/istioctl_kube-inject.md delete mode 100644 _docs/reference/istioctl.md create mode 100644 _docs/reference/istioctl/index.md rename _docs/reference/{istioctl-autogen => istioctl}/istioctl.md (58%) rename _docs/reference/{istioctl-autogen => istioctl}/istioctl_completion.md (90%) rename _docs/reference/{istioctl-autogen => istioctl}/istioctl_create.md (85%) rename _docs/reference/{istioctl-autogen => istioctl}/istioctl_delete.md (77%) rename _docs/reference/{istioctl-autogen => istioctl}/istioctl_get.md (70%) create mode 100644 _docs/reference/istioctl/istioctl_kube-inject.md rename _docs/reference/{istioctl-autogen => istioctl}/istioctl_mixer.md (52%) rename _docs/reference/{istioctl-autogen => istioctl}/istioctl_mixer_rule.md (83%) rename _docs/reference/{istioctl-autogen => istioctl}/istioctl_mixer_rule_create.md (67%) rename _docs/reference/{istioctl-autogen => istioctl}/istioctl_mixer_rule_get.md (67%) rename _docs/reference/{istioctl-autogen => istioctl}/istioctl_replace.md (78%) rename _docs/reference/{istioctl-autogen => istioctl}/istioctl_version.md (88%) diff --git a/_docs/reference/istioctl-autogen/index.md b/_docs/reference/istioctl-autogen/index.md deleted file mode 100644 index 1ba8f3d269..0000000000 --- a/_docs/reference/istioctl-autogen/index.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: The Istioctl Command - Take 2 -overview: Explains the various features and options of the istioctl command. - -order: 11 - -bodyclass: docs -layout: docs -type: markdown ---- - -{% include section-index.html %} diff --git a/_docs/reference/istioctl-autogen/istioctl_kube-inject.md b/_docs/reference/istioctl-autogen/istioctl_kube-inject.md deleted file mode 100644 index 3ffff968f4..0000000000 --- a/_docs/reference/istioctl-autogen/istioctl_kube-inject.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: Inject istio sidecar proxy into kubernetes resources -overview: Inject istio sidecar proxy into kubernetes resources - -order: 60 - -bodyclass: docs -layout: docs -type: markdown ---- -## istioctl kube-inject - -Inject istio sidecar proxy into kubernetes resources - -### Synopsis - - - -Use kube-inject to manually inject istio sidecar proxy into kubernetes -resource files. Unsupported resources are left unmodified so it is -safe to run kube-inject over a single file that contains multiple -Service, ConfigMap, Deployment, etc. definitions for a complex -application. Its best to do this when the resource is initially -created. - -Example usage: - - kubectl apply -f <(istioctl kube-inject -f ) - - -``` -istioctl kube-inject -``` - -### Options - -``` - --coreDump Enable/Disable core dumps in injected proxy (--coreDump=true affects all pods in a node and should only be used the cluster admin) (default true) - -f, --filename string Input kubernetes resource filename - --hub string Docker hub - --includeIPRanges string Comma separated list of IP ranges in CIDR form. If set, only redirect outbound traffic to Envoy for IP ranges. Otherwise all outbound traffic is redirected - --meshConfig string ConfigMap name for Istio mesh configuration, key should be "mesh" (default "istio") - -o, --output string Modified output kubernetes resource filename - --setVersionString string Override version info injected into resource - --sidecarProxyUID int Sidecar proxy UID (default 1337) - --tag string Docker tag - --verbosity int Runtime verbosity (default 2) -``` - -### Options inherited from parent commands - -``` - -c, --kubeconfig string Use a Kubernetes configuration file instead of in-cluster configuration - --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) - -n, --namespace string Select a Kubernetes namespace (default "default") - -v, --v Level log level for V logs - --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging -``` - -### SEE ALSO -* [istioctl](istioctl.html) - Istio control interface - diff --git a/_docs/reference/istioctl.md b/_docs/reference/istioctl.md deleted file mode 100644 index b2cc38893c..0000000000 --- a/_docs/reference/istioctl.md +++ /dev/null @@ -1,139 +0,0 @@ ---- -title: The istioctl Command -overview: Describes the usage and options of the istioctl command-line tool. - -order: 10 - -bodyclass: docs -layout: docs -type: markdown ---- - -**istioctl** is a command line interface for managing an Istio service mesh. This overview covers -syntax, describes command operations, and provides examples. - -# Syntax - -*istioctl* commands follow the syntax: - -```shell -istioctl [targets] [flags] -``` - -where *command*, *targets* and *flags* are: - -* **command**: the operation to perform, such as `create`, `delete`, `replace`, or `get`. -* **targets**: targets for commands such as delete -* **flags**: Optional flags. For example specify `--file FILENAME` to specify a configuration file to create from. - -# Operations - -* **create**: Create policies and rules -* **delete**: Delete policies or rules -* **get**: Retrieve policy/policies or rules -* **replace**: Replace policies and rules -* **version**: Display CLI version information - -_Kubernetes specific_ -* **kube-inject**: Inject Envoy proxy into Kubernetes Pods - resources. This command has been added to aid in *istiofying* - services for Kubernetes and should eventually go away once a proper - Istio admission controller for Kubernetes is available. - -# Policy and Rule types - -* **route-rule** Describes a rule for routing network traffic. See [Route Rules](/docs/reference/routing-and-traffic-management.html#route-rules) for details on routing rules. -* **destination-policy** Describes a policy for traffic destinations. See [Destination Policies](/docs/reference/routing-and-traffic-management.html#destination-policies) for details on destination policies. - -# Examples of common operations - -`istioctl create [--file FILE]` - Create policies or rules from a file or stdin. - -```shell -# Create a rule using the definition in example-routing.yaml. -$ istioctl create -f example-routing.yaml -``` - -`istioctl delete [TYPE NAME_1 ... NAME_N] [--file FILE]` - Create policies or rules from a file or stdin. - -```shell -# Delete a rule using the definition in example-routing.yaml. -$ istioctl delete -f example-routing.yaml -``` - -```shell -# Delete the rule productpage-default -$ istioctl delete route-rule productpage-default -``` - -`istioctl get TYPE [NAME] [--output yaml|short]` - List policies or rules in YAML format - -```shell -# List route rules -istioctl get route-rules - -# List destination policies -istioctl get destination-policies - -# Get the rule productpage-default -istioctl get route-rule productpage-default -``` - -`istioctl replace [--file FILENAME]` - Replace existing policies or rules with another from a file or stdin. - -```shell -# Create a rule using the definition in example-routing.yaml. -$ istioctl replace -f example-routing.yaml -``` - -# kube-inject - -`istioctl kube-inject [--filename FILENAME] [--hub HUB] [--meshConfig CONFIGMAP_NAME] [--output FILENAME] [--setVersionString VERSION] [--sidecarProxyUID UID] [--tag TAG] [--verbosity VERBOSITY]` - add Istio components to description - -A short term workaround for the lack of a proper istio admision -controller is client-side injection. Use `istioctl kube-inject` to add the -necessary configurations to a Kubernetes resource files. - - istioctl kube-inject -f deployment.yaml -o deployment-with-istio.yaml - -Or update the resource on the fly before applying. - - kubectl create -f <(istioctl kube-inject -f depoyment.yaml) - -Or update an existing deployment. - - kubectl get deployment -o yaml | istioctl kube-inject -f - | kubectl apply -f - - -`istioctl kube-inject` will update -the [PodTemplateSpec](https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/#pod-templates) in -Kubernetes Job, DaemonSet, ReplicaSet, and Deployment YAML resource -documents. Support for additional pod-based resource types can be -added as necessary. - -Unsupported resources are left unmodified so, for example, it is safe -to run `istioctl kube-inject` over a single file that contains multiple -Service, ConfigMap, and Deployment definitions for a complex -application. - -The Istio project is continually evolving so the low-level proxy -configuration may change unannounced. When in doubt re-run `istioctl kube-inject` -on your original deployments. - -## kube-inject flags - -* `--coreDump` - Enable/Disable core dumps in injected proxy (--coreDump=true affects all pods in a node and should only be used the cluster admin) (default true) -* `--filename FILENAME` - Input kubernetes resource filename -* `--hub HUB` - Docker hub, for example docker.io/istio) -* `--meshConfig CONFIGMAP_NAME` - ConfigMap name for Istio mesh configuration, key should be "mesh" (default "istio") -* `--output FILENAME` - Modified output kubernetes resource filename -* `--setVersionString VERSION` - Override version info injected into resource -* `--sidecarProxyUID UID` - Sidecar proxy UID (default 1337) -* `--tag TAG` - Docker image file tag -* `--verbosity VERBOSITY` - Runtime verbosity (default 2) - -# General command line flags - -* `--kubeconfig FILENAME` - Use a Kubernetes configuration file instead of in-cluster configuration. (default _~/.kube/config_) -* `--namespace NAMESPACE` - Kubernetes namespace (default "default") -* `--v LEVEL` - log level for V logs -* `--vmodule MODULESPEC` - comma-separated list of pattern=N settings for file-filtered logging diff --git a/_docs/reference/istioctl/index.md b/_docs/reference/istioctl/index.md new file mode 100644 index 0000000000..f65905ede4 --- /dev/null +++ b/_docs/reference/istioctl/index.md @@ -0,0 +1,9 @@ +--- +title: The Istioctl Command +overview: Options showing how to use the istioctl command. +order: 0 +bodyclass: docs +layout: docs +type: markdown +--- +{% include section-index.html %} diff --git a/_docs/reference/istioctl-autogen/istioctl.md b/_docs/reference/istioctl/istioctl.md similarity index 58% rename from _docs/reference/istioctl-autogen/istioctl.md rename to _docs/reference/istioctl/istioctl.md index 4f405056aa..4144689f64 100644 --- a/_docs/reference/istioctl-autogen/istioctl.md +++ b/_docs/reference/istioctl/istioctl.md @@ -1,9 +1,7 @@ --- -title: Istioctl Control +title: istioctl overview: Istio control interface - -order: 200 - +order: 6 bodyclass: docs layout: docs type: markdown @@ -15,7 +13,18 @@ Istio control interface ### Synopsis -Istio configuration command line utility. Available configuration types: [destination-policy ingress-rule route-rule] + +Istio configuration command line utility. + +Create, list, modify, and delete configuration resources in the Istio system. + +Available routing and traffic management configuration types: [destination-policy ingress-rule route-rule]. See +https://istio.io/docs/reference/routing-and-traffic-management.html +for an overview of the routing and traffic DSL. + +More information on the mixer API configuration can be found under the +istioctl mixer command documentation. + ### Options @@ -31,8 +40,9 @@ Istio configuration command line utility. Available configuration types: [destin * [istioctl completion](istioctl_completion.html) - Generate bash completion for Istioctl * [istioctl create](istioctl_create.html) - Create policies and rules * [istioctl delete](istioctl_delete.html) - Delete policies or rules -* [istioctl get](istioctl_get.html) - Retrieve a policy or rule -* [istioctl kube-inject](istioctl_kube-inject.html) - Inject istio sidecar proxy into kubernetes resources +* [istioctl get](istioctl_get.html) - Retrieve policies and rules +* [istioctl kube-inject](istioctl_kube-inject.html) - Inject Envoy sidecar into Kubernetes pod resources * [istioctl mixer](istioctl_mixer.html) - Istio Mixer configuration -* [istioctl replace](istioctl_replace.html) - Replace policies and rules +* [istioctl replace](istioctl_replace.html) - Replace existing policies and rules * [istioctl version](istioctl_version.html) - Display version information and exit + diff --git a/_docs/reference/istioctl-autogen/istioctl_completion.md b/_docs/reference/istioctl/istioctl_completion.md similarity index 90% rename from _docs/reference/istioctl-autogen/istioctl_completion.md rename to _docs/reference/istioctl/istioctl_completion.md index 26e6a17dcc..4d9486925b 100644 --- a/_docs/reference/istioctl-autogen/istioctl_completion.md +++ b/_docs/reference/istioctl/istioctl_completion.md @@ -1,9 +1,7 @@ --- -title: Generate bash completion for Istioctl +title: istioctl completion overview: Generate bash completion for Istioctl - -order: 200 - +order: 1 bodyclass: docs layout: docs type: markdown @@ -17,7 +15,7 @@ Generate bash completion for Istioctl Output shell completion code for the bash shell. The shell output must -be evaluated for to provide interactive completion of istioctl +be evaluated to provide interactive completion of istioctl commands. Examples: diff --git a/_docs/reference/istioctl-autogen/istioctl_create.md b/_docs/reference/istioctl/istioctl_create.md similarity index 85% rename from _docs/reference/istioctl-autogen/istioctl_create.md rename to _docs/reference/istioctl/istioctl_create.md index 32876177b5..1975bdc644 100644 --- a/_docs/reference/istioctl-autogen/istioctl_create.md +++ b/_docs/reference/istioctl/istioctl_create.md @@ -1,9 +1,7 @@ --- -title: Create policies and rules +title: istioctl create overview: Create policies and rules - -order: 20 - +order: 2 bodyclass: docs layout: docs type: markdown @@ -15,7 +13,12 @@ Create policies and rules ### Synopsis -Create policies and rules + +Example usage: + + # Create a rule using the definition in example-routing.yaml. + $ istioctl create -f example-routing.yaml + ``` istioctl create diff --git a/_docs/reference/istioctl-autogen/istioctl_delete.md b/_docs/reference/istioctl/istioctl_delete.md similarity index 77% rename from _docs/reference/istioctl-autogen/istioctl_delete.md rename to _docs/reference/istioctl/istioctl_delete.md index ef9eaa286b..c29a507b11 100644 --- a/_docs/reference/istioctl-autogen/istioctl_delete.md +++ b/_docs/reference/istioctl/istioctl_delete.md @@ -1,9 +1,7 @@ --- -title: Delete policies or rules +title: istioctl delete overview: Delete policies or rules - -order: 30 - +order: 3 bodyclass: docs layout: docs type: markdown @@ -15,10 +13,18 @@ Delete policies or rules ### Synopsis -Delete policies or rules + +Example usage: + + # Delete a rule using the definition in example-routing.yaml. + $ istioctl delete -f example-routing.yaml + + # Delete the rule productpage-default + $ istioctl delete route-rule productpage-default + ``` -istioctl delete [ ... ] +istioctl delete ``` ### Options diff --git a/_docs/reference/istioctl-autogen/istioctl_get.md b/_docs/reference/istioctl/istioctl_get.md similarity index 70% rename from _docs/reference/istioctl-autogen/istioctl_get.md rename to _docs/reference/istioctl/istioctl_get.md index d116751885..4b8043f18e 100644 --- a/_docs/reference/istioctl-autogen/istioctl_get.md +++ b/_docs/reference/istioctl/istioctl_get.md @@ -1,24 +1,33 @@ --- -title: Retrieve a policy or rule -overview: Retrieve a policy or rule - -order: 40 - +title: istioctl get +overview: Retrieve policies and rules +order: 4 bodyclass: docs layout: docs type: markdown --- ## istioctl get -Retrieve a policy or rule +Retrieve policies and rules ### Synopsis -Retrieve a policy or rule + +Example usage: + + # List all route rules + istioctl get route-rules + + # List all destination policies + istioctl get destination-policies + + # Get a specific rule named productpage-default + istioctl get route-rule productpage-default + ``` -istioctl get +istioctl get ``` ### Options diff --git a/_docs/reference/istioctl/istioctl_kube-inject.md b/_docs/reference/istioctl/istioctl_kube-inject.md new file mode 100644 index 0000000000..c16b0f15d4 --- /dev/null +++ b/_docs/reference/istioctl/istioctl_kube-inject.md @@ -0,0 +1,81 @@ +--- +title: istioctl kube-inject +overview: Inject Envoy sidecar into Kubernetes pod resources +order: 5 +bodyclass: docs +layout: docs +type: markdown +--- +## istioctl kube-inject + +Inject Envoy sidecar into Kubernetes pod resources + +### Synopsis + + + + +Automatic Envoy sidecar injection via k8s admission controller is not +ready yet. Instead, use kube-inject to manually inject Envoy sidecar +into Kubernetes resource files. Unsupported resources are left +unmodified so it is safe to run kube-inject over a single file that +contains multiple Service, ConfigMap, Deployment, etc. definitions for +a complex application. Its best to do this when the resource is +initially created. + +k8s.io/docs/concepts/workloads/pods/pod-overview/#pod-templates is +updated for Job, DaemonSet, ReplicaSet, and Deployment YAML resource +documents. Support for additional pod-based resource types can be +added as necessary. + +The Istio project is continually evolving so the Istio sidecar +configuration may change unannounced. When in doubt re-run istioctl +kube-inject on deployments to get the most up-to-date changes. + +Example usage: + + # Update resources on the fly before applying. + kubectl apply -f <(istioctl kube-inject -f ) + + # Create a persistent version of the deployment with Envoy sidecar + # injected. This is particularly useful to understand what is + # being injected before committing to Kubernetes API server. + istioctl kube-inject -f deployment.yaml -o deployment-with-istio.yaml + + # Update an existing deployment. + kubectl get deployment -o yaml | istioctl kube-inject -f - | kubectl apply -f - + + + +``` +istioctl kube-inject +``` + +### Options + +``` + --coreDump Enable/Disable core dumps in injected Envoy sidecar (--coreDump=true affects all pods in a node and should only be used the cluster admin) (default true) + -f, --filename string Input Kubernetes resource filename + --hub string Docker hub + --includeIPRanges string Comma separated list of IP ranges in CIDR form. If set, only redirect outbound traffic to Envoy for IP ranges. Otherwise all outbound traffic is redirected + --meshConfig string ConfigMap name for Istio mesh configuration, key should be "mesh" (default "istio") + -o, --output string Modified output Kubernetes resource filename + --setVersionString string Override version info injected into resource + --sidecarProxyUID int Envoy sidecar UID (default 1337) + --tag string Docker tag + --verbosity int Runtime verbosity (default 2) +``` + +### Options inherited from parent commands + +``` + -c, --kubeconfig string Use a Kubernetes configuration file instead of in-cluster configuration + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + -n, --namespace string Select a Kubernetes namespace (default "default") + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging +``` + +### SEE ALSO +* [istioctl](istioctl.html) - Istio control interface + diff --git a/_docs/reference/istioctl-autogen/istioctl_mixer.md b/_docs/reference/istioctl/istioctl_mixer.md similarity index 52% rename from _docs/reference/istioctl-autogen/istioctl_mixer.md rename to _docs/reference/istioctl/istioctl_mixer.md index ec2e58e7e4..434df8810d 100644 --- a/_docs/reference/istioctl-autogen/istioctl_mixer.md +++ b/_docs/reference/istioctl/istioctl_mixer.md @@ -1,9 +1,7 @@ --- -title: Istio Mixer configuration +title: istioctl mixer overview: Istio Mixer configuration - -order: 100 - +order: 7 bodyclass: docs layout: docs type: markdown @@ -15,12 +13,28 @@ Istio Mixer configuration ### Synopsis -Istio Mixer configuration + +The Mixer configuration API allows users to configure all facets of the +Mixer. + +See https://istio.io/docs/concepts/policy-and-control/mixer-config.html +for a description of Mixer configuration's scope, subject, and rules. + +Example usage: + + # The Mixer config server can be accessed from outside the + # Kubernetes cluster using port forwarding. + CONFIG_PORT=$(kubectl get pod -l istio=mixer \ + -o jsonpath='{.items[0].spec.containers[0].ports[1].containerPort}') + export ISTIO_MIXER_API_SERVER=localhost:${CONFIG_PORT} + kubectl port-forward $(kubectl get pod -l istio=mixer \ + -o jsonpath='{.items[0].metadata.name}') ${CONFIG_PORT}:${CONFIG_PORT} & + ### Options ``` - -m, --mixer string Address of the mixer API server as : + -m, --mixer string Address of the Mixer configuration server as : ``` ### Options inherited from parent commands diff --git a/_docs/reference/istioctl-autogen/istioctl_mixer_rule.md b/_docs/reference/istioctl/istioctl_mixer_rule.md similarity index 83% rename from _docs/reference/istioctl-autogen/istioctl_mixer_rule.md rename to _docs/reference/istioctl/istioctl_mixer_rule.md index e03130477c..da156f51ec 100644 --- a/_docs/reference/istioctl-autogen/istioctl_mixer_rule.md +++ b/_docs/reference/istioctl/istioctl_mixer_rule.md @@ -1,9 +1,7 @@ --- -title: Istio Mixer Rule configuration +title: istioctl mixer rule overview: Istio Mixer Rule configuration - -order: 110 - +order: 10 bodyclass: docs layout: docs type: markdown @@ -15,14 +13,16 @@ Istio Mixer Rule configuration ### Synopsis -Istio Mixer Rule configuration + +Create and list Mixer rules in the configuration server. + ### Options inherited from parent commands ``` -c, --kubeconfig string Use a Kubernetes configuration file instead of in-cluster configuration --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) - -m, --mixer string Address of the mixer API server as : + -m, --mixer string Address of the Mixer configuration server as : -n, --namespace string Select a Kubernetes namespace (default "default") -v, --v Level log level for V logs --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging diff --git a/_docs/reference/istioctl-autogen/istioctl_mixer_rule_create.md b/_docs/reference/istioctl/istioctl_mixer_rule_create.md similarity index 67% rename from _docs/reference/istioctl-autogen/istioctl_mixer_rule_create.md rename to _docs/reference/istioctl/istioctl_mixer_rule_create.md index 23cf9aee9b..f9b853395e 100644 --- a/_docs/reference/istioctl-autogen/istioctl_mixer_rule_create.md +++ b/_docs/reference/istioctl/istioctl_mixer_rule_create.md @@ -1,9 +1,7 @@ --- -title: Create Istio Mixer rules +title: istioctl mixer rule create overview: Create Istio Mixer rules - -order: 120 - +order: 8 bodyclass: docs layout: docs type: markdown @@ -15,16 +13,21 @@ Create Istio Mixer rules ### Synopsis -Create Istio Mixer rules + +Example usage: + + # Create a new Mixer rule for the given scope and subject. + istioctl mixer rule create global myservice.ns.svc.cluster.local -f mixer-rule.yml + ``` -istioctl mixer rule create +istioctl mixer rule create ``` ### Options ``` - -f, --file string Input file with contents of the mixer rule + -f, --file string Input file with contents of the Mixer rule ``` ### Options inherited from parent commands @@ -32,7 +35,7 @@ istioctl mixer rule create ``` -c, --kubeconfig string Use a Kubernetes configuration file instead of in-cluster configuration --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) - -m, --mixer string Address of the mixer API server as : + -m, --mixer string Address of the Mixer configuration server as : -n, --namespace string Select a Kubernetes namespace (default "default") -v, --v Level log level for V logs --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging diff --git a/_docs/reference/istioctl-autogen/istioctl_mixer_rule_get.md b/_docs/reference/istioctl/istioctl_mixer_rule_get.md similarity index 67% rename from _docs/reference/istioctl-autogen/istioctl_mixer_rule_get.md rename to _docs/reference/istioctl/istioctl_mixer_rule_get.md index db9d6652c1..40aa4a1f54 100644 --- a/_docs/reference/istioctl-autogen/istioctl_mixer_rule_get.md +++ b/_docs/reference/istioctl/istioctl_mixer_rule_get.md @@ -1,9 +1,7 @@ --- -title: Get Istio Mixer rules +title: istioctl mixer rule get overview: Get Istio Mixer rules - -order: 130 - +order: 9 bodyclass: docs layout: docs type: markdown @@ -15,10 +13,17 @@ Get Istio Mixer rules ### Synopsis -Get Istio Mixer rules + +Get a Mixer rule for a given scope and subject. + +Example usage: + + # Get the Mixer rule with scope='global' and subject='myservice.ns.svc.cluster.local' + istioctl mixer rule get global myservice.ns.svc.cluster.local + ``` -istioctl mixer rule get +istioctl mixer rule get ``` ### Options inherited from parent commands @@ -26,7 +31,7 @@ istioctl mixer rule get ``` -c, --kubeconfig string Use a Kubernetes configuration file instead of in-cluster configuration --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) - -m, --mixer string Address of the mixer API server as : + -m, --mixer string Address of the Mixer configuration server as : -n, --namespace string Select a Kubernetes namespace (default "default") -v, --v Level log level for V logs --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging diff --git a/_docs/reference/istioctl-autogen/istioctl_replace.md b/_docs/reference/istioctl/istioctl_replace.md similarity index 78% rename from _docs/reference/istioctl-autogen/istioctl_replace.md rename to _docs/reference/istioctl/istioctl_replace.md index 9d72010980..2cac300580 100644 --- a/_docs/reference/istioctl-autogen/istioctl_replace.md +++ b/_docs/reference/istioctl/istioctl_replace.md @@ -1,21 +1,24 @@ --- -title: Replace policies and rules -overview: Replace policies and rules - -order: 50 - +title: istioctl replace +overview: Replace existing policies and rules +order: 11 bodyclass: docs layout: docs type: markdown --- ## istioctl replace -Replace policies and rules +Replace existing policies and rules ### Synopsis -Replace policies and rules + +Example usage: + + # Create a rule using the definition in example-routing.yaml. + $ istioctl replace -f example-routing.yaml + ``` istioctl replace diff --git a/_docs/reference/istioctl-autogen/istioctl_version.md b/_docs/reference/istioctl/istioctl_version.md similarity index 88% rename from _docs/reference/istioctl-autogen/istioctl_version.md rename to _docs/reference/istioctl/istioctl_version.md index cdbfc823a6..0974611363 100644 --- a/_docs/reference/istioctl-autogen/istioctl_version.md +++ b/_docs/reference/istioctl/istioctl_version.md @@ -1,9 +1,7 @@ --- -title: Display version information and exit -overview: Display version information and exit. - -order: 200 - +title: istioctl version +overview: Display version information and exit +order: 12 bodyclass: docs layout: docs type: markdown diff --git a/scripts/auto-generate-istioctl.sh b/scripts/auto-generate-istioctl.sh index 80b6b145f1..9a74c81cd3 100755 --- a/scripts/auto-generate-istioctl.sh +++ b/scripts/auto-generate-istioctl.sh @@ -6,29 +6,17 @@ set -o pipefail BASE=$(cd "$(dirname "$0")" ; pwd -P)/.. ISTIOCTL=${ISTIOCTL:-istioctl} -ISTIOCTL_DIR=$(readlink -f ${BASE}/_docs/reference/istioctl-autogen/) - -function mainPageHeader() { - cat < ${out} - ;; - *) - commandHeader "${title}" | cat - ${file} > ${out} - ;; - esac + commandHeader "${title}" "${overview}" "${order}"| cat - ${file} > ${out} cp ${out} ${file} # Rename markdown links to html equivalent. sed -i 's|\(\[.*\]\)(\(.*\).md)|\1(\2.html)|' ${file} done + +# Generate main index last so it isn't patched by previous steps. +generateIndex 0 > ${ISTIOCTL_DIR}/index.md