forked from equinixmetal-helm/krakend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.md.gotmpl
113 lines (79 loc) · 3.22 KB
/
README.md.gotmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# Krakend
![Version: {{ .Version }}](https://img.shields.io/badge/Version-{{ .Version | replace "-" "--" }}-informational?style=for-the-badge)
{{ if .Type }}![Type: {{ .Type }}](https://img.shields.io/badge/Type-{{ .Type }}-informational?style=for-the-badge) {{ end }}
{{ if .AppVersion }}![AppVersion: {{ .AppVersion }}](https://img.shields.io/badge/AppVersion-{{ .AppVersion | replace "-" "--" }}-informational?style=for-the-badge) {{ end }}
This is a helm chart that deploys a [Krakend](https://www.krakend.io/) instance.
## Description
{{ template "chart.description" . }}
## Installation
* Add the Equinix Metal helm repository
```bash
helm repo add equinixmetal https://helm.equinixmetal.com
```
* Install the helm chart using default values
```bash
helm install krakend equinixmetal/krakend
```
> If you are using your own chart, reference the following to your chart's dependencies:
> ```yaml
> dependencies:
> - name: krakend
> version: v0.1.16
> repository: "https://helm.equinixmetal.com"
> ```
## Usage
There are two main modes of operation:
* configMap-based: the configuration is stored in a configMaps and mounted in the
container.
* all-in-one image: the configuration is stored in the container image itself.
Note that the all-in-one image method assumes that the configuration is stored
in the `/etc/krakend-src/config` path. This is done to allow for mounting
the license as describe in the section below.
Both modes of operation enable the flexible configuration feature. For the all-in-one
image, this is done so that the configuration can take environment variables into use.
Note that for a further description on how to use partials, settings and templates,
please refer to [the official krakend documentation](https://www.krakend.io/docs/configuration/flexible-config/).
{{ template "chart.valuesSection" . }}
## Development
### Prerequisites
- [helm](https://helm.sh/docs/intro/install/)
- [helm-docs](https://github.com/norwoodj/helm-docs)
### Testing
Ensure that the documentation is up to date before pushing a pull request:
```bash
helm-docs
```
### Releasing
There is a useful Makefile target that's useful to cut a release. So, simply do:
```bash
TAG=$RELEASE_VERSION make release
```
And the release will happen.
Note that this project follows the [Semantic Versioning scheme](https://semver.org/), so
make sure to follow it when cutting releases.
The `TAG` Makefile variable takes a release version without the `v` prefix. For example,
if you want to cut a release with version `v1.2.3`, you'd do:
```bash
TAG=1.2.3 make release
```
# Using Krakend.io Enterprise
Krakend.io Enterprise is a commercial product that extends the capabilities
of the open source Krakend.io API Gateway. It is available as a Docker image
that can be used as a drop-in replacement for the open source image.
In order to configure the helm chart to use it, you'd need a values file similar
as the following:
```yaml
image:
registry: docker.io
repository: krakend/krakend-ee
tag: "2.1.2"
extraVolumeMounts:
- name: license
mountPath: /etc/krakend/LICENSE
readOnly: true
extraVolumes:
- name: license
secret:
secretName: krakend-license
```
Note the mount of the license file in the `/etc/krakend/LICENSE` path.