Skip to content

Commit

Permalink
[stable/envoy]: optional feature to generate envoy.yaml from golang t…
Browse files Browse the repository at this point in the history
…emplate (helm#10265)

This feature enables you to make your values.yaml a bit more DRY by referencing chart values from within the envoy.yaml template by using the `{{ .Values.foo.bar }}`.

This also adds mumoshu as an co-owner of this chart.

Signed-off-by: Yusuke KUOKA <ykuoka@gmail.com>
  • Loading branch information
mumoshu authored and k8s-ci-robot committed Jan 16, 2019
1 parent 4f3d5e2 commit 49aae2c
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 2 deletions.
4 changes: 3 additions & 1 deletion stable/envoy/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: Envoy is an open source edge and service proxy, designed for cloud-native applications.
name: envoy
version: 1.3.0
version: 1.4.0
appVersion: 1.9.0
keywords:
- envoy
Expand All @@ -12,4 +12,6 @@ sources:
maintainers:
- name: josdotso
email: josdotso@cisco.com
- name: mumoshu
email: ykuoka@gmail.com
icon: https://avatars0.githubusercontent.com/u/30125649
2 changes: 2 additions & 0 deletions stable/envoy/OWNERS
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
approvers:
- josdotso
- mumoshu
reviewers:
- josdotso
- mumoshu
31 changes: 30 additions & 1 deletion stable/envoy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,33 @@

[Envoy](https://www.envoyproxy.io/) is an open source edge and service proxy, designed for cloud-native applications.

All user-configurable settings, default values and some commentary about them can be found in [values.yaml](values.yaml).
## Installing the Chart

To install the chart with the release name `my-release`:

```console
$ helm install stable/envoy --name my-release
```

The command deploys envoy on the Kubernetes cluster with the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.

## Uninstalling the Chart

To uninstall/delete the `my-release` deployment:

```console
$ helm delete my-release
```

The command removes all the Kubernetes components associated with the chart and deletes the release.

## Configuration

The following table lists the configurable parameters of the envoy chart and their default values.

Parameter | Description | Default
--- | --- | ---
`files.envoy\.yaml` | content of a full envoy configuration file as documented in https://www.envoyproxy.io/docs/envoy/latest/configuration/configuration | See [values.yaml](values.yaml)
`templates.envoy\.yaml` | golang template of a full configuration file. Use the `{{ .Values.foo.bar }}` syntax to embed chart values | See [values.yaml](values.yaml)

All other user-configurable settings, default values and some commentary about them can be found in [values.yaml](values.yaml).
4 changes: 4 additions & 0 deletions stable/envoy/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ data:
{{ $key }}: |-
{{ $value | default "" | indent 4 }}
{{- end -}}
{{- range $key, $value := .Values.templates }}
{{ $key }}: |-
{{ $value | default "" | tpl . | indent 4 }}
{{- end -}}
55 changes: 55 additions & 0 deletions stable/envoy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,58 @@ files:
port_value: 443
tls_context:
sni: www.google.com
## Uncomment this section to use helm values to dynamically generate enovy.yaml
# templates:
# envoy.yaml: |-
# ## refs:
# ## - https://www.envoyproxy.io/docs/envoy/latest/start/start#quick-start-to-run-simple-example
# ## - https://raw.githubusercontent.com/envoyproxy/envoy/master/configs/google_com_proxy.v2.yaml
# admin:
# access_log_path: /dev/stdout
# address:
# socket_address:
# address: 0.0.0.0
# port_value: {{ .Values.ports.admin.containerPort }}

# static_resources:
# listeners:
# - name: listener_0
# address:
# socket_address:
# address: 0.0.0.0
# port_value: {{ .Values.ports.n0.containerPort }}
# filter_chains:
# - filters:
# - name: envoy.http_connection_manager
# config:
# access_log:
# - name: envoy.file_access_log
# config:
# path: /dev/stdout
# stat_prefix: ingress_http
# route_config:
# name: local_route
# virtual_hosts:
# - name: local_service
# domains: ["*"]
# routes:
# - match:
# prefix: "/"
# route:
# host_rewrite: www.google.com
# cluster: service_google
# http_filters:
# - name: envoy.router
# clusters:
# - name: service_google
# connect_timeout: 0.25s
# type: LOGICAL_DNS
# dns_lookup_family: V4_ONLY
# lb_policy: ROUND_ROBIN
# hosts:
# - socket_address:
# address: google.com
# port_value: 443
# tls_context:
# sni: www.google.com

0 comments on commit 49aae2c

Please sign in to comment.