From b46e5fb4f93c73a7dd66b7f77dae9699ca074491 Mon Sep 17 00:00:00 2001 From: khaikong <59985385+khaikong@users.noreply.github.com> Date: Tue, 23 Mar 2021 01:50:14 +0800 Subject: [PATCH 01/11] [kong] add user volumes and initContainers (#317) Add initContainers, userDefinedVolumes, and userDefinedVolumeMounts settings to the deployment section of values.yaml. These allow users to define additional init containers, volumes, and mounts for the Kong Deployment. They contain YAML blobs that are injected under the appropriate Deployment section. --- charts/kong/README.md | 18 ++++++++++++++++++ charts/kong/ci/test3-values.yaml | 21 +++++++++++++++++++++ charts/kong/templates/_helpers.tpl | 13 +++++++++++++ charts/kong/templates/deployment.yaml | 11 +++++++++-- charts/kong/values.yaml | 9 +++++++++ 5 files changed, 70 insertions(+), 2 deletions(-) diff --git a/charts/kong/README.md b/charts/kong/README.md index d3804f9d6..29013e288 100644 --- a/charts/kong/README.md +++ b/charts/kong/README.md @@ -32,7 +32,10 @@ $ helm install kong/kong --generate-name - [Standalone controller nodes](#standalone-controller-nodes) - [Hybrid mode](#hybrid-mode) - [CRD management](#crd-management) + - [InitContainers](#initContainers) - [Sidecar containers](#sidecar-containers) + - [User Defined Volumes](#user-defined-volumes) + - [User Defined Volume Mounts](#user-defined-volume-mounts) - [Example configurations](#example-configurations) - [Configuration](#configuration) - [Kong Parameters](#kong-parameters) @@ -426,6 +429,10 @@ you do (your resources will have a `meta.helm.sh/release-name` annotation), we _strongly_ recommend that you back up all associated custom resources in the event you need to recover from unintended CRD deletion. +### InitContainers + +The chart able to deploy initcontainers along with Kong. This can be very useful when require to setup additional custom initialization. The `deployment.initcontainers` field in values.yaml takes an array of objects that get appended as-is to the existing `spec.template.initContainers` array in the kong deployment resource. + ### Sidecar Containers The chart can deploy additional containers along with the Kong and Ingress @@ -435,6 +442,14 @@ be useful to include network proxies or logging services along with Kong. The that get appended as-is to the existing `spec.template.spec.containers` array in the Kong deployment resource. +### User Defined Volumes + +The chart can deploy additional volumes along with Kong. This can be useful to include additional volumes which required during iniatilization phase (InitContainer). The `deployment.userDefinedVolumes` field in values.yaml takes an array of objects that get appended as-is to the existing `spec.template.spec.volumes` array in the kong deployment resource. + +### User Defined Volume Mounts + +The chart can mount the volumes which defined in the `user defined volume` or others. The `deployment.userDefinedVolumeMounts` field in values.yaml takes an array of object that get appended as-is to the existing `spec.template.spec.containers[].volumeMounts` and `spec.template.spec.initContainers[].volumeMounts` array in the kong deployment resource. + ### Example configurations Several example values.yaml are available in the @@ -572,6 +587,9 @@ For a complete list of all configuration values you can set in the | ---------------------------------- | ------------------------------------------------------------------------------------- | ------------------- | | namespace | Namespace to deploy chart resources | | | deployment.kong.enabled | Enable or disable deploying Kong | `true` | +| deployment.initContainers | Create initContainers. Please go to Kubernetes doc for the spec of the initContainers | | +| deployment.userDefinedVolumes | Create volumes. Please go to Kubernetes doc for the spec of the volumes | | +| deployment.userDefinedVolumeMounts | Create volumeMounts. Please go to Kubernetes doc for the spec of the volumeMounts | | | autoscaling.enabled | Set this to `true` to enable autoscaling | `false` | | autoscaling.minReplicas | Set minimum number of replicas | `2` | | autoscaling.maxReplicas | Set maximum number of replicas | `5` | diff --git a/charts/kong/ci/test3-values.yaml b/charts/kong/ci/test3-values.yaml index 1e344c3ec..307933d43 100644 --- a/charts/kong/ci/test3-values.yaml +++ b/charts/kong/ci/test3-values.yaml @@ -28,3 +28,24 @@ dblessConfig: message: "dbless-config" proxy: type: NodePort +deployment: + initContainers: + - name: "bash" + image: "bash:latest" + command: ["/bin/sh", "-c", "true"] + resources: + limits: + cpu: "100m" + memory: "64Mi" + requests: + cpu: "100m" + memory: "64Mi" + volumeMounts: + - name: "tmpdir" + mountPath: "/opt/tmp" + userDefinedVolumes: + - name: "tmpdir" + emptyDir: {} + userDefinedVolumeMounts: + - name: "tmpdir" + mountPath: "/opt/tmp" diff --git a/charts/kong/templates/_helpers.tpl b/charts/kong/templates/_helpers.tpl index 0ea629acc..1246e5d84 100644 --- a/charts/kong/templates/_helpers.tpl +++ b/charts/kong/templates/_helpers.tpl @@ -355,6 +355,12 @@ The name of the service used for the ingress controller's validation webhook {{- end -}} +{{- define "kong.userDefinedVolumes" -}} +{{- if .Values.deployment.userDefinedVolumes }} +{{- toYaml .Values.deployment.userDefinedVolumes }} +{{- end }} +{{- end -}} + {{- define "kong.volumes" -}} - name: {{ template "kong.fullname" . }}-prefix-dir emptyDir: {} @@ -417,6 +423,12 @@ The name of the service used for the ingress controller's validation webhook {{- end }} {{- end -}} +{{- define "kong.userDefinedVolumeMounts" -}} +{{- if .Values.deployment.userDefinedVolumeMounts }} +{{- toYaml .Values.deployment.userDefinedVolumeMounts }} +{{- end }} +{{- end -}} + {{- define "kong.volumeMounts" -}} - name: {{ template "kong.fullname" . }}-prefix-dir mountPath: /kong_prefix/ @@ -495,6 +507,7 @@ The name of the service used for the ingress controller's validation webhook command: [ "/bin/sh", "-c", "until kong start; do echo 'waiting for db'; sleep 1; done; kong stop; rm -fv {{ $sockFile | squote }}"] volumeMounts: {{- include "kong.volumeMounts" . | nindent 4 }} + {{- include "kong.userDefinedVolumeMounts" . | nindent 4 }} resources: {{- toYaml .Values.resources | nindent 4 }} {{- end -}} diff --git a/charts/kong/templates/deployment.yaml b/charts/kong/templates/deployment.yaml index be2825930..8be3b06d4 100644 --- a/charts/kong/templates/deployment.yaml +++ b/charts/kong/templates/deployment.yaml @@ -57,9 +57,14 @@ spec: - name: {{ . }} {{- end }} {{- end }} - {{- if (and (not (eq .Values.env.database "off")) .Values.waitImage.enabled) }} + {{- if (or (and (not (eq .Values.env.database "off")) .Values.waitImage.enabled) .Values.deployment.initContainers) }} initContainers: - {{- include "kong.wait-for-db" . | nindent 6 }} + {{- if .Values.deployment.initContainers }} + {{- toYaml .Values.deployment.initContainers | nindent 6 }} + {{- end }} + {{- if (and (not (eq .Values.env.database "off")) .Values.waitImage.enabled) }} + {{- include "kong.wait-for-db" . | nindent 6 }} + {{- end }} {{- end }} containers: {{- if .Values.ingressController.enabled }} @@ -206,6 +211,7 @@ spec: {{- end }} volumeMounts: {{- include "kong.volumeMounts" . | nindent 10 }} + {{- include "kong.userDefinedVolumeMounts" . | nindent 10 }} readinessProbe: {{ toYaml .Values.readinessProbe | indent 10 }} livenessProbe: @@ -232,4 +238,5 @@ spec: {{ toYaml .Values.tolerations | indent 8 }} volumes: {{- include "kong.volumes" . | nindent 8 -}} + {{- include "kong.userDefinedVolumes" . | nindent 8 -}} {{- end }} diff --git a/charts/kong/values.yaml b/charts/kong/values.yaml index 3ff74ddd5..3f7d12ba5 100644 --- a/charts/kong/values.yaml +++ b/charts/kong/values.yaml @@ -24,6 +24,15 @@ deployment: # sidecarContainers: # - name: sidecar # image: sidecar:latest + # initContainers: + # - name: initcon + # image: initcon:latest + # userDefinedVolumes: + # - name: "volumeName" + # emptyDir: {} + # userDefinedVolumeMounts: + # - name: "volumeName" + # mountPath: "/opt/user/dir/mount" # Override namepsace for Kong chart resources. By default, the chart creates resources in the release namespace. # This may not be desirable when using this chart as a dependency. From 6f2f42c8d48f9c1fc84746c85029574631795cd7 Mon Sep 17 00:00:00 2001 From: David ALEXANDRE Date: Mon, 12 Apr 2021 21:32:29 +0200 Subject: [PATCH 02/11] [kong] add toleration in migration job Signed-off-by: David ALEXANDRE --- charts/kong/templates/migrations-post-upgrade.yaml | 4 ++++ charts/kong/templates/migrations-pre-upgrade.yaml | 4 ++++ charts/kong/templates/migrations.yaml | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/charts/kong/templates/migrations-post-upgrade.yaml b/charts/kong/templates/migrations-post-upgrade.yaml index 25be0d086..76fb2f44f 100644 --- a/charts/kong/templates/migrations-post-upgrade.yaml +++ b/charts/kong/templates/migrations-post-upgrade.yaml @@ -60,6 +60,10 @@ spec: nodeSelector: {{- toYaml .Values.nodeSelector | nindent 8 }} {{- end }} + {{- if .Values.tolerations }} + tolerations: + {{- toYaml .Values.tolerations | nindent 8 }} + {{- end }} restartPolicy: OnFailure volumes: {{- include "kong.volumes" . | nindent 6 -}} diff --git a/charts/kong/templates/migrations-pre-upgrade.yaml b/charts/kong/templates/migrations-pre-upgrade.yaml index 9273becdf..ee10d8202 100644 --- a/charts/kong/templates/migrations-pre-upgrade.yaml +++ b/charts/kong/templates/migrations-pre-upgrade.yaml @@ -60,6 +60,10 @@ spec: nodeSelector: {{- toYaml .Values.nodeSelector | nindent 8 }} {{- end }} + {{- if .Values.tolerations }} + tolerations: + {{- toYaml .Values.tolerations | nindent 8 }} + {{- end }} restartPolicy: OnFailure volumes: {{- include "kong.volumes" . | nindent 6 -}} diff --git a/charts/kong/templates/migrations.yaml b/charts/kong/templates/migrations.yaml index 093fadea1..824a62af6 100644 --- a/charts/kong/templates/migrations.yaml +++ b/charts/kong/templates/migrations.yaml @@ -68,6 +68,10 @@ spec: nodeSelector: {{- toYaml .Values.nodeSelector | nindent 8 }} {{- end }} + {{- if .Values.tolerations }} + tolerations: + {{- toYaml .Values.tolerations | nindent 8 }} + {{- end }} restartPolicy: OnFailure volumes: {{- include "kong.volumes" . | nindent 6 -}} From c83b951527525f1ab0f1af7ec9aee47a8781c734 Mon Sep 17 00:00:00 2001 From: Travis Raines Date: Tue, 13 Apr 2021 13:28:00 -0700 Subject: [PATCH 03/11] [kong] use a string for the appVersion --- charts/kong/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/kong/Chart.yaml b/charts/kong/Chart.yaml index e3cb2b7e0..fbe465303 100644 --- a/charts/kong/Chart.yaml +++ b/charts/kong/Chart.yaml @@ -11,4 +11,4 @@ maintainers: name: kong sources: version: 2.0.0 -appVersion: 2.3 +appVersion: "2.3" From b5920d84be151c61127c67903c3ffbb9ff1aca20 Mon Sep 17 00:00:00 2001 From: Travis Raines Date: Tue, 13 Apr 2021 13:46:29 -0700 Subject: [PATCH 04/11] [repo] fix ct lint version check arg This particular argument doesn't work unless you use an equals sign. Compare: $ ct lint --check-version-increment=false | grep CheckVers CheckVersionIncrement: false $ ct lint --check-version-increment false | grep CheckVers CheckVersionIncrement: true --- .github/workflows/non-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/non-main.yaml b/.github/workflows/non-main.yaml index 27c9044be..e9a7fc973 100644 --- a/.github/workflows/non-main.yaml +++ b/.github/workflows/non-main.yaml @@ -39,7 +39,7 @@ jobs: fi - name: Run chart-testing (lint) - run: ct lint --chart-repos bitnami=https://charts.bitnami.com/bitnami --check-version-increment false --remote origin + run: ct lint --chart-repos bitnami=https://charts.bitnami.com/bitnami --check-version-increment=false --remote origin - name: Create kind cluster uses: helm/kind-action@v1.0.0 From bd22a1ac0dbd1ba1bbbc39730968cf18a56f9aaf Mon Sep 17 00:00:00 2001 From: Travis Raines Date: Tue, 13 Apr 2021 14:03:15 -0700 Subject: [PATCH 05/11] [repo] set target branches for CT lint CT defaults to master regardless of the repo default branch. We want to compare against main or next depending on the context. --- .github/workflows/main.yaml | 2 +- .github/workflows/non-main.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index d4759e74d..bcbae0225 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -35,7 +35,7 @@ jobs: fi - name: Run chart-testing (lint) - run: ct lint --chart-repos bitnami=https://charts.bitnami.com/bitnami --remote origin + run: ct lint --chart-repos bitnami=https://charts.bitnami.com/bitnami --remote origin --target-branch main - name: Create kind cluster uses: helm/kind-action@v1.0.0 diff --git a/.github/workflows/non-main.yaml b/.github/workflows/non-main.yaml index e9a7fc973..828c4661c 100644 --- a/.github/workflows/non-main.yaml +++ b/.github/workflows/non-main.yaml @@ -39,7 +39,7 @@ jobs: fi - name: Run chart-testing (lint) - run: ct lint --chart-repos bitnami=https://charts.bitnami.com/bitnami --check-version-increment=false --remote origin + run: ct lint --chart-repos bitnami=https://charts.bitnami.com/bitnami --check-version-increment=false --remote origin --target-branch next - name: Create kind cluster uses: helm/kind-action@v1.0.0 From 474d9e020be34b9aff7320e74c9b8e8da6433795 Mon Sep 17 00:00:00 2001 From: Shane Utt Date: Wed, 14 Apr 2021 20:09:30 -0400 Subject: [PATCH 06/11] [kong] add a note to serviceMonitor (#345) Sometimes `values.yaml` fields can be slightly misleading, in this case setting `serviceMonitor.enabled=true` doesn't inherently place the label for all components (such as the admin api) and it may not be intuitive that several other configurations must be updated in order to achieve that. As such this commit adds some helper text and a link to the README to provide some hints, and more context. Co-authored-by: Travis Raines --- charts/kong/values.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/charts/kong/values.yaml b/charts/kong/values.yaml index 2909ab3ba..39c320525 100644 --- a/charts/kong/values.yaml +++ b/charts/kong/values.yaml @@ -582,6 +582,8 @@ securityContext: {} serviceMonitor: # Specifies whether ServiceMonitor for Prometheus operator should be created + # If you wish to gather metrics from a Kong instance with the proxy disabled (such as a hybrid control plane), see: + # https://github.com/Kong/charts/blob/main/charts/kong/README.md#prometheus-operator-integration enabled: false # interval: 10s # Specifies namespace, where ServiceMonitor should be installed From 220cfef35eeb38f0c6225856ea2fbe69dd8a2da8 Mon Sep 17 00:00:00 2001 From: Travis Raines Date: Thu, 15 Apr 2021 12:04:19 -0700 Subject: [PATCH 07/11] [repo] add CT arguments to install also (#344) Copy the common arguments used in lint to the ct install command also. They shouldn't differ. --- .github/workflows/main.yaml | 6 ++++-- .github/workflows/non-main.yaml | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index bcbae0225..eb17b670d 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -7,6 +7,8 @@ on: jobs: lint-test: + env: + COMMON_CT_ARGS: "--chart-repos bitnami=https://charts.bitnami.com/bitnami --remote origin --target-branch main" runs-on: ubuntu-latest steps: - name: Checkout @@ -35,14 +37,14 @@ jobs: fi - name: Run chart-testing (lint) - run: ct lint --chart-repos bitnami=https://charts.bitnami.com/bitnami --remote origin --target-branch main + run: ct lint $COMMON_CT_ARGS - name: Create kind cluster uses: helm/kind-action@v1.0.0 if: steps.list-changed.outputs.changed == 'true' - name: Run chart-testing (install) - run: ct install + run: ct install $COMMON_CT_ARGS release: needs: lint-test runs-on: ubuntu-latest diff --git a/.github/workflows/non-main.yaml b/.github/workflows/non-main.yaml index 828c4661c..74ef9261c 100644 --- a/.github/workflows/non-main.yaml +++ b/.github/workflows/non-main.yaml @@ -11,6 +11,8 @@ on: jobs: lint-test: + env: + COMMON_CT_ARGS: "--chart-repos bitnami=https://charts.bitnami.com/bitnami --remote origin --target-branch next" runs-on: ubuntu-latest steps: - name: Checkout @@ -39,11 +41,11 @@ jobs: fi - name: Run chart-testing (lint) - run: ct lint --chart-repos bitnami=https://charts.bitnami.com/bitnami --check-version-increment=false --remote origin --target-branch next + run: ct lint $COMMON_CT_ARGS --check-version-increment=false - name: Create kind cluster uses: helm/kind-action@v1.0.0 if: steps.list-changed.outputs.changed == 'true' - name: Run chart-testing (install) - run: ct install + run: ct install $COMMON_CT_ARGS From 1a083e7a07d300359b201e60b9e6e36e38c92e75 Mon Sep 17 00:00:00 2001 From: Travis Raines Date: Tue, 20 Apr 2021 10:17:58 -0700 Subject: [PATCH 08/11] [kong] add support for DaemonSets (#347) Add a toggle to use a DaemonSet controller for Kong. If the controller is a DaemonSet, use an "updateStrategy" header for the updateStrategy value. If it is a Deployment, use "strategy". DaemonSet and Deployment controllers have similar, but subtly different specs. This section has a similar purpose in each, but is named differently. The contents of this section are entirely user-provided, so the template doesn't need to handle anything beyond the difference in name. Somewhat confusingly, though the chart originally supported Deployments only, the value was always named "updateStrategy", even though the correct section name for Deployments is "strategy". Co-authored-by: arjsrira --- charts/kong/README.md | 9 +++++++++ charts/kong/templates/deployment.yaml | 10 ++++++++++ charts/kong/values.yaml | 2 ++ 3 files changed, 21 insertions(+) diff --git a/charts/kong/README.md b/charts/kong/README.md index 29013e288..202dad886 100644 --- a/charts/kong/README.md +++ b/charts/kong/README.md @@ -36,6 +36,7 @@ $ helm install kong/kong --generate-name - [Sidecar containers](#sidecar-containers) - [User Defined Volumes](#user-defined-volumes) - [User Defined Volume Mounts](#user-defined-volume-mounts) + - [Using a DaemonSet](#using-a-daemonset) - [Example configurations](#example-configurations) - [Configuration](#configuration) - [Kong Parameters](#kong-parameters) @@ -450,6 +451,13 @@ The chart can deploy additional volumes along with Kong. This can be useful to i The chart can mount the volumes which defined in the `user defined volume` or others. The `deployment.userDefinedVolumeMounts` field in values.yaml takes an array of object that get appended as-is to the existing `spec.template.spec.containers[].volumeMounts` and `spec.template.spec.initContainers[].volumeMounts` array in the kong deployment resource. +### Using a DaemonSet + +Setting `deployment.daemonset: true` deploys Kong using a [DaemonSet +controller](https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/) +instead of a Deployment controller. This runs a Kong Pod on every kubelet in +the Kubernetes cluster. + ### Example configurations Several example values.yaml are available in the @@ -588,6 +596,7 @@ For a complete list of all configuration values you can set in the | namespace | Namespace to deploy chart resources | | | deployment.kong.enabled | Enable or disable deploying Kong | `true` | | deployment.initContainers | Create initContainers. Please go to Kubernetes doc for the spec of the initContainers | | +| deployment.daemonset | Use a DaemonSet instead of a Deployment | `false` | | deployment.userDefinedVolumes | Create volumes. Please go to Kubernetes doc for the spec of the volumes | | | deployment.userDefinedVolumeMounts | Create volumeMounts. Please go to Kubernetes doc for the spec of the volumeMounts | | | autoscaling.enabled | Set this to `true` to enable autoscaling | `false` | diff --git a/charts/kong/templates/deployment.yaml b/charts/kong/templates/deployment.yaml index 8be3b06d4..35eafee67 100644 --- a/charts/kong/templates/deployment.yaml +++ b/charts/kong/templates/deployment.yaml @@ -1,6 +1,10 @@ {{- if or .Values.deployment.kong.enabled .Values.ingressController.enabled }} apiVersion: apps/v1 +{{- if .Values.deployment.daemonset }} +kind: DaemonSet +{{- else }} kind: Deployment +{{- end }} metadata: name: {{ template "kong.fullname" . }} namespace: {{ template "kong.namespace" . }} @@ -15,13 +19,19 @@ metadata: {{- end }} spec: {{- if not .Values.autoscaling.enabled }} + {{- if not .Values.deployment.daemonset }} replicas: {{ .Values.replicaCount }} {{- end }} + {{- end }} selector: matchLabels: {{- include "kong.selectorLabels" . | nindent 6 }} {{- if .Values.updateStrategy }} + {{- if .Values.deployment.daemonset }} + updateStrategy: + {{- else }} strategy: + {{- end }} {{ toYaml .Values.updateStrategy | indent 4 }} {{- end }} diff --git a/charts/kong/values.yaml b/charts/kong/values.yaml index 39c320525..e5c93d053 100644 --- a/charts/kong/values.yaml +++ b/charts/kong/values.yaml @@ -19,6 +19,8 @@ deployment: # Setting this to false with ingressController.enabled=true will create a # controller-only release. enabled: true + # Use a DaemonSet controller instead of a Deployment controller + daemonset: false ## Optionally specify any extra sidecar containers to be included in the deployment ## See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#container-v1-core # sidecarContainers: From 826fdfbc709fc866e523eee702657368392fd2c8 Mon Sep 17 00:00:00 2001 From: Travis Raines Date: Fri, 23 Apr 2021 13:29:25 -0700 Subject: [PATCH 09/11] [kong] update Docker repos and tags Replace remaining Bintray repo defaults with Docker Hub repos. Update controller default tag to 1.2.0. Update Enterprise default tag to 2.3.3.2-alpine. Update Kong default tag to 2.4. --- charts/kong/README.md | 6 +++--- charts/kong/ci/single-image-default.yaml | 4 ++-- .../example-values/full-k4k8s-with-kong-enterprise.yaml | 4 ++-- .../minimal-k4k8s-with-kong-enterprise.yaml | 4 ++-- .../example-values/minimal-kong-enterprise-dbless.yaml | 4 ++-- charts/kong/values.yaml | 8 ++++---- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/charts/kong/README.md b/charts/kong/README.md index 202dad886..2d08e99cc 100644 --- a/charts/kong/README.md +++ b/charts/kong/README.md @@ -471,7 +471,7 @@ directory. | Parameter | Description | Default | | ---------------------------------- | ------------------------------------------------------------------------------------- | ------------------- | | image.repository | Kong image | `kong` | -| image.tag | Kong image version | `2.0` | +| image.tag | Kong image version | `2.4` | | image.pullPolicy | Image pull policy | `IfNotPresent` | | image.pullSecrets | Image pull secrets | `null` | | replicaCount | Kong instance count. It has no effect when `autoscaling.enabled` is set to true | `1` | @@ -570,8 +570,8 @@ section of `values.yaml` file: | Parameter | Description | Default | | ---------------------------------- | ------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | | enabled | Deploy the ingress controller, rbac and crd | true | -| image.repository | Docker image with the ingress controller | kong-docker-kubernetes-ingress-controller.bintray.io/kong-ingress-controller | -| image.tag | Version of the ingress controller | 0.9.1 | +| image.repository | Docker image with the ingress controller | kong/kubernetes-ingress-controller | +| image.tag | Version of the ingress controller | 1.2.0 | | readinessProbe | Kong ingress controllers readiness probe | | | livenessProbe | Kong ingress controllers liveness probe | | | installCRDs | Creates managed CRDs. | false diff --git a/charts/kong/ci/single-image-default.yaml b/charts/kong/ci/single-image-default.yaml index 214eaabcb..98c9ada1f 100644 --- a/charts/kong/ci/single-image-default.yaml +++ b/charts/kong/ci/single-image-default.yaml @@ -2,7 +2,7 @@ # use single image strings instead of repository/tag image: - unifiedRepoTag: kong:2.3 + unifiedRepoTag: kong:2.4 proxy: type: NodePort @@ -12,5 +12,5 @@ ingressController: env: anonymous_reports: "false" image: - unifiedRepoTag: kong-docker-kubernetes-ingress-controller.bintray.io/kong-ingress-controller:1.1.1 + unifiedRepoTag: kong/kubernetes-ingress-controller:1.2.0 installCRDs: false diff --git a/charts/kong/example-values/full-k4k8s-with-kong-enterprise.yaml b/charts/kong/example-values/full-k4k8s-with-kong-enterprise.yaml index 4326a5e4b..359e87998 100644 --- a/charts/kong/example-values/full-k4k8s-with-kong-enterprise.yaml +++ b/charts/kong/example-values/full-k4k8s-with-kong-enterprise.yaml @@ -11,8 +11,8 @@ # the Portal and Portal API. image: - repository: kong-docker-kong-gateway-docker.bintray.io/kong-enterprise-edition - tag: "2.3.2.0-alpine" + repository: kong/kong-gateway + tag: "2.3.3.2-alpine" env: prefix: /kong_prefix/ diff --git a/charts/kong/example-values/minimal-k4k8s-with-kong-enterprise.yaml b/charts/kong/example-values/minimal-k4k8s-with-kong-enterprise.yaml index 9ec27a44d..457e0aadd 100644 --- a/charts/kong/example-values/minimal-k4k8s-with-kong-enterprise.yaml +++ b/charts/kong/example-values/minimal-k4k8s-with-kong-enterprise.yaml @@ -8,8 +8,8 @@ # kubectl port-forward deploy/your-deployment-kong 8001:8001 8002:8002 image: - repository: kong-docker-kong-gateway-docker.bintray.io/kong-enterprise-edition - tag: "2.3.2.0-alpine" + repository: kong/kong-gateway + tag: "2.3.3.2-alpine" admin: enabled: true diff --git a/charts/kong/example-values/minimal-kong-enterprise-dbless.yaml b/charts/kong/example-values/minimal-kong-enterprise-dbless.yaml index a1dd87d39..e404c11be 100644 --- a/charts/kong/example-values/minimal-kong-enterprise-dbless.yaml +++ b/charts/kong/example-values/minimal-kong-enterprise-dbless.yaml @@ -3,8 +3,8 @@ # Secrets. These Secrets must be created before installation. image: - repository: kong-docker-kong-gateway-docker.bintray.io/kong-enterprise-edition - tag: "2.3.2.0-alpine" + repository: kong/kong-gateway + tag: "2.3.3.2-alpine" enterprise: enabled: true diff --git a/charts/kong/values.yaml b/charts/kong/values.yaml index e5c93d053..dbcd3f7d2 100644 --- a/charts/kong/values.yaml +++ b/charts/kong/values.yaml @@ -68,10 +68,10 @@ env: # Specify Kong's Docker image and repository details here image: repository: kong - tag: "2.3" + tag: "2.4" # Kong Enterprise - # repository: kong-docker-kong-gateway-docker.bintray.io/kong-enterprise-edition - # tag: "2.3.2.0-alpine" + # repository: kong/kong-gateway + # tag: "2.3.3.2-alpine" pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. @@ -332,7 +332,7 @@ ingressController: enabled: true image: repository: kong/kubernetes-ingress-controller - tag: "1.1" + tag: "1.2" args: [] # Specify Kong Ingress Controller configuration via environment variables From e5329bd8fea87724adebfccbb0445b9ad99a7c54 Mon Sep 17 00:00:00 2001 From: Tony Tony Date: Tue, 27 Apr 2021 00:43:40 +0800 Subject: [PATCH 10/11] [kong] select only running pods for pdb spec (#352) --- charts/kong/templates/pdb.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/charts/kong/templates/pdb.yaml b/charts/kong/templates/pdb.yaml index 4745e1caa..b89573feb 100644 --- a/charts/kong/templates/pdb.yaml +++ b/charts/kong/templates/pdb.yaml @@ -16,4 +16,5 @@ spec: selector: matchLabels: {{- include "kong.metaLabels" . | nindent 6 }} + app.kubernetes.io/component: app {{- end }} From d0741b82685ed86bd6b4e0c5ef9cfe95df284731 Mon Sep 17 00:00:00 2001 From: Travis Raines Date: Tue, 27 Apr 2021 09:01:30 -0700 Subject: [PATCH 11/11] [kong] release 2.1.0 to next --- charts/kong/CHANGELOG.md | 21 +++++++++++++++++++++ charts/kong/Chart.yaml | 4 ++-- charts/kong/UPGRADE.md | 14 ++++++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/charts/kong/CHANGELOG.md b/charts/kong/CHANGELOG.md index b7f4963af..3345b2d61 100644 --- a/charts/kong/CHANGELOG.md +++ b/charts/kong/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +## 2.1.0 + +### Improvements + +* Added support for user-defined volumes, volume mounts, and init containers. + ([#317](https://github.com/Kong/charts/pull/317)) +* Tolerations are now applied to migration Job Pods also. + ([#341](https://github.com/Kong/charts/pull/341)) +* Added support for using a DaemonSet instead of Deployment. + ([#347](https://github.com/Kong/charts/pull/347)) +* Updated default image versions and completed migration off Bintray + repositories. + ([#349](https://github.com/Kong/charts/pull/349)) +* PDB ignores migration Job Pods. + ([#352](https://github.com/Kong/charts/pull/352)) + +### Documentation + +* Clarified service monitor usage information. + ([#345](https://github.com/Kong/charts/pull/345)) + ## 2.0.0 ### Breaking changes diff --git a/charts/kong/Chart.yaml b/charts/kong/Chart.yaml index fbe465303..e1ecf685c 100644 --- a/charts/kong/Chart.yaml +++ b/charts/kong/Chart.yaml @@ -10,5 +10,5 @@ maintainers: email: traines@konghq.com name: kong sources: -version: 2.0.0 -appVersion: "2.3" +version: 2.1.0 +appVersion: "2.4" diff --git a/charts/kong/UPGRADE.md b/charts/kong/UPGRADE.md index 65afbf4dd..37ec9299a 100644 --- a/charts/kong/UPGRADE.md +++ b/charts/kong/UPGRADE.md @@ -17,6 +17,7 @@ upgrading from a previous version. ## Table of contents - [Upgrade considerations for all versions](#upgrade-considerations-for-all-versions) +- [2.1.0](#210) - [2.0.0](#200) - [1.14.0](#1140) - [1.11.0](#1110) @@ -57,6 +58,19 @@ text ending with `field is immutable`. This is typically due to a bug with the If you encounter this error, deleting any existing `init-migrations` jobs will clear it. +## 2.1.0 + +### Migration off Bintray + +Bintray, the Docker registry previously used for several images used by this +chart, is [sunsetting May 1, +2021](https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/). + +The chart default `values.yaml` now uses the new Docker Hub repositories for all +affected images. You should check your release `values.yaml` files to confirm that +they do not still reference Bintray repositories. If they do, update them to +use the Docker Hub repositories now in the default `values.yaml`. + ## 2.0.0 ### Support for Helm 2 dropped