Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Merge pull request #3493 from fluxcd/release/1.23.0-rc1
Browse files Browse the repository at this point in the history
Release 1.23.0-rc1
  • Loading branch information
Kingdon Barrett authored Jun 24, 2021
2 parents dba966c + 2feb4d6 commit 57aa8b3
Show file tree
Hide file tree
Showing 12 changed files with 55 additions and 130 deletions.
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,37 @@
> requests](https://github.com/fluxcd/toolkit/discussions) for Flux v2
> and Toolkit components.
## 1.23.0 (2021-06-25)

This release migrates Flux's discovery cache and helm chart to API versions
that are compatible with the upcoming Kubernetes 1.22.0 release and tested
against Kubernetes 1.22.0-alpha.3, where all v1beta1 versions from the
`rbac.authorization.k8s.io`, and `apiextensions.k8s.io` API groups are
deprecated, in favor of their GA v1 counterparts.

**Note: Kubernetes Upgrade Required**

These APIs have been available in Kubernetes releases (respectively) from 1.8,
and 1.16. Users will need to upgrade to at least Kubernetes 1.16. This release
has been available since September 2019, and was already EOL in August 2020.
Flux Users should be on at least this version by now.

This will enable Flux v1 to continue to work on upcoming versions of Kubernetes that have yet to be released.

### Maintenance and documentation

- Remove docs, point to new locations [fluxcd/flux#3491][]
- Move list of production users [fluxcd/flux#3481][]
- Update the discovery cache to apiextensions v1 [fluxcd/flux#3439][]

### Thanks

Thanks to @stefanprodan, @dholbach, @hiddeco, and @kingdonb, for their contributions to this release.

[fluxcd/flux#3491]: https://github.com/fluxcd/flux/pull/3491
[fluxcd/flux#3481]: https://github.com/fluxcd/flux/pull/3481
[fluxcd/flux#3439]: https://github.com/fluxcd/flux/pull/3439

## 1.22.2 (2021-04-23)

This release bundles migration-related documentation updates with some minor fixes, and tracks Kustomize to the end of its v3.8 minor release series. The next release will probably include an update to Kustomize v3.10.
Expand Down
4 changes: 2 additions & 2 deletions chart/flux/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
appVersion: "1.22.2"
appVersion: "1.23.0"
version: 1.9.0
kubeVersion: ">=1.9.0-0"
kubeVersion: ">=1.16.0-0"
name: flux
description: Flux is a tool that automatically ensures that the state of a cluster matches what is specified in version control
home: https://fluxcd.io
Expand Down
8 changes: 4 additions & 4 deletions chart/flux/templates/rbac-role.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- if and .Values.rbac.create (eq .Values.clusterRole.create false) -}}
{{- range $namespace := (append .Values.allowedNamespaces .Release.Namespace) }}
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ template "flux.fullname" $ }}
Expand All @@ -18,7 +18,7 @@ rules:
verbs:
- '*'
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ template "flux.fullname" $ }}
Expand All @@ -38,7 +38,7 @@ subjects:
kind: ServiceAccount
---
{{- end }}
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ template "flux.fullname" . }}-crd
Expand All @@ -62,7 +62,7 @@ rules:
verbs:
- list
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ template "flux.fullname" . }}
Expand Down
4 changes: 2 additions & 2 deletions chart/flux/templates/rbac.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- if .Values.rbac.create -}}
{{if .Values.clusterRole.create -}}
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ template "flux.clusterRoleName" . }}
Expand All @@ -23,7 +23,7 @@ rules:
{{- end -}}
{{- if or .Values.clusterRole.create .Values.clusterRole.name }}
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ template "flux.clusterRoleName" . }}
Expand Down
4 changes: 2 additions & 2 deletions deploy/flux-account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
name: flux
namespace: flux
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
Expand All @@ -22,7 +22,7 @@ rules:
- nonResourceURLs: ['*']
verbs: ['*']
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
Expand Down
106 changes: 0 additions & 106 deletions go.sum

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions pkg/cluster/kubernetes/cached_disco.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"sync"
"time"

crdv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
crdv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
crd "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down Expand Up @@ -64,7 +64,7 @@ func MakeCachedDiscovery(d discovery.DiscoveryInterface, c crd.Interface, shutdo
// We have an empty cache, so it's _a priori_ invalid. (Yes, that's the zero value, but better safe than sorry)
cachedDisco.Invalidate()

crdClient := c.ApiextensionsV1beta1().CustomResourceDefinitions()
crdClient := c.ApiextensionsV1().CustomResourceDefinitions()
lw := &toolscache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
return crdClient.List(options)
Expand All @@ -84,7 +84,7 @@ func MakeCachedDiscovery(d discovery.DiscoveryInterface, c crd.Interface, shutdo
cachedDisco.Invalidate()
},
}
_, controller := toolscache.NewInformer(lw, &crdv1beta1.CustomResourceDefinition{}, 0, handle)
_, controller := toolscache.NewInformer(lw, &crdv1.CustomResourceDefinition{}, 0, handle)
go cachedDisco.invalidatePeriodically(shutdown)
go controller.Run(shutdown)
return cachedDisco
Expand Down
6 changes: 3 additions & 3 deletions pkg/cluster/kubernetes/cached_disco_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import (
"time"

"github.com/stretchr/testify/assert"
crdv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
crdv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
crdfake "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

func TestCachedDiscovery(t *testing.T) {
coreClient := makeFakeClient()

myCRD := &crdv1beta1.CustomResourceDefinition{
myCRD := &crdv1.CustomResourceDefinition{
ObjectMeta: metav1.ObjectMeta{
Name: "custom",
},
Expand Down Expand Up @@ -69,7 +69,7 @@ func TestCachedDiscovery(t *testing.T) {
coreClient.Fake.Resources = append(apiResources, updatedAPI)

// Provoke the cached discovery client into invalidating
_, err = crdClient.ApiextensionsV1beta1().CustomResourceDefinitions().Update(myCRD)
_, err = crdClient.ApiextensionsV1().CustomResourceDefinitions().Update(myCRD)
if err != nil {
t.Fatal(err)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/install/generated_templates.gogen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pkg/install/templates/flux-account.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
name: flux{{ if .Namespace }}
namespace: {{ .Namespace }}{{ end}}
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
Expand All @@ -22,7 +22,7 @@ rules:
- nonResourceURLs: ['*']
verbs: ['*']
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/run-gh.bash
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ FLUX_ROOT_DIR="$(git rev-parse --show-toplevel)"
E2E_DIR="${FLUX_ROOT_DIR}/test/e2e"
CACHE_DIR="${FLUX_ROOT_DIR}/cache/$CURRENT_OS_ARCH"

KIND_VERSION=v0.7.0
KUBE_VERSION=v1.14.10
KIND_VERSION=v0.11.1
KUBE_VERSION=v1.21.1
GITSRV_VERSION=v1.0.0
KIND_CACHE_PATH="${CACHE_DIR}/kind-$KIND_VERSION"
KIND_CLUSTER_PREFIX=flux-e2e
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/run.bash
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ FLUX_ROOT_DIR="$(git rev-parse --show-toplevel)"
E2E_DIR="${FLUX_ROOT_DIR}/test/e2e"
CACHE_DIR="${FLUX_ROOT_DIR}/cache/$CURRENT_OS_ARCH"

KIND_VERSION=v0.7.0
KUBE_VERSION=v1.14.10
KIND_VERSION=v0.11.1
KUBE_VERSION=v1.21.1
GITSRV_VERSION=v1.0.0
KIND_CACHE_PATH="${CACHE_DIR}/kind-$KIND_VERSION"
KIND_CLUSTER_PREFIX=flux-e2e
Expand Down

0 comments on commit 57aa8b3

Please sign in to comment.