mirror of https://github.com/istio/istio.io.git
update istioctl docs auto-generation script (#79)
* update istioctl docs auto-generation script * istioctl: fix example usage formatting
This commit is contained in:
parent
85bd965c56
commit
98f1d119a4
|
@ -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 %}
|
|
|
@ -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 <resource.yaml>)
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
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
|
|
||||||
|
|
|
@ -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 <command> [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
|
|
|
@ -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 %}
|
|
@ -1,9 +1,7 @@
|
||||||
---
|
---
|
||||||
title: Istioctl Control
|
title: istioctl
|
||||||
overview: Istio control interface
|
overview: Istio control interface
|
||||||
|
order: 6
|
||||||
order: 200
|
|
||||||
|
|
||||||
bodyclass: docs
|
bodyclass: docs
|
||||||
layout: docs
|
layout: docs
|
||||||
type: markdown
|
type: markdown
|
||||||
|
@ -15,7 +13,18 @@ Istio control interface
|
||||||
### Synopsis
|
### 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
|
### 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 completion](istioctl_completion.html) - Generate bash completion for Istioctl
|
||||||
* [istioctl create](istioctl_create.html) - Create policies and rules
|
* [istioctl create](istioctl_create.html) - Create policies and rules
|
||||||
* [istioctl delete](istioctl_delete.html) - Delete policies or rules
|
* [istioctl delete](istioctl_delete.html) - Delete policies or rules
|
||||||
* [istioctl get](istioctl_get.html) - Retrieve a policy or rule
|
* [istioctl get](istioctl_get.html) - Retrieve policies and rules
|
||||||
* [istioctl kube-inject](istioctl_kube-inject.html) - Inject istio sidecar proxy into kubernetes resources
|
* [istioctl kube-inject](istioctl_kube-inject.html) - Inject Envoy sidecar into Kubernetes pod resources
|
||||||
* [istioctl mixer](istioctl_mixer.html) - Istio Mixer configuration
|
* [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
|
* [istioctl version](istioctl_version.html) - Display version information and exit
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
---
|
---
|
||||||
title: Generate bash completion for Istioctl
|
title: istioctl completion
|
||||||
overview: Generate bash completion for Istioctl
|
overview: Generate bash completion for Istioctl
|
||||||
|
order: 1
|
||||||
order: 200
|
|
||||||
|
|
||||||
bodyclass: docs
|
bodyclass: docs
|
||||||
layout: docs
|
layout: docs
|
||||||
type: markdown
|
type: markdown
|
||||||
|
@ -17,7 +15,7 @@ Generate bash completion for Istioctl
|
||||||
|
|
||||||
|
|
||||||
Output shell completion code for the bash shell. The shell output must
|
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.
|
commands.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
|
@ -1,9 +1,7 @@
|
||||||
---
|
---
|
||||||
title: Create policies and rules
|
title: istioctl create
|
||||||
overview: Create policies and rules
|
overview: Create policies and rules
|
||||||
|
order: 2
|
||||||
order: 20
|
|
||||||
|
|
||||||
bodyclass: docs
|
bodyclass: docs
|
||||||
layout: docs
|
layout: docs
|
||||||
type: markdown
|
type: markdown
|
||||||
|
@ -15,7 +13,12 @@ Create policies and rules
|
||||||
### Synopsis
|
### 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
|
istioctl create
|
|
@ -1,9 +1,7 @@
|
||||||
---
|
---
|
||||||
title: Delete policies or rules
|
title: istioctl delete
|
||||||
overview: Delete policies or rules
|
overview: Delete policies or rules
|
||||||
|
order: 3
|
||||||
order: 30
|
|
||||||
|
|
||||||
bodyclass: docs
|
bodyclass: docs
|
||||||
layout: docs
|
layout: docs
|
||||||
type: markdown
|
type: markdown
|
||||||
|
@ -15,10 +13,18 @@ Delete policies or rules
|
||||||
### Synopsis
|
### 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 <type> <name> [<name2> ... <nameN>]
|
istioctl delete
|
||||||
```
|
```
|
||||||
|
|
||||||
### Options
|
### Options
|
|
@ -1,24 +1,33 @@
|
||||||
---
|
---
|
||||||
title: Retrieve a policy or rule
|
title: istioctl get
|
||||||
overview: Retrieve a policy or rule
|
overview: Retrieve policies and rules
|
||||||
|
order: 4
|
||||||
order: 40
|
|
||||||
|
|
||||||
bodyclass: docs
|
bodyclass: docs
|
||||||
layout: docs
|
layout: docs
|
||||||
type: markdown
|
type: markdown
|
||||||
---
|
---
|
||||||
## istioctl get
|
## istioctl get
|
||||||
|
|
||||||
Retrieve a policy or rule
|
Retrieve policies and rules
|
||||||
|
|
||||||
### Synopsis
|
### 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 <type> <name>
|
istioctl get
|
||||||
```
|
```
|
||||||
|
|
||||||
### Options
|
### Options
|
|
@ -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 <resource.yaml>)
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
---
|
---
|
||||||
title: Istio Mixer configuration
|
title: istioctl mixer
|
||||||
overview: Istio Mixer configuration
|
overview: Istio Mixer configuration
|
||||||
|
order: 7
|
||||||
order: 100
|
|
||||||
|
|
||||||
bodyclass: docs
|
bodyclass: docs
|
||||||
layout: docs
|
layout: docs
|
||||||
type: markdown
|
type: markdown
|
||||||
|
@ -15,12 +13,28 @@ Istio Mixer configuration
|
||||||
### Synopsis
|
### 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
|
### Options
|
||||||
|
|
||||||
```
|
```
|
||||||
-m, --mixer string Address of the mixer API server as <host>:<port>
|
-m, --mixer string Address of the Mixer configuration server as <host>:<port>
|
||||||
```
|
```
|
||||||
|
|
||||||
### Options inherited from parent commands
|
### Options inherited from parent commands
|
|
@ -1,9 +1,7 @@
|
||||||
---
|
---
|
||||||
title: Istio Mixer Rule configuration
|
title: istioctl mixer rule
|
||||||
overview: Istio Mixer Rule configuration
|
overview: Istio Mixer Rule configuration
|
||||||
|
order: 10
|
||||||
order: 110
|
|
||||||
|
|
||||||
bodyclass: docs
|
bodyclass: docs
|
||||||
layout: docs
|
layout: docs
|
||||||
type: markdown
|
type: markdown
|
||||||
|
@ -15,14 +13,16 @@ Istio Mixer Rule configuration
|
||||||
### Synopsis
|
### Synopsis
|
||||||
|
|
||||||
|
|
||||||
Istio Mixer Rule configuration
|
|
||||||
|
Create and list Mixer rules in the configuration server.
|
||||||
|
|
||||||
|
|
||||||
### Options inherited from parent commands
|
### Options inherited from parent commands
|
||||||
|
|
||||||
```
|
```
|
||||||
-c, --kubeconfig string Use a Kubernetes configuration file instead of in-cluster configuration
|
-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)
|
--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 <host>:<port>
|
-m, --mixer string Address of the Mixer configuration server as <host>:<port>
|
||||||
-n, --namespace string Select a Kubernetes namespace (default "default")
|
-n, --namespace string Select a Kubernetes namespace (default "default")
|
||||||
-v, --v Level log level for V logs
|
-v, --v Level log level for V logs
|
||||||
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
|
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
|
|
@ -1,9 +1,7 @@
|
||||||
---
|
---
|
||||||
title: Create Istio Mixer rules
|
title: istioctl mixer rule create
|
||||||
overview: Create Istio Mixer rules
|
overview: Create Istio Mixer rules
|
||||||
|
order: 8
|
||||||
order: 120
|
|
||||||
|
|
||||||
bodyclass: docs
|
bodyclass: docs
|
||||||
layout: docs
|
layout: docs
|
||||||
type: markdown
|
type: markdown
|
||||||
|
@ -15,16 +13,21 @@ Create Istio Mixer rules
|
||||||
### Synopsis
|
### 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 <scope> <subject>
|
istioctl mixer rule create
|
||||||
```
|
```
|
||||||
|
|
||||||
### Options
|
### 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
|
### Options inherited from parent commands
|
||||||
|
@ -32,7 +35,7 @@ istioctl mixer rule create <scope> <subject>
|
||||||
```
|
```
|
||||||
-c, --kubeconfig string Use a Kubernetes configuration file instead of in-cluster configuration
|
-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)
|
--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 <host>:<port>
|
-m, --mixer string Address of the Mixer configuration server as <host>:<port>
|
||||||
-n, --namespace string Select a Kubernetes namespace (default "default")
|
-n, --namespace string Select a Kubernetes namespace (default "default")
|
||||||
-v, --v Level log level for V logs
|
-v, --v Level log level for V logs
|
||||||
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
|
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
|
|
@ -1,9 +1,7 @@
|
||||||
---
|
---
|
||||||
title: Get Istio Mixer rules
|
title: istioctl mixer rule get
|
||||||
overview: Get Istio Mixer rules
|
overview: Get Istio Mixer rules
|
||||||
|
order: 9
|
||||||
order: 130
|
|
||||||
|
|
||||||
bodyclass: docs
|
bodyclass: docs
|
||||||
layout: docs
|
layout: docs
|
||||||
type: markdown
|
type: markdown
|
||||||
|
@ -15,10 +13,17 @@ Get Istio Mixer rules
|
||||||
### Synopsis
|
### 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 <scope> <subject>
|
istioctl mixer rule get
|
||||||
```
|
```
|
||||||
|
|
||||||
### Options inherited from parent commands
|
### Options inherited from parent commands
|
||||||
|
@ -26,7 +31,7 @@ istioctl mixer rule get <scope> <subject>
|
||||||
```
|
```
|
||||||
-c, --kubeconfig string Use a Kubernetes configuration file instead of in-cluster configuration
|
-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)
|
--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 <host>:<port>
|
-m, --mixer string Address of the Mixer configuration server as <host>:<port>
|
||||||
-n, --namespace string Select a Kubernetes namespace (default "default")
|
-n, --namespace string Select a Kubernetes namespace (default "default")
|
||||||
-v, --v Level log level for V logs
|
-v, --v Level log level for V logs
|
||||||
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
|
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
|
|
@ -1,21 +1,24 @@
|
||||||
---
|
---
|
||||||
title: Replace policies and rules
|
title: istioctl replace
|
||||||
overview: Replace policies and rules
|
overview: Replace existing policies and rules
|
||||||
|
order: 11
|
||||||
order: 50
|
|
||||||
|
|
||||||
bodyclass: docs
|
bodyclass: docs
|
||||||
layout: docs
|
layout: docs
|
||||||
type: markdown
|
type: markdown
|
||||||
---
|
---
|
||||||
## istioctl replace
|
## istioctl replace
|
||||||
|
|
||||||
Replace policies and rules
|
Replace existing policies and rules
|
||||||
|
|
||||||
### Synopsis
|
### 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
|
istioctl replace
|
|
@ -1,9 +1,7 @@
|
||||||
---
|
---
|
||||||
title: Display version information and exit
|
title: istioctl version
|
||||||
overview: Display version information and exit.
|
overview: Display version information and exit
|
||||||
|
order: 12
|
||||||
order: 200
|
|
||||||
|
|
||||||
bodyclass: docs
|
bodyclass: docs
|
||||||
layout: docs
|
layout: docs
|
||||||
type: markdown
|
type: markdown
|
|
@ -6,29 +6,17 @@ set -o pipefail
|
||||||
|
|
||||||
BASE=$(cd "$(dirname "$0")" ; pwd -P)/..
|
BASE=$(cd "$(dirname "$0")" ; pwd -P)/..
|
||||||
ISTIOCTL=${ISTIOCTL:-istioctl}
|
ISTIOCTL=${ISTIOCTL:-istioctl}
|
||||||
ISTIOCTL_DIR=$(readlink -f ${BASE}/_docs/reference/istioctl-autogen/)
|
ISTIOCTL_DIR=$(readlink -f ${BASE}/_docs/reference/istioctl/)
|
||||||
|
|
||||||
function mainPageHeader() {
|
|
||||||
cat <<EOF
|
|
||||||
---
|
|
||||||
category: Reference
|
|
||||||
title: Istioctl
|
|
||||||
overview: ${title}
|
|
||||||
bodyclass: docs
|
|
||||||
layout: docs
|
|
||||||
type: markdown
|
|
||||||
---
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
|
|
||||||
function commandHeader() {
|
function commandHeader() {
|
||||||
title=${1}
|
title=${1}
|
||||||
|
overview=${2}
|
||||||
|
order=${3}
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
---
|
---
|
||||||
category: Reference
|
|
||||||
title: ${title}
|
title: ${title}
|
||||||
overview: ${title}
|
overview: ${overview}
|
||||||
parent: Istioctl
|
order: ${order}
|
||||||
bodyclass: docs
|
bodyclass: docs
|
||||||
layout: docs
|
layout: docs
|
||||||
type: markdown
|
type: markdown
|
||||||
|
@ -36,28 +24,47 @@ type: markdown
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
# Generate markdown files with istioctl.
|
function generateIndex() {
|
||||||
|
order=${1}
|
||||||
|
cat <<EOF
|
||||||
|
---
|
||||||
|
title: The Istioctl Command
|
||||||
|
overview: Options showing how to use the istioctl command.
|
||||||
|
order: ${order}
|
||||||
|
bodyclass: docs
|
||||||
|
layout: docs
|
||||||
|
type: markdown
|
||||||
|
---
|
||||||
|
{% include section-index.html %}
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
# Generate raw markdown files with istioctl markdown.
|
||||||
|
rm ${ISTIOCTL_DIR}/* || echo "nothing to clean from ${ISTIOCTL_DIR}/"
|
||||||
mkdir -p ${ISTIOCTL_DIR}
|
mkdir -p ${ISTIOCTL_DIR}
|
||||||
rm ${ISTIOCTL_DIR}/*
|
|
||||||
${ISTIOCTL} markdown --dir ${ISTIOCTL_DIR}
|
${ISTIOCTL} markdown --dir ${ISTIOCTL_DIR}
|
||||||
|
|
||||||
|
order=0
|
||||||
|
|
||||||
# Patch markdown up with the proper formatting.
|
# Patch markdown up with the proper formatting.
|
||||||
for file in ${ISTIOCTL_DIR}/*.md; do
|
for file in ${ISTIOCTL_DIR}/*.md; do
|
||||||
# Use the first header line as the title.
|
# Use the first header line as the title.
|
||||||
title=$(sed -n '/^[^#]/ {p;q;}' ${file})
|
title=$(grep -m1 -oP '^## \K.*' ${file})
|
||||||
|
|
||||||
|
# Use non-comment line as the overview
|
||||||
|
overview=$(grep -m1 -oP '\K^\w.*' ${file})
|
||||||
|
|
||||||
|
# Arrange pages based on 'ls' alphabetical ordering.
|
||||||
|
order=$((${order} + 1))
|
||||||
|
|
||||||
# Prepend template header.
|
# Prepend template header.
|
||||||
out=$(mktemp)
|
out=$(mktemp)
|
||||||
case ${file} in
|
commandHeader "${title}" "${overview}" "${order}"| cat - ${file} > ${out}
|
||||||
${ISTIOCTL_DIR}/istioctl.md)
|
|
||||||
mainPageHeader "${title}" | cat - ${file} > ${out}
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
commandHeader "${title}" | cat - ${file} > ${out}
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
cp ${out} ${file}
|
cp ${out} ${file}
|
||||||
|
|
||||||
# Rename markdown links to html equivalent.
|
# Rename markdown links to html equivalent.
|
||||||
sed -i 's|\(\[.*\]\)(\(.*\).md)|\1(\2.html)|' ${file}
|
sed -i 's|\(\[.*\]\)(\(.*\).md)|\1(\2.html)|' ${file}
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Generate main index last so it isn't patched by previous steps.
|
||||||
|
generateIndex 0 > ${ISTIOCTL_DIR}/index.md
|
||||||
|
|
Loading…
Reference in New Issue