Skip to content
This repository has been archived by the owner on Oct 27, 2020. It is now read-only.

Commit

Permalink
adding flags page to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
frankgreco committed Apr 2, 2018
1 parent 0b630d5 commit e3f93f7
Show file tree
Hide file tree
Showing 12 changed files with 304 additions and 21 deletions.
2 changes: 1 addition & 1 deletion cmd/kanali/app/options/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var (
FlagPrometheusServerInsecurePort = flags.Flag{
Long: "prometheus.insecure_port",
Short: "",
Value: 0,
Value: 9000,
Usage: "Sets the port that Kanali will listen on for incoming requests.",
}
// FlagPrometheusServerInsecureBindAddress specifies the network address that Kanali will listen on for incoming requests
Expand Down
2 changes: 1 addition & 1 deletion cmd/kanali/app/options/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ var (
FlagProxyEnableMockResponses = flags.Flag{
Long: "proxy.enable_mock_responses",
Short: "",
Value: false,
Value: true,
Usage: "Enables Kanali's mock responses feature. Read the documentation for more information.",
}
// FlagProxyUpstreamTimeout sets the length of upstream timeout
Expand Down
2 changes: 1 addition & 1 deletion cmd/kanali/app/options/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ var (
FlagServerInsecurePort = flags.Flag{
Long: "server.insecure_port",
Short: "",
Value: 0,
Value: 8080,
Usage: "Sets the port that Kanali will listen on for incoming requests.",
}
// FlagServerInsecureBindAddress specifies the network address that Kanali will listen on for incoming requests
Expand Down
292 changes: 291 additions & 1 deletion hugo/content/docs/v2/flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,294 @@ bref="Configuration flags"
toc = true
+++

### foo
### Usage

Each of the following flags can be set to a custom value. Values can also be set via environment variables and configuration files. The name of the corresponding environment variable is documented below. The order of precedence is as follows (each item has precedence over the item below it):

<span class="label focus">Flag</span>
<br />
<span class="label success">Environment Variable</span>
<br />
<span class="label warning">Config file</span>

To illustrate an example, let's assume we have a `config.toml` with the following value:
```
[kubernetes]
kubeconfig = "/usr/frank/.kube/config"
```

If the `KANALI_KUBERNETES_KUBECONFIG` environment variable is set, it will tag precedence over the value in the `config.toml` file.

If Kanali is started with the `--kubernetes.kubeconfig` flag, that will take the ultimate precedence over the previous two options.

### Configuration Flags

#### `--kubernetes.kubeconfig`
**Description:** Location of Kubernetes config file. This flag is most likely only applicable if running Kanali outside of a Kubernetes cluster.

**Type:** *string*

**Environment Variable:** `KANALI_KUBERNETES_KUBECONFIG`

<br />

#### `--plugins.location`
**Description:** Location of directory containing compiled shared object plugin files.

**Type:** *string*

**Default:** `/`

**Environment Variable:** `KANALI_PLUGINS_LOCATION`

<br />

#### `--plugins.apiKey.decryption_key_file`
**Description:** Location of PEM encoded RSA private key.

**Type:** *string*

**Environment Variable:** `KANALI_PLUGINS_APIKEY_DECRYPTION_KEY_FILE`

<br />

#### `--plugins.apiKey.header_key`
**Description:** Name of HTTP header containing API key value.

**Type:** *string*

**Default:** `apikey`

**Environment Variable:** `KANALI_PLUGINS_APIKEY_HEADER_KEY`

<br />

#### `--process.log_level`
**Description:** Kanali logging level

**Type:** *string*

**Default:** `info`

**Environment Variable:** `KANALI_PROCESS_LOG_LEVEL`

<br />

#### `--profiling.insecure_port`
**Description:** TCP port value that the profiling server will bind to for an HTTP server.

**Type:** *number*

**Default:** `9090`

**Environment Variable:** `KANALI_PROFILING_INSECURE_PORT`

<br />

#### `--profiling.insecure_bind_address`
**Description:** Bind address that the profiling server will bind to for an HTTP server.

**Type:** *string*

**Default:** `0.0.0.0`

**Environment Variable:** `KANALI_PROFILING_INSECURE_BIND_ADDRESS`

<br />

#### `--prometheus.secure_port`
**Description:** TCP port value that the profiling server will bind to for an HTTPS server.

**Type:** *number*

**Default:** `0`

**Environment Variable:** `KANALI_PROMETHEUS_SECURE_PORT`

<br />

#### `--prometheus.insecure_port`
**Description:** TCP port value that the profiling server will bind to for an HTTP server.

**Type:** *number*

**Default:** `9000`

**Environment Variable:** `KANALI_PROMETHEUS_INSECURE_PORT`

<br />

#### `--prometheus.insecure_bind_address`
**Description:** Bind address that the profiling server will bind to for an HTTP server.

**Type:** *string*

**Default:** `0.0.0.0`

**Environment Variable:** `KANALI_PROMETHEUS_INSECURE_BIND_ADDRESS`

<br />

#### `--prometheus.secure_bind_address`
**Description:** Bind address that the profiling server will bind to for an HTTPS server.

**Type:** *string*

**Default:** `0.0.0.0`

**Environment Variable:** `KANALI_PROMETHEUS_SECURE_BIND_ADDRESS`

<br />

#### `--proxy.enable_cluster_ip`
**Description:** Whether or not to use the Kubernetes `clusterIP` instead of dns for Kubernetes upstream services.

**Type:** *boolean*

**Default:** `true`

**Environment Variable:** `KANALI_PROXY_ENABLE_CLUSTER_IP`

<br />

#### `--proxy.header_mask_Value`
**Description:** When logging and tracing a request's headers, this flag specifies the value to use when masking certain header's values.

**Type:** *string*

**Default:** `omitted`

**Environment Variable:** `KANALI_PROXY_HEADER_MASK_VALUE`

<br />

#### `--proxy.enable_mock_responses`
**Description:** Whether or not to enable mock responses.

**Type:** *boolean*

**Default:** `true`

**Environment Variable:** `KANALI_PROXY_ENABLE_MOCK_RESPONSES`

<br />

#### `--proxy.upstream_timeout`
**Description:** Upstream timeout duration.

**Type:** *duration*

**Default:** `0h0m10s`

**Environment Variable:** `KANALI_PROXY_UPSTREAM_TIMEOUT`

<br />

#### `--proxy.mask_header_keys`
**Description:** When logging and tracing a request's headers, this flag specifies the headers (comma separated) whose values will be masked.

**Type:** *string*

**Environment Variable:** `KANALI_PROXY_MASK_HEADER_KEYS`

<br />

#### `--proxy.tls_common_name_validation`
**Description:** This flag specifies whether server name validation will be performed during an upstream TLS handshake.

**Type:** *boolean*

**Default:** `true`

**Environment Variable:** `KANALI_PROXY_TLS_COMMON_NAME_VALIDATION`

<br />

#### `--proxy.default_header_values`
**Description:** Default values for HTTP headers when using dynamic service discovery. Flag value takes the form `foo=bar,car=baz`.

**Type:** *string*

**Environment Variable:** `KANALI_PROXY_DEFAULT_HEADER_VALUES`

<br />

#### `--server.secure_port`
**Description:** TCP port value that the profiling server will bind to for an HTTPS server.

**Type:** *number*

**Default:** `0`

**Environment Variable:** `KANALI_SERVER_SECURE_PORT`

<br />

#### `--server.insecure_port`
**Description:** TCP port value that the profiling server will bind to for an HTTP server.

**Type:** *number*

**Default:** `8080`

**Environment Variable:** `KANALI_SERVER_INSECURE_PORT`

<br />

#### `--server.insecure_bind_address`
**Description:** Bind address that the profiling server will bind to for an HTTP server.

**Type:** *string*

**Default:** `0.0.0.0`

**Environment Variable:** `KANALI_SERVER_INSECURE_BIND_ADDRESS`

<br />

#### `--server.secure_bind_address`
**Description:** Bind address that the profiling server will bind to for an HTTPS server.

**Type:** *string*

**Default:** `0.0.0.0`

**Environment Variable:** `KANALI_SERVER_SECURE_BIND_ADDRESS`

<br />

#### `--server.tls.cert_file`
**Description:** Location of the PEM encoded TLS certificate for the Kanali gateway server.

**Type:** *string*

**Environment Variable:** `KANALI_SERVER_TLS_CERT_FILE`

<br />

#### `--server.tls.key_file`
**Description:** Location of the PEM encoded TLS private key for the Kanali gateway server.

**Type:** *string*

**Environment Variable:** `KANALI_SERVER_TLS_KEY_FILE`

<br />

#### `--server.tls.ca_file`
**Description:** Location of the PEM encoded TLS certificate authority for the Kanali gateway server. This is specified when validating the identity of the client.

**Type:** *string*

**Environment Variable:** `KANALI_SERVER_TLS_CA_FILE`

<br />

#### `--tracing.config_file`
**Description:** Location of the Jaeger config file in `yaml` format. Configuration details can be found [here](https://godoc.org/github.com/uber/jaeger-client-go/config#Configuration).

**Type:** *string*

**Environment Variable:** `KANALI_TRACING_CONFIG_FILE`

<br />
11 changes: 0 additions & 11 deletions hugo/content/docs/v2/plugins.md

This file was deleted.

8 changes: 6 additions & 2 deletions hugo/content/tutorial/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ bref="foo"
type = "tutorial"
+++

<div class="example">
<div class="message focus" data-component="message">
Tutorial coming soon! Check back in a little bit.
</div>

<!-- <div class="example">
<nav id="tabs" class="tabs" data-component="tabs">
<ul class="hide">
Expand Down Expand Up @@ -53,4 +57,4 @@ spec:
<button class="float-right button outline big" onclick="$('#tabs').tabs('next');">next</button>
</div>
</div>
</div> -->
6 changes: 3 additions & 3 deletions hugo/layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ <h1>{{.Title}}</h1>
<div class="row gutters">
<div class="col col-4 item">
<figure>
<img alt="Baseline" height="48" src="{{ "/img/kube/kubernetes.png" | relURL }}" width="48">
<img alt="Baseline" height="48" src="{{ "/img/kubernetes.png" | relURL }}" width="48">
</figure>
<h4>Kubernetes Native</h4>
<p>Kanali extends the Kubernetes API by using Custom Resource Definitions, allowing Kanali to be configured and used in the same way as native Kubernetes resources.</p>
</div>
<div class="col col-4 item">
<figure>
<img alt="Baseline" height="48" src="{{ "/img/kube/opentracing.png" | relURL }}" width="48">
<img alt="Baseline" height="48" src="{{ "/img/opentracing.png" | relURL }}" width="48">
</figure>
<h4>OpenTracing</h4>
<p>Kanali integrates with OpenTracing, a vendor-neutral open standard for distributed tracing. Jaeger, a distributed tracing system, is supported out of the box to provide a visual representation for your traces.</p>
</div>
<div class="col col-4 item">
<figure>
<img alt="Baseline" height="48" src="{{ "/img/kube/prometheus.png" | relURL }}" width="48">
<img alt="Baseline" height="48" src="{{ "/img/prometheus.png" | relURL }}" width="48">
</figure>
<h4>Analytics & Monitoring</h4>
<p>Kanali integrates with Prometheus and Grafana to provide a robust set of metrics and a customizable dashboard so that you can monitor the performance of your APIs in real time.</p>
Expand Down
2 changes: 1 addition & 1 deletion hugo/layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="hide-sm" id="top">
<div id="top-brand">
<a href="/" title="home">
<img alt="Baseline" height="36" src="{{ "/img/kube/kanali.png" | relURL }}" width="36">
<img alt="Baseline" height="36" src="{{ "/img/kanali.png" | relURL }}" width="36">
</a>
</div>
<nav id="top-nav-main">
Expand Down
Binary file added hugo/static/img/kanali.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hugo/static/img/kubernetes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hugo/static/img/opentracing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hugo/static/img/prometheus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e3f93f7

Please sign in to comment.