Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Commit

Permalink
release(v0.9.0) update operator metadata and docs
Browse files Browse the repository at this point in the history
Release 0.9.0 and change the kongs CRD API group from charts.helm.k8s.io
to charts.konghq.com.

The new group is not in one of the protected groups established by
kubernetes/enhancements#1111. This operator CRD
should not use a protected group as it is not a core part of the
Kubernetes project.

This change makes the CRD compatible with Kubernetes >=1.22. However, it
breaks compatibility with previous versions of the operator. As such,
0.9.0 has no replace version: it requires a fresh operator install and a
fresh set of Kong CRs.
  • Loading branch information
Travis Raines committed Oct 11, 2021
1 parent 176b28b commit cf4b8e7
Show file tree
Hide file tree
Showing 12 changed files with 453 additions and 39 deletions.
65 changes: 65 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,70 @@
# Changelog

## 0.9.0

### Breaking changes

* 0.9.0 changes the API group used for the Kong CRD to `charts.konghq.com`.
This is necessary to comply with new requirements for `*.k8s.io` groups
enforced by Kubernetes 1.22 and newer. Because of this change, you **cannot
upgrade to 0.9.0 from previous releases of the operator, and must manually
copy configuration from your existing kongs.charts.helm.k8s.io CRs into new
kongs.charts.konghq.com CRs.** See the "Upgrading from previous versions"
section below for detailed instructions.
* Chart 2.4 updates the default version of KIC to 2.0. If you do not override
your KIC version to an older 1.x version and you use a database, you should
[temporarily disable KIC before upgrading it to 2.0](https://github.com/Kong/charts/blob/kong-2.4.0/charts/kong/UPGRADE.md#disable-ingress-controller-prior-to-2x-upgrade-when-using-postgresql)
to avoid database inconsistency.
* ServiceAccount configuration has a [new location inside Kong custom
resources](https://github.com/Kong/charts/blob/kong-2.4.0/charts/kong/UPGRADE.md#changed-serviceaccount-configuration-location)
to support configurations that require a ServiceAccount but do not use the
ingress controller.
* Various resources [now use updated API versions](https://github.com/Kong/charts/blob/kong-2.4.0/charts/kong/UPGRADE.md#changed-serviceaccount-configuration-location)
for compatibility with newer Kubernetes releases. These versions require
Kubernetes 1.16 or newer. Note that the upgraded Ingress resources now use
the `ingressClassName` field: you should remove `ingress.class` annotations
and set their value in `ingressClassName` to account for [changes to the
Ingress spec](https://docs.konghq.com/kubernetes-ingress-controller/2.0.x/concepts/ingress-versions/).
* The [Pod disruption budget default has changed](https://github.com/Kong/charts/blob/kong-2.4.0/charts/kong/UPGRADE.md#changes-to-pod-disruption-budget-defaults)
to allow support for the `minUnavailable` setting. You may wish to restore
the older default if you are upgrading from a previous version.

### Upgrading from previous versions

0.9.0 changes the CRD API group used by this operator. The new
`kongs.charts.konghq.com` CRD and old `kongs.charts.helm.k8s.io` CRD have
identical specs, but you must manually copy data into new CRs to migrate your
configuration. We recommend backing up your cluster prior to migrating.

Because the old CRD is not compatible with Kubernetes 1.22, you must complete
these steps on Kubernetes 1.21 or older. To migrate your configuration:

1. Install the new CRD:
```
kubectl create -f https://raw.githubusercontent.com/Kong/kong-operator/v0.9.0/deploy/crds/charts_v1alpha1_kong_crd.yaml
```
2. Using [jq](https://stedolan.github.io/jq/), create new CRs from your
existing CRs:
```
kubectl get kongs.charts.helm.k8s.io -o json | jq ".items[] | del(.metadata.uid, .metadata.creationTimestamp, .metadata.generation, .metadata.resourceVersion) | .apiVersion=\"charts.konghq.com/v1alpha1\"" | kubectl create -f -
```
3. Plan an outage window where you will upgrade to Kubernetes 1.22 and install
the new operator. Because you will uninstall previous versions of the
operator, there will be a period when your Kong instances will not be
available.
4. Begin your outage window. [Uninstall the Kong operator](https://olm.operatorframework.io/docs/tasks/uninstall-operator/)
and run `kubectl delete crds kongs.charts.helm.k8s.io`. This will _stop
currently running Kong instances_.
5. Install Kong operator 0.9.0. Check the status of your Kong instances. 0.9.0
should detect the new CRs and start Kong instances automatically.

### Improvements

* Upgraded to chart 2.4. See the [chart changelog](https://github.com/Kong/charts/blob/kong-2.4.0/charts/kong/CHANGELOG.md)
for full details.
* Upgraded the Kong CRD API version to `apiextensions.k8s.io/v1` for
compatibility with Kubernetes 1.22 and newer.

## 0.8.0

### Breaking changes
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ With Kong Operator running in your cluster, you can spin up multiple instances o
1. Deploy a Kong Ingress Controller with `example-ingress-class` Ingress class (see [_Configuration_ section][section-configuration] for available options):
```
kubectl create -f - <<EOF
apiVersion: charts.helm.k8s.io/v1alpha1
apiVersion: charts.konghq.com/v1alpha1
kind: Kong
metadata:
name: example-kong
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ADD LICENSE /licenses/LICENSE
LABEL name="kong-operator" \
maintainer="harry@konghq.com" \
vendor="Kong Inc" \
version="v0.8.0" \
version="v0.9.0" \
summary="kong-operator installs and manages Kong in your k8s environemnt" \
description="kong-operator installs and manages Kong in your k8s environemnt"

Expand Down
Loading

0 comments on commit cf4b8e7

Please sign in to comment.