Skip to content

Commit

Permalink
Merge pull request #58 from cybozu-go/update-kubernetes-1.30
Browse files Browse the repository at this point in the history
Support Kubernetes 1.30
  • Loading branch information
012xx authored Sep 2, 2024
2 parents 72d8b3a + 4f1b5b4 commit 20b9c0a
Show file tree
Hide file tree
Showing 16 changed files with 153 additions and 199 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ jobs:
strategy:
matrix:
k8s-version:
- v1.27.11 # renovate: kindest/node
- v1.28.7 # renovate: kindest/node
- v1.29.2 # renovate: kindest/node
- v1.28.13 # renovate: kindest/node
- v1.29.8 # renovate: kindest/node
- v1.30.4 # renovate: kindest/node
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 3 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
version: 2

project_name: cattage
dist: bin/
builds:
Expand Down Expand Up @@ -48,6 +50,6 @@ docker_manifests:
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
version_template: "{{ .Tag }}-next"
changelog:
use: github-native
24 changes: 12 additions & 12 deletions aqua.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
# https://aquaproj.github.io/
registries:
- type: standard
ref: v4.150.0 # renovate: depName=aquaproj/aqua-registry
ref: v4.218.0 # renovate: depName=aquaproj/aqua-registry
packages:
- name: argoproj/argo-cd@v2.10.2
- name: kubernetes/kubectl@v1.29.2
- name: kubernetes-sigs/kubebuilder@v3.14.0
- name: kubernetes-sigs/kustomize@kustomize/v5.3.0
- name: kubernetes-sigs/kind@v0.22.0
- name: rust-lang/[email protected].37
- name: tilt-dev/[email protected].11
- name: tilt-dev/[email protected].28
- name: GoogleContainerTools/container-structure-test@v1.17.0
- name: mikefarah/yq@v4.42.1
- name: argoproj/argo-cd@v2.11.7
- name: kubernetes/kubectl@v1.30.4
- name: kubernetes-sigs/kubebuilder@v4.2.0
- name: kubernetes-sigs/kustomize@kustomize/v5.4.3
- name: kubernetes-sigs/kind@v0.24.0
- name: rust-lang/[email protected].40
- name: tilt-dev/[email protected].19
- name: tilt-dev/[email protected].32
- name: GoogleContainerTools/container-structure-test@v1.19.1
- name: mikefarah/yq@v4.44.3
- name: clamoriniere/[email protected]
- name: kubernetes-sigs/controller-tools/controller-gen@v0.14.0
- name: kubernetes-sigs/controller-tools/controller-gen@v0.16.1
11 changes: 3 additions & 8 deletions charts/cattage/crds/tenant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.1
labels:
app.kubernetes.io/name: cattage
name: tenants.cattage.cybozu.io
Expand Down Expand Up @@ -117,7 +117,7 @@ spec:
conditions:
description: Conditions is an array of conditions.
items:
description: "Condition contains details for one aspect of the current state of this API Resource.\n---\nThis struct is intended for direct use as an array at the field path .status.conditions. For example,\n\n\n\ttype FooStatus struct{\n\t // Represents the observations of a foo's current state.\n\t // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t // other fields\n\t}"
description: Condition contains details for one aspect of the current state of this API Resource.
properties:
lastTransitionTime:
description: |-
Expand Down Expand Up @@ -158,12 +158,7 @@ spec:
- Unknown
type: string
type:
description: |-
type of condition in CamelCase or in foo.example.com/CamelCase.
---
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
useful (see .node.status.conditions), the ability to deconflict is important.
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
Expand Down
11 changes: 0 additions & 11 deletions charts/cattage/templates/generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,6 @@ rules:
- argoproj.io
resources:
- applications
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- argoproj.io
resources:
- appprojects
verbs:
- create
Expand Down
2 changes: 1 addition & 1 deletion cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ apiVersion: ctlptl.dev/v1alpha1
kind: Cluster
name: kind-cattage-dev
product: kind
kubernetesVersion: v1.29.2 # renovate: kindest/node
kubernetesVersion: v1.30.4 # renovate: kindest/node
registry: ctlptl-registry
21 changes: 4 additions & 17 deletions config/crd/bases/cattage.cybozu.io_tenants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.1
name: tenants.cattage.cybozu.io
spec:
group: cattage.cybozu.io
Expand Down Expand Up @@ -121,16 +121,8 @@ spec:
conditions:
description: Conditions is an array of conditions.
items:
description: "Condition contains details for one aspect of the current
state of this API Resource.\n---\nThis struct is intended for
direct use as an array at the field path .status.conditions. For
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
observations of a foo's current state.\n\t // Known .status.conditions.type
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
\ // other fields\n\t}"
description: Condition contains details for one aspect of the current
state of this API Resource.
properties:
lastTransitionTime:
description: |-
Expand Down Expand Up @@ -171,12 +163,7 @@ spec:
- Unknown
type: string
type:
description: |-
type of condition in CamelCase or in foo.example.com/CamelCase.
---
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
useful (see .node.status.conditions), the ability to deconflict is important.
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
Expand Down
10 changes: 6 additions & 4 deletions config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
# since it depends on service name and namespace that are out of this kustomize package.
# It should be run by config/default
resources:
- bases/cattage.cybozu.io_tenants.yaml
- bases/cattage.cybozu.io_tenants.yaml
#+kubebuilder:scaffold:crdkustomizeresource

patchesStrategicMerge:
- patches/fix-crd.yaml
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
# patches here are for enabling the conversion webhook for each CRD
#- patches/webhook_in_tenants.yaml
Expand All @@ -19,4 +17,8 @@ patchesStrategicMerge:

# the following config is for teaching kustomize how to do kustomization for CRDs.
configurations:
- kustomizeconfig.yaml
- kustomizeconfig.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
patches:
- path: patches/fix-crd.yaml
10 changes: 7 additions & 3 deletions config/helm/crds/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
resources:
- ../../crd
- ../../crd

commonLabels:
app.kubernetes.io/name: cattage
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
labels:
- includeSelectors: true
pairs:
app.kubernetes.io/name: cattage
18 changes: 11 additions & 7 deletions config/helm/templates/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
resources:
- ../../rbac
- ../../webhook
- ../../rbac
- ../../webhook

namespace: '{{ .Release.Namespace }}'

namePrefix: '{{ template "cattage.fullname" . }}-'

commonLabels:
app.kubernetes.io/name: '{{ include "cattage.name" . }}'

patchesStrategicMerge:
- webhookcainjection_patch.yaml

transformers:
- label-transformer.yaml
- label-transformer.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
labels:
- includeSelectors: true
pairs:
app.kubernetes.io/name: '{{ include "cattage.name" . }}'
patches:
- path: webhookcainjection_patch.yaml
11 changes: 0 additions & 11 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,6 @@ rules:
- argoproj.io
resources:
- applications
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- argoproj.io
resources:
- appprojects
verbs:
- create
Expand Down
2 changes: 1 addition & 1 deletion e2e/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
KUBERNETES_VERSION = v1.29.2 # renovate: kindest/node
KUBERNETES_VERSION = v1.30.4 # renovate: kindest/node

KIND_CONFIG = kind-config.yaml
export KUBECONFIG
Expand Down
67 changes: 32 additions & 35 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,77 +1,74 @@
module github.com/cybozu-go/cattage

go 1.22

toolchain go1.22.1
go 1.22.5

require (
github.com/google/go-cmp v0.6.0
github.com/onsi/ginkgo/v2 v2.16.0
github.com/onsi/gomega v1.31.1
github.com/prometheus/client_golang v1.18.0
github.com/spf13/cobra v1.8.0
k8s.io/api v0.29.2
k8s.io/apimachinery v0.29.2
k8s.io/client-go v0.29.2
k8s.io/klog/v2 v2.120.1
k8s.io/utils v0.0.0-20240102154912-e7106e64919e
sigs.k8s.io/controller-runtime v0.17.2
github.com/onsi/ginkgo/v2 v2.20.1
github.com/onsi/gomega v1.34.1
github.com/prometheus/client_golang v1.20.2
github.com/spf13/cobra v1.8.1
k8s.io/api v0.30.2
k8s.io/apimachinery v0.30.2
k8s.io/client-go v0.30.2
k8s.io/klog/v2 v2.130.1
k8s.io/utils v0.0.0-20240821151609-f90d01438635
sigs.k8s.io/controller-runtime v0.18.4
sigs.k8s.io/structured-merge-diff/v4 v4.4.1
sigs.k8s.io/yaml v1.4.0
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch/v5 v5.8.0 // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/zapr v1.3.0 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/imdario/mergo v0.3.6 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/oauth2 v0.12.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/term v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/sys v0.23.0 // indirect
golang.org/x/term v0.23.0 // indirect
golang.org/x/text v0.17.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.17.0 // indirect
golang.org/x/tools v0.24.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.31.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.29.0 // indirect
k8s.io/component-base v0.29.0 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
k8s.io/apiextensions-apiserver v0.30.1 // indirect
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
)
Loading

0 comments on commit 20b9c0a

Please sign in to comment.