-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from rogras/master
Updated Chart
- Loading branch information
Showing
12 changed files
with
327 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
apiVersion: v1 | ||
appVersion: "1.0" | ||
description: Chart for krakend app gateway | ||
apiVersion: v2 | ||
name: krakend | ||
description: A Helm chart for Kubernetes | ||
|
||
# A chart can be either an 'application' or a 'library' chart. | ||
# | ||
# Application charts are a collection of templates that can be packaged into versioned archives | ||
# to be deployed. | ||
# | ||
# Library charts provide useful utilities or functions for the chart developer. They're included as | ||
# a dependency of application charts to inject those utilities and functions into the rendering | ||
# pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
type: application | ||
|
||
# This is the chart version. This version number should be incremented each time you make changes | ||
# to the chart and its templates, including the app version. | ||
# Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
version: 0.1.0 | ||
keywords: | ||
- krakend | ||
- api | ||
- gateway | ||
home: http://www.krakend.io | ||
maintainers: | ||
- name: Michele Scandura | ||
email: [email protected] | ||
|
||
# This is the version number of the application being deployed. This version number should be | ||
# incremented each time you make changes to the application. Versions are not expected to | ||
# follow Semantic Versioning. They should reflect the version the application is using. | ||
appVersion: 1.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,60 @@ | ||
# krakend-helm | ||
An helm chart to deploy krakend in a kubernetes cluster | ||
* Installs the api-gateway system [KrakenD](http://krakend.io/) | ||
|
||
## TL;DR; | ||
|
||
```console | ||
$ helm install krakend-helm | ||
``` | ||
|
||
## Installing the Chart | ||
|
||
To install the chart with the release name `my-release`: | ||
|
||
```console | ||
$ helm install --name my-release krakend-helm | ||
``` | ||
|
||
## 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. | ||
|
||
## Upgrading an existing Release to a new major version | ||
|
||
A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an | ||
incompatible breaking change needing manual actions. | ||
|
||
|
||
## Configuration | ||
|
||
| Parameter | Description | Default | | ||
|-------------------------------------------|-----------------------------------------------|---------------------------------------------------------| | ||
| `replicas` | Number of nodes | `1` | | | | ||
| `securityContext` | Deployment securityContext | `{}` | | ||
| `image.repository` | Image repository | `devopsfaith/krakend` | | ||
| `image.tag` | Image tag | `latest` | | ||
| `image.pullPolicy` | Image pull policy | `IfNotPresent` | | ||
| `imagePullSecrets` | Image pull secrets | `{}` | | ||
| `service.type` | Kubernetes service type | `ClusterIP` | | ||
| `service.port` | Kubernetes port where service is exposed | `80` | | ||
| `ingress.enabled` | Enables Ingress | `false` | | ||
| `ingress.annotations` | Ingress annotations (values are templated) | `{}` | | ||
| `ingress.hosts` | Ingress accepted hostnames | `[]` | | ||
| `ingress.tls` | Ingress TLS configuration | `[]` | | ||
| `resources` | CPU/Memory resource requests/limits | `{}` | | ||
| `nodeSelector` | Node labels for pod assignment | `{}` | | ||
| `tolerations` | Toleration labels for pod assignment | `[]` | | ||
| `affinity` | Affinity settings for pod assignment | `{}` | | ||
| `annotations` | Deployment annotations | `{}` | | ||
| `serviceAccount.annotations` | ServiceAccount annotations | | | ||
| `serviceAccount.create` | Create service account | `true` | | ||
| `serviceAccount.name` | Service account name to use, when empty will be set to created account if `serviceAccount.create` is set else to `default` | `` | | ||
| `podAnnotations` | Deployment | `{}` | | ||
| `namespaceOverride` | Override the deployment namespace | `""` (`Release.Namespace`) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,55 @@ | ||
{ | ||
"version": 2, | ||
"timeout": "3000ms", | ||
"cache_ttl": "300s", | ||
"output_encoding": "json", | ||
"name": "My lovely gateway", | ||
"port": 8080, | ||
"name": "sample", | ||
"cache_ttl": "3600s", | ||
"timeout": "3s", | ||
"extra_config": { | ||
"github_com/devopsfaith/krakend-metrics": { | ||
"collection_time": "60s", | ||
"proxy_disabled": false, | ||
"router_disabled": false, | ||
"backend_disabled": false, | ||
"endpoint_disabled": false, | ||
"listen_address": ":8090" | ||
}, | ||
"github_com/devopsfaith/krakend-gelf": { | ||
"address": "127.0.0.1:12201", | ||
"enable_tcp": false | ||
}, | ||
"github_com/devopsfaith/krakend-gologging": { | ||
"level": "DEBUG", | ||
"prefix": "[KRAKEND]", | ||
"syslog": false, | ||
"stdout": true | ||
"level": "DEBUG", | ||
"prefix": "[KRAKEND]", | ||
"syslog": false, | ||
"stdout": true | ||
} | ||
}, | ||
"endpoints": [ | ||
{ | ||
"endpoint": "/", | ||
"extra_config": {}, | ||
"output_encoding": "no-op", | ||
"concurrent_calls": 1, | ||
"backend": [ | ||
{ | ||
"url_pattern": "/", | ||
"encoding": "no-op", | ||
"extra_config": {}, | ||
"sd": "static", | ||
"host": [ | ||
"http://krakend.io" | ||
{ | ||
"endpoint": "/health", | ||
"method": "GET", | ||
"backend": [ | ||
{ | ||
"host": [ | ||
"https://jsonplaceholder.typicode.com" | ||
], | ||
"mapping": { | ||
"body": "output" | ||
}, | ||
"whitelist": [ | ||
"id", | ||
"body" | ||
], | ||
"url_pattern": "/posts/1", | ||
"extra_config": { | ||
"github.com/devopsfaith/krakend-circuitbreaker/gobreaker": { | ||
"interval": 60, | ||
"timeout": 10, | ||
"maxErrors": 1 | ||
} | ||
} | ||
} | ||
], | ||
"disable_host_sanitize": false | ||
} | ||
] | ||
} | ||
"extra_config": { | ||
"github.com/devopsfaith/krakend/proxy": { | ||
"static": { | ||
"strategy": "success", | ||
"data": { | ||
"name": "IDEART", | ||
"env": "pre", | ||
"status": "pass" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
1. Get the application URL by running these commands: | ||
{{- if .Values.ingress.enabled }} | ||
{{- range .Values.ingress.hosts }} | ||
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }} | ||
{{- range $host := .Values.ingress.hosts }} | ||
{{- range .paths }} | ||
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }} | ||
{{- end }} | ||
{{- end }} | ||
{{- else if contains "NodePort" .Values.service.type }} | ||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "krakend.fullname" . }}) | ||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") | ||
echo http://$NODE_IP:$NODE_PORT | ||
{{- else if contains "LoadBalancer" .Values.service.type }} | ||
NOTE: It may take a few minutes for the LoadBalancer IP to be available. | ||
You can watch the status of by running 'kubectl get svc -w {{ include "krakend.fullname" . }}' | ||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "krakend.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') | ||
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "krakend.fullname" . }}' | ||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "krakend.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") | ||
echo http://$SERVICE_IP:{{ .Values.service.port }} | ||
{{- else if contains "ClusterIP" .Values.service.type }} | ||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "krakend.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") | ||
echo "Visit http://127.0.0.1:8080 to use your application" | ||
kubectl port-forward $POD_NAME 8080:80 | ||
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:8080 | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.