Skip to content

Commit

Permalink
Merge pull request Kong#233 from Kong/next
Browse files Browse the repository at this point in the history
[kong] release 1.12.0

#### What this PR does / why we need it:
Releases Kong 1.12.0.

#### Special notes for your reviewer:
We had some issues with history when releasing 1.11.

For 1.12 and onward, the plan is is to use a merge commit for this PR (the release to main), and then merge main into next.
  • Loading branch information
mflendrich authored Nov 18, 2020
2 parents 19b5ebe + 542749d commit 6a3bc7c
Show file tree
Hide file tree
Showing 14 changed files with 122 additions and 32 deletions.
23 changes: 23 additions & 0 deletions charts/kong/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,29 @@

## 1.11.0

### Improvements

* Increased default worker count to 2 to avoid issues with latency during
blocking tasks, such as DB-less config updates. This change increases memory
usage, but the increase should not be a concern for any but the smallest
deployments (deployments with memory limits below 512MB).
* Updated default Kong version to 2.2.
([#221](https://github.com/Kong/charts/pull/221))
* Updated default Kong Enterprise version to 2.1.4.1.
* Added a means to mount extra ConfigMap and Secret resources.
([#208](https://github.com/Kong/charts/pull/208))
* Added configurable annotations for migration Jobs.
([#219](https://github.com/Kong/charts/pull/219))
* Added template for deprecation warnings to automate formatting and avoid
excess newlines.

### Fixed

* Upgrades no longer force auto-scaling Deployments back to the replica count.
([#222](https://github.com/Kong/charts/pull/222))

## 1.11.0

### Breaking changes

* Kong Ingress Controller 1.0 removes support for several deprecated flags and
Expand Down
4 changes: 2 additions & 2 deletions charts/kong/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ maintainers:
email: [email protected]
name: kong
sources:
version: 1.11.0
appVersion: 2.1
version: 1.12.0
appVersion: 2.2
8 changes: 6 additions & 2 deletions charts/kong/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -463,12 +463,13 @@ directory.
| image.tag | Kong image version | `2.0` |
| image.pullPolicy | Image pull policy | `IfNotPresent` |
| image.pullSecrets | Image pull secrets | `null` |
| replicaCount | Kong instance count | `1` |
| replicaCount | Kong instance count. It has no effect when `autoscaling.enabled` is set to true | `1` |
| plugins | Install custom plugins into Kong via ConfigMaps or Secrets | `{}` |
| env | Additional [Kong configurations](https://getkong.org/docs/latest/configuration/) | |
| migrations.preUpgrade | Run "kong migrations up" jobs | `true` |
| migrations.postUpgrade | Run "kong migrations finish" jobs | `true` |
| migrations.annotations | Annotations for migration jobs | `{"sidecar.istio.io/inject": "false", "kuma.io/sidecar-injection": "disabled"}` |
| migrations.annotations | Annotations for migration job pods | `{"sidecar.istio.io/inject": "false", "kuma.io/sidecar-injection": "disabled"}` |
| migrations.jobAnnotations | Additional annotations for migration jobs | `{}` |
| waitImage.repository | Image used to wait for database to become ready | `bash` |
| waitImage.tag | Tag for image used to wait for database to become ready | `5` |
| waitImage.pullPolicy | Wait image pull policy | `IfNotPresent` |
Expand Down Expand Up @@ -609,6 +610,9 @@ For a complete list of all configuration values you can set in the
| serviceMonitor.namespace | Where to create ServiceMonitor | |
| serviceMonitor.labels | ServiceMonitor labels | `{}` |
| serviceMonitor.targetLabels | ServiceMonitor targetLabels | `{}` |
| extraConfigMaps | ConfigMaps to add to mounted volumes | `[]` |
| extraSecrets | Secrets to add to mounted volumes | `[]` |


#### The `env` section

Expand Down
Binary file added charts/kong/charts/postgresql-8.6.8.tgz
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

image:
repository: kong-docker-kong-enterprise-edition-docker.bintray.io/kong-enterprise-edition
tag: 2.1.3.0-alpine
tag: 2.1.4.1-alpine
pullSecrets:
# CHANGEME: https://github.com/Kong/charts/blob/main/charts/kong/README.md#kong-enterprise-docker-registry-access
- kong-enterprise-edition-docker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

image:
repository: kong-docker-kong-enterprise-edition-docker.bintray.io/kong-enterprise-edition
tag: 2.1.3.0-alpine
tag: 2.1.4.1-alpine
pullSecrets:
# CHANGEME: https://github.com/Kong/charts/blob/main/charts/kong/README.md#kong-enterprise-docker-registry-access
- kong-enterprise-edition-docker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

image:
repository: kong-docker-kong-enterprise-edition-docker.bintray.io/kong-enterprise-edition
tag: 2.1.3.0-alpine
tag: 2.1.4.1-alpine

pullSecrets:
# CHANGEME: https://github.com/Kong/charts/blob/master/charts/kong/README.md#kong-enterprise-docker-registry-access
Expand Down
33 changes: 15 additions & 18 deletions charts/kong/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,20 @@ curl $PROXY_IP
Once installed, please follow along the getting started guide to start using
Kong: https://bit.ly/k4k8s-get-started

{{ if and (.Values.enterprise.portal.enabled) (or (.Values.enterprise.portal.portal_auth) (.Values.enterprise.portal.session_conf_secret)) -}} {{/* Legacy Portal auth handling */}}
/!\ WARNING: You are currently using legacy Portal authentication configuration
in values.yaml. Support for this will be removed in a future release. Please
see the upgrade guide for instructions to update your configuration:
https://github.com/Kong/charts/blob/main/charts/kong/UPGRADE.md#removal-of-dedicated-portal-authentication-configuration-parameters
{{- end }}
{{ $warnings := list -}}

{{ if .Values.admin.containerPort -}} {{/* Legacy admin API listen */}}
/!\ WARNING: You are currently using legacy admin API configuration in
values.yaml. Support for this will be removed in a future release. Please see
the upgrade guide for instructions to update your configuration:
https://github.com/Kong/charts/blob/main/charts/kong/UPGRADE.md#changes-to-kong-service-configuration
{{- end }}
{{- if and (.Values.enterprise.portal.enabled) (or (.Values.enterprise.portal.portal_auth) (.Values.enterprise.portal.session_conf_secret)) -}}
{{/* Legacy Portal auth handling */}}
{{- $warnings = append $warnings "You are currently using legacy Portal authentication configuration in values.yaml. Support for this will be removed in a future release. Please see the upgrade guide for instructions to update your configuration: https://github.com/Kong/charts/blob/main/charts/kong/UPGRADE.md#removal-of-dedicated-portal-authentication-configuration-parameters" -}}
{{- end -}}

{{ if .Values.runMigrations -}} {{/* Legacy migration toggle */}}
/!\ WARNING: You are currently using the legacy runMigrations setting in
values.yaml. Support for this will be removed in a future release. Please see
the upgrade guide for instructions to update your configuration:
https://github.com/Kong/charts/blob/main/charts/kong/UPGRADE.md#changes-to-migration job-configuration
{{- end }}
{{- if .Values.admin.containerPort -}}
{{/* Legacy admin API listen */}}
{{- $warnings = append $warnings "You are currently using legacy admin API configuration in values.yaml. Support for this will be removed in a future release. Please see the upgrade guide for instructions to update your configuration: https://github.com/Kong/charts/blob/main/charts/kong/UPGRADE.md#changes-to-kong-service-configuration" -}}
{{- end -}}

{{- if .Values.runMigrations -}}
{{/* Legacy migration toggle */}}
{{- $warnings = append $warnings "You are currently using the legacy runMigrations setting in values.yaml. Support for this will be removed in a future release. Please see the upgrade guide for instructions to update your configuration: https://github.com/Kong/charts/blob/main/charts/kong/UPGRADE.md#changes-to-migration job-configuration" -}}
{{- end -}}
{{- include "kong.deprecation-warnings" $warnings -}}
38 changes: 38 additions & 0 deletions charts/kong/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,16 @@ The name of the service used for the ingress controller's validation webhook
secret:
secretName: {{ . }}
{{- end }}
{{- range .Values.extraConfigMaps }}
- name: {{ .name }}
configMap:
name: {{ .name }}
{{- end }}
{{- range .Values.extraSecrets }}
- name: {{ .name }}
secret:
secretName: {{ .name }}
{{- end }}
{{- end -}}
{{- define "kong.volumeMounts" -}}
Expand Down Expand Up @@ -332,6 +342,24 @@ The name of the service used for the ingress controller's validation webhook
readOnly: true
{{- end }}
{{- end }}
{{- range .Values.extraConfigMaps }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
{{- if .subPath }}
subPath: {{ .subPath }}
{{- end }}
{{- end }}
{{- range .Values.extraSecrets }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
{{- if .subPath }}
subPath: {{ .subPath }}
{{- end }}
{{- end }}
{{- end -}}
{{- define "kong.plugins" -}}
Expand Down Expand Up @@ -633,3 +661,13 @@ Environment variables are sorted alphabetically
- name: {{ template "kong.fullname" . }}-bash-wait-for-postgres
mountPath: /wait_postgres
{{- end -}}
{{- define "kong.deprecation-warnings" -}}
{{- $warnings := list -}}
{{- range $warning := . }}
{{- $warnings = append $warnings (wrap 80 (printf "WARNING: %s" $warning)) -}}
{{- $warnings = append $warnings "\n\n" -}}
{{- end -}}
{{- $warningString := ($warnings | join "") -}}
{{- $warningString -}}
{{- end -}}
2 changes: 2 additions & 0 deletions charts/kong/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ metadata:
{{- end }}
{{- end }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "kong.selectorLabels" . | nindent 6 }}
Expand Down
3 changes: 3 additions & 0 deletions charts/kong/templates/migrations-post-upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ metadata:
annotations:
helm.sh/hook: "post-upgrade"
helm.sh/hook-delete-policy: "before-hook-creation"
{{- range $key, $value := .Values.migrations.jobAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
template:
metadata:
Expand Down
3 changes: 3 additions & 0 deletions charts/kong/templates/migrations-pre-upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ metadata:
annotations:
helm.sh/hook: "pre-upgrade"
helm.sh/hook-delete-policy: "before-hook-creation"
{{- range $key, $value := .Values.migrations.jobAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
template:
metadata:
Expand Down
3 changes: 3 additions & 0 deletions charts/kong/templates/migrations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ metadata:
labels:
{{- include "kong.metaLabels" . | nindent 4 }}
app.kubernetes.io/component: init-migrations
{{- range $key, $value := .Values.migrations.jobAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
template:
metadata:
Expand Down
31 changes: 24 additions & 7 deletions charts/kong/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ deployment:
# is set below. In general, you should not set values here if they are set elsewhere.
env:
database: "off"
nginx_worker_processes: "1"
nginx_worker_processes: "2"
proxy_access_log: /dev/stdout
admin_access_log: /dev/stdout
admin_gui_access_log: /dev/stdout
Expand All @@ -53,10 +53,10 @@ env:
# Specify Kong's Docker image and repository details here
image:
repository: kong
tag: "2.1"
tag: "2.2"
# Kong Enterprise
# repository: kong-docker-kong-enterprise-edition-docker.bintray.io/kong-enterprise-edition
# tag: "2.1.3.0-alpine"
# tag: "2.1.4.1-alpine"

pullPolicy: IfNotPresent
## Optionally specify an array of imagePullSecrets.
Expand Down Expand Up @@ -268,12 +268,16 @@ migrations:
preUpgrade: true
# Enable post-upgrade migrations (run "kong migrations finish")
postUpgrade: true
# Annotations to apply to migrations jobs
# Annotations to apply to migrations job pods
# By default, these disable service mesh sidecar injection for Istio and Kuma,
# as the sidecar containers do not terminate and prevent the jobs from completing
annotations:
sidecar.istio.io/inject: false
kuma.io/sidecar-injection: "disabled"
# Additional annotations to apply to migration jobs
# This is helpful in certain non-Helm installation situations such as GitOps
# where additional control is required around this job creation.
jobAnnotations: {}

# Kong's configuration for DB-less mode
# Note: Use this section only if you are deploying Kong in DB-less mode
Expand Down Expand Up @@ -411,10 +415,10 @@ updateStrategy: {}
resources: {}
# limits:
# cpu: 100m
# memory: 128Mi
# memory: 256Mi
# requests:
# cpu: 100m
# memory: 128Mi
# memory: 256Mi

# readinessProbe for Kong pods
# If using Kong Enterprise with RBAC, you must add a Kong-Admin-Token header
Expand Down Expand Up @@ -466,7 +470,8 @@ podAnnotations: {}
# Labels to be added to Kong pods
podLabels: {}

# Kong pod count
# Kong pod count.
# It has no effect when autoscaling.enabled is set to true
replicaCount: 1

# Annotations to be added to Kong deployment
Expand Down Expand Up @@ -736,3 +741,15 @@ clustertelemetry:
type: ClusterIP

externalIPs: []

extraConfigMaps: []
# extraConfigMaps:
# - name: my-config-map
# mountPath: /mount/to/my/location
# subPath: my-subpath # Optional, if you wish to mount a single key and not the entire ConfigMap

extraSecrets: []
# extraSecrets:
# - name: my-secret
# mountPath: /mount/to/my/location
# subPath: my-subpath # Optional, if you wish to mount a single key and not the entire ConfigMap

0 comments on commit 6a3bc7c

Please sign in to comment.