Skip to content

Commit

Permalink
import kong's helm chart
Browse files Browse the repository at this point in the history
Kong's Helm chart is copied over from github.com/helm/charts repository
at version 0.36.5.

The kong chart in `helm/chart` repo is now considered deprecated.
  • Loading branch information
hbagdi committed Jan 14, 2020
1 parent 45b7e52 commit 4c02fac
Show file tree
Hide file tree
Showing 38 changed files with 3,342 additions and 0 deletions.
22 changes: 22 additions & 0 deletions charts/kong/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
OWNERS
14 changes: 14 additions & 0 deletions charts/kong/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
description: The Cloud-Native Ingress and API-management
engine: gotpl
home: https://konghq.com/
icon: https://s3.amazonaws.com/downloads.kong/universe/assets/icon-kong-inc-large.png
maintainers:
- name: shashiranjan84
email: [email protected]
- name: hbagdi
email: [email protected]
name: kong
sources:
version: 0.36.5
appVersion: 1.4
32 changes: 32 additions & 0 deletions charts/kong/FAQs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Frequently Asked Questions (FAQs)

#### Kong fails to start after `helm upgrade` when Postgres is used. What do I do?

You may be running into this issue: https://github.com/helm/charts/issues/12575.
This issue is caused due to: https://github.com/helm/helm/issues/3053.

The problem that happens is that Postgres database has the old password but
the new secret has a different password, which is used by Kong, and password
based authentication fails.

The solution to the problem is to specify a password to the `postgresql` chart.
This is to ensure that the password is not generated randomly but is set to
the same one that is user-provided on each upgrade.

#### Kong fails to start on a fresh installation with Postgres. What do I do?

Please make sure that there is no `PersistentVolumes` present from a previous
release. If there are, it can lead to data or passwords being out of sync
and result in connection issues.

A simple way to find out is to use the following command:

```
kubectl get pv -n <your-namespace>
```

And then based on the `AGE` column, determine if you have an old volume.
If you do, then please delete the release, delete the volume, and then
do a fresh installation. PersistentVolumes can remain in the cluster even if
you delete the namespace itself (the namespace in which they were present).

8 changes: 8 additions & 0 deletions charts/kong/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
approvers:
- hbagdi
- shashiranjan84
- rainest
reviewers:
- hbagdi
- shashiranjan84
- rainest
733 changes: 733 additions & 0 deletions charts/kong/README.md

Large diffs are not rendered by default.

Binary file added charts/kong/charts/postgresql-8.1.2.tgz
Binary file not shown.
3 changes: 3 additions & 0 deletions charts/kong/ci/default-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# install chart with default values
proxy:
type: NodePort
28 changes: 28 additions & 0 deletions charts/kong/ci/test1-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This tests the following unrealted aspects of Ingress Controller
# - ingressController deploys without a database (default)
ingressController:
enabled: true
# - webhook is enabled and deploys
admissionWebhook:
enabled: true
# - environment variables can be injected into ingress controller container
env:
kong_admin_header: "foo:bar"
# - podSecurityPolicies are enabled
podSecurityPolicy:
enabled: true
# - ingress resources are created with hosts
admin:
type: NodePort
ingress:
enabled: true
hosts: ["test.com", "test2.com"]
annotations: {}
path: /
proxy:
type: NodePort
ingress:
enabled: true
hosts: ["test.com", "test2.com"]
annotations: {}
path: /
37 changes: 37 additions & 0 deletions charts/kong/ci/test2-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This tests the following unrealted aspects of Ingress Controller
# - ingressController deploys with a database
ingressController:
enabled: true
postgresql:
enabled: true
postgresqlUsername: kong
postgresqlDatabase: kong
service:
port: 5432
env:
database: "postgres"
# - ingress resources are created without hosts
admin:
type: NodePort
ingress:
enabled: true
hosts: []
path: /
proxy:
type: NodePort
ingress:
enabled: true
hosts: []
annotations: {}
path: /
useTLS: true

# - PDB is enabled
podDisruptionBudget:
enabled: true
# update strategy
updateStrategy:
type: "RollingUpdate"
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
28 changes: 28 additions & 0 deletions charts/kong/ci/test3-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# CI test for testing dbless deployment without ingress controllers
# - disable ingress controller
ingressController:
enabled: false
# - disable DB for kong
env:
database: "off"
postgresql:
enabled: false
# - supply DBless config for kong
dblessConfig:
# Or the configuration is passed in full-text below
config:
_format_version: "1.1"
services:
- name: test-svc
url: http://example.com
routes:
- name: test
paths:
- /test
plugins:
- name: request-termination
config:
status_code: 200
message: "dbless-config"
proxy:
type: NodePort
6 changes: 6 additions & 0 deletions charts/kong/requirements.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: postgresql
repository: https://kubernetes-charts.storage.googleapis.com/
version: 8.1.2
digest: sha256:c4bf54db60c2c5953ba7b79ce4814f8b8225d04e932868bcfab23b93c05b0f7f
generated: "2019-12-31T13:58:27.104134475-08:00"
5 changes: 5 additions & 0 deletions charts/kong/requirements.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
dependencies:
- name: postgresql
version: ~8.1.0
repository: https://kubernetes-charts.storage.googleapis.com/
condition: postgresql.enabled
16 changes: 16 additions & 0 deletions charts/kong/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
To connect to Kong, please execute the following command


{{- if contains "LoadBalancer" .Values.proxy.type }}
HOST=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "kong.fullname" . }}-proxy -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
PORT=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "kong.fullname" . }}-proxy -o jsonpath='{.spec.ports[0].port}')
{{- else if contains "NodePort" .Values.proxy.type -}}
HOST=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath='{.items[0].status.addresses[0].address}')
PORT=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "kong.fullname" . }}-proxy -o jsonpath='{.spec.ports[0].nodePort}')
{{- end -}}
export PROXY_IP=${HOST}:${PORT}
curl $PROXY_IP

Once installed, please follow along the getting started guide to start using Kong:
https://bit.ly/k4k8s-get-started

Loading

0 comments on commit 4c02fac

Please sign in to comment.