Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency libs & newer mysql and k8s #676

Merged
merged 1 commit into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/dbtest/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ inputs:
runs:
using: "composite"
steps:
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
masa213f marked this conversation as resolved.
Show resolved Hide resolved
with:
go-version-file: go.mod
cache: true
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/e2e/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ inputs:
runs:
using: "composite"
steps:
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/upgrade/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: 'An action to run Upgrade Tests'
runs:
using: "composite"
steps:
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-fluent-bit-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

jobs:
build:
runs-on: ${{ vars.IMAGE_BUILD_RUNNER || 'ubuntu-20.04' }}
runs-on: ${{ vars.IMAGE_BUILD_RUNNER || 'ubuntu-22.04' }}
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build-mysql-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

jobs:
filter:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
masa213f marked this conversation as resolved.
Show resolved Hide resolved
outputs:
mysql-versions: ${{ steps.filter.outputs.mysql-versions }}
steps:
Expand All @@ -41,14 +41,14 @@ jobs:
tests:
if: ${{ (github.event_name == 'pull_request') && (needs.filter.outputs.mysql-versions != '[]') }}
needs: filter
runs-on: ${{ vars.IMAGE_BUILD_RUNNER || 'ubuntu-20.04' }}
runs-on: ${{ vars.IMAGE_BUILD_RUNNER || 'ubuntu-22.04' }}
strategy:
matrix:
mysql-version: ${{ fromJson(needs.filter.outputs.mysql-versions) }}
k8s-version: [ "1.27.1" ]
k8s-version: [ "1.29.4" ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
build:
if: ${{ (github.ref == 'refs/heads/main') && (needs.filter.outputs.mysql-versions != '[]') }}
needs: filter
runs-on: ${{ vars.IMAGE_BUILD_RUNNER || 'ubuntu-20.04' }}
runs-on: ${{ vars.IMAGE_BUILD_RUNNER || 'ubuntu-22.04' }}
strategy:
matrix:
mysql-version: ${{ fromJson(needs.filter.outputs.mysql-versions) }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-mysqld-exporter-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

jobs:
build:
runs-on: ${{ vars.IMAGE_BUILD_RUNNER || 'ubuntu-20.04' }}
runs-on: ${{ vars.IMAGE_BUILD_RUNNER || 'ubuntu-22.04' }}
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
name: Integration tests with MySQL
strategy:
matrix:
mysql-version: ["8.0.28", "8.0.34", "8.0.35"]
mysql-version: ["8.0.35", "8.0.36", "8.0.37"]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
Expand All @@ -44,8 +44,8 @@ jobs:
name: Supported Kubernetes versions End-to-End Tests
strategy:
matrix:
mysql-version: ["8.0.35"]
k8s-version: ["1.25.9", "1.26.4", "1.27.1"]
mysql-version: ["8.0.37"]
k8s-version: ["1.27.13", "1.28.9", "1.29.4"]
runs-on:
group: moco
steps:
Expand All @@ -67,8 +67,8 @@ jobs:
name: Supported MySQL versions End-to-End Tests
strategy:
matrix:
mysql-version: ["8.0.28", "8.0.34", "8.0.35"]
k8s-version: ["1.27.1"]
mysql-version: ["8.0.35", "8.0.36", "8.0.37"]
k8s-version: ["1.29.4"]
runs-on:
group: moco
steps:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ env:
jobs:
build:
name: Build binaries
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- run: make release-build

test:
name: Small tests
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/helm-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:

publish:
name: Publish charts on GitHub Pages
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: build
steps:
- uses: actions/checkout@v4
Expand All @@ -48,7 +48,7 @@ jobs:
- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.10.2
version: v3.15.0

- uses: actions/download-artifact@v3
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
lint-test:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- name: Checkout
Expand Down Expand Up @@ -37,9 +37,9 @@ jobs:
uses: helm/[email protected]
if: steps.list-changed.outputs.changed == 'true'
with:
version: v0.19.0
node_image: kindest/node:v1.27.1
kubectl_version: v1.27.1
version: v0.23.0
node_image: kindest/node:v1.29.4
kubectl_version: v1.29.4

- name: Apply cert-manager
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mdbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
build:
name: Build book
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- run: make book
Expand All @@ -18,7 +18,7 @@ jobs:
retention-days: 1
publish:
name: Publish book on GitHub Pages
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: build
steps:
- uses: actions/checkout@v4
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
build-moco:
name: Push Container Image
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
cache-to: type=gha,mode=max
build-moco-backup:
name: Push Container Image
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
Expand Down Expand Up @@ -84,10 +84,10 @@ jobs:
release:
name: Release on GitHub
needs: [build-moco, build-moco-backup]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: GoReleaser
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/weekly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
name: Integration tests with MySQL
strategy:
matrix:
mysql-version: ["8.0.18", "8.0.25", "8.0.26", "8.0.27", "8.0.28", "8.0.30", "8.0.31", "8.0.32", "8.0.33", "8.0.34", "8.0.35"]
mysql-version: ["8.0.18", "8.0.25", "8.0.26", "8.0.27", "8.0.28", "8.0.30", "8.0.31", "8.0.32", "8.0.33", "8.0.34", "8.0.35", "8.0.36", "8.0.37"]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
Expand All @@ -29,8 +29,8 @@ jobs:
name: Supported Kubernetes versions End-to-End Tests
strategy:
matrix:
mysql-version: ["8.0.35"]
k8s-version: ["1.25.9", "1.26.4", "1.27.1"]
mysql-version: ["8.0.37"]
k8s-version: ["1.27.13", "1.28.9", "1.29.4"]
runs-on:
group: moco
steps:
Expand All @@ -44,8 +44,8 @@ jobs:
name: Supported MySQL versions End-to-End Tests
strategy:
matrix:
mysql-version: ["8.0.18", "8.0.25", "8.0.26", "8.0.27", "8.0.28", "8.0.30", "8.0.31", "8.0.32", "8.0.33", "8.0.34", "8.0.35"]
k8s-version: ["1.27.1"]
mysql-version: ["8.0.18", "8.0.25", "8.0.26", "8.0.27", "8.0.28", "8.0.30", "8.0.31", "8.0.32", "8.0.33", "8.0.34", "8.0.35", "8.0.36", "8.0.37"]
k8s-version: ["1.29.4"]
runs-on:
group: moco
steps:
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Tool versions
CTRL_TOOLS_VERSION=0.13.0
CTRL_TOOLS_VERSION=0.15.0
CTRL_RUNTIME_VERSION := $(shell awk '/sigs.k8s.io\/controller-runtime/ {print substr($$2, 2)}' go.mod)
KUSTOMIZE_VERSION = 5.2.1
HELM_VERSION = 3.13.2
KUSTOMIZE_VERSION = 5.4.1
HELM_VERSION = 3.15.0
CRD_TO_MARKDOWN_VERSION = 0.0.3
MYSQLSH_VERSION = 8.0.35-1
MDBOOK_VERSION = 0.4.36
GORELEASER_VERSION = 1.22.1
YQ_VERSION = 4.40.4
MYSQLSH_VERSION = 8.0.37-1
MDBOOK_VERSION = 0.4.37
GORELEASER_VERSION = 1.26.1
YQ_VERSION = 4.44.1
OS_VERSION := $(shell . /etc/os-release; echo $$VERSION_ID)

# Test tools
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Blog article: [Introducing MOCO, a modern MySQL operator on Kubernetes](https://

## Supported software

- MySQL: 8.0.18, 8.0.25, 8.0.26, 8.0.27, 8.0.28, 8.0.30, 8.0.31, 8.0.32, 8.0.33, 8.0.34, 8.0.35
- Kubernetes: 1.25, 1.26, 1.27
- MySQL: 8.0.18, 8.0.25, 8.0.26, 8.0.27, 8.0.28, 8.0.30, 8.0.31, 8.0.32, 8.0.33, 8.0.34, 8.0.35, 8.0.36, 8.0.37
- Kubernetes: 1.27, 1.28, 1.29

MOCO supports (tests) the LTS releases of MySQL 8.
Innovation releases would probably work. But they are not tested in our CI.
Expand Down Expand Up @@ -74,7 +74,7 @@ spec:
spec:
containers:
- name: mysqld
image: ghcr.io/cybozu-go/moco/mysql:8.0.35
image: ghcr.io/cybozu-go/moco/mysql:8.0.37
volumeClaimTemplates:
- metadata:
name: mysql-data
Expand Down
14 changes: 6 additions & 8 deletions api/v1beta2/mysqlcluster_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@ func makeMySQLCluster() *mocov1beta2.MySQLCluster {
},
Spec: mocov1beta2.PersistentVolumeClaimSpecApplyConfiguration(*corev1ac.PersistentVolumeClaimSpec().
WithStorageClassName("default").
WithResources(corev1ac.ResourceRequirements().
WithRequests(corev1.ResourceList{
corev1.ResourceStorage: resource.MustParse("1Gi"),
})),
WithResources(
corev1ac.VolumeResourceRequirements().WithRequests(corev1.ResourceList{corev1.ResourceStorage: resource.MustParse("1Gi")})),
),
},
},
Expand Down Expand Up @@ -462,7 +460,7 @@ var _ = Describe("MySQLCluster Webhook", func() {
Spec: mocov1beta2.PersistentVolumeClaimSpecApplyConfiguration(
*corev1ac.PersistentVolumeClaimSpec().
WithStorageClassName("default").
WithResources(corev1ac.ResourceRequirements().
WithResources(corev1ac.VolumeResourceRequirements().
WithRequests(corev1.ResourceList{
corev1.ResourceStorage: resource.MustParse("1Gi"),
}),
Expand All @@ -477,7 +475,7 @@ var _ = Describe("MySQLCluster Webhook", func() {
Spec: mocov1beta2.PersistentVolumeClaimSpecApplyConfiguration(
*corev1ac.PersistentVolumeClaimSpec().
WithStorageClassName("not-support-volume-expansion").
WithResources(corev1ac.ResourceRequirements().
WithResources(corev1ac.VolumeResourceRequirements().
WithRequests(corev1.ResourceList{
corev1.ResourceStorage: resource.MustParse("1Gi"),
}),
Expand Down Expand Up @@ -509,7 +507,7 @@ var _ = Describe("MySQLCluster Webhook", func() {
Spec: mocov1beta2.PersistentVolumeClaimSpecApplyConfiguration(
*corev1ac.PersistentVolumeClaimSpec().
WithStorageClassName("default").
WithResources(corev1ac.ResourceRequirements().
WithResources(corev1ac.VolumeResourceRequirements().
WithRequests(corev1.ResourceList{
corev1.ResourceStorage: resource.MustParse("1Gi"),
}),
Expand All @@ -524,7 +522,7 @@ var _ = Describe("MySQLCluster Webhook", func() {
Spec: mocov1beta2.PersistentVolumeClaimSpecApplyConfiguration(
*corev1ac.PersistentVolumeClaimSpec().
WithStorageClassName("not-support-volume-expansion").
WithResources(corev1ac.ResourceRequirements().
WithResources(corev1ac.VolumeResourceRequirements().
WithRequests(corev1.ResourceList{
corev1.ResourceStorage: resource.MustParse("1Gi"),
}),
Expand Down
18 changes: 12 additions & 6 deletions api/v1beta2/webhook_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import (
"sigs.k8s.io/controller-runtime/pkg/envtest"
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
"sigs.k8s.io/controller-runtime/pkg/webhook"
)

// These tests use Ginkgo (BDD-style Go testing framework). Refer to
Expand Down Expand Up @@ -79,12 +81,16 @@ var _ = BeforeSuite(func() {
// start webhook server using Manager
webhookInstallOptions := &testEnv.CRDInstallOptions.WebhookOptions
mgr, err := ctrl.NewManager(cfg, ctrl.Options{
Scheme: scheme,
Host: webhookInstallOptions.LocalServingHost,
Port: webhookInstallOptions.LocalServingPort,
CertDir: webhookInstallOptions.LocalServingCertDir,
LeaderElection: false,
MetricsBindAddress: "0",
Scheme: scheme,
WebhookServer: webhook.NewServer(webhook.Options{
Host: webhookInstallOptions.LocalServingHost,
Port: webhookInstallOptions.LocalServingPort,
CertDir: webhookInstallOptions.LocalServingCertDir,
}),
LeaderElection: false,
Metrics: metricsserver.Options{
BindAddress: "0",
},
})
Expect(err).NotTo(HaveOccurred())

Expand Down
Loading
Loading