Skip to content

Commit

Permalink
Merge pull request #575 from cybozu-go/support-mysql-8033and8044
Browse files Browse the repository at this point in the history
Support mysql 8.0.33 and 8.0.34
  • Loading branch information
yamatcha authored Sep 27, 2023
2 parents a4afa82 + 8903b83 commit d73d0d7
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 32 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
name: Integration tests with MySQL
strategy:
matrix:
mysql-version: ["8.0.28", "8.0.31", "8.0.32"]
mysql-version: ["8.0.28", "8.0.33", "8.0.34"]
uses: ./.github/workflows/dbtest.yaml
with:
mysql-version: ${{ matrix.mysql-version }}
Expand All @@ -35,7 +35,7 @@ jobs:
name: Supported Kubernetes versions End-to-End Tests
strategy:
matrix:
mysql-version: ["8.0.32"]
mysql-version: ["8.0.34"]
k8s-version: ["1.25.9", "1.26.4", "1.27.1"]
uses: ./.github/workflows/e2e.yaml
with:
Expand All @@ -46,7 +46,7 @@ jobs:
name: Supported MySQL versions End-to-End Tests
strategy:
matrix:
mysql-version: ["8.0.28", "8.0.31", "8.0.32"]
mysql-version: ["8.0.28", "8.0.33", "8.0.34"]
k8s-version: ["1.27.1"]
uses: ./.github/workflows/e2e.yaml
with:
Expand Down
6 changes: 3 additions & 3 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"]
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"]
uses: ./.github/workflows/dbtest.yaml
with:
mysql-version: ${{ matrix.mysql-version }}
Expand All @@ -26,7 +26,7 @@ jobs:
name: Supported Kubernetes versions End-to-End Tests
strategy:
matrix:
mysql-version: ["8.0.32"]
mysql-version: ["8.0.34"]
k8s-version: ["1.25.9", "1.26.4", "1.27.1"]
uses: ./.github/workflows/e2e.yaml
with:
Expand All @@ -37,7 +37,7 @@ 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"]
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"]
k8s-version: ["1.27.1"]
uses: ./.github/workflows/e2e.yaml
with:
Expand Down
10 changes: 5 additions & 5 deletions DEVELOP.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ Edit the following lines in `Dockerfile`:

```
# The tag should be the latest one
FROM ghcr.io/cybozu-go/moco/mysql:8.0.30.1 as mysql
FROM ghcr.io/cybozu-go/moco/mysql:8.0.34.1 as mysql
# See the below description for how to get the version string.
ARG MYSQLSH_VERSION=8.0.30-1
ARG MYSQLSH_VERSION=8.0.34-1
```

The MySQL shell debian package can be found in https://dev.mysql.com/downloads/shell/ .
Expand All @@ -88,22 +88,22 @@ MySQL versions appear twice:
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"]
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"]
...
# Matrix tests for the latest MySQL version on different Kubernetes versions.
e2e:
name: Supported Kubernetes versions End-to-End Tests
strategy:
matrix:
mysql-version: ["8.0.30"]
mysql-version: ["8.0.34"]
k8s-version: ["1.19.11", "1.20.7", "1.21.1"]
...
# Matrix tests for different MySQL versions on the latest supported Kubernetes version.
e2e-mysql:
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"]
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"]
k8s-version: ["1.21.1"]
```
Expand Down
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the moco-controller binary
FROM --platform=$BUILDPLATFORM ghcr.io/cybozu/golang:1.21-focal as builder
FROM --platform=$BUILDPLATFORM ghcr.io/cybozu/golang:1.21-jammy as builder

ARG TARGETARCH

Expand All @@ -20,13 +20,13 @@ USER 10000:10000
ENTRYPOINT ["/moco-controller"]

# For MySQL binaries
FROM --platform=$TARGETPLATFORM ghcr.io/cybozu-go/moco/mysql:8.0.32.2 as mysql
FROM --platform=$TARGETPLATFORM ghcr.io/cybozu-go/moco/mysql:8.0.34.1 as mysql

# the backup image
FROM --platform=$TARGETPLATFORM quay.io/cybozu/ubuntu:20.04
FROM --platform=$TARGETPLATFORM ghcr.io/cybozu/ubuntu:22.04
LABEL org.opencontainers.image.source https://github.com/cybozu-go/moco

ARG MYSQLSH_VERSION=8.0.30-1
ARG MYSQLSH_VERSION=8.0.34-1

COPY --from=builder /work/moco-backup /moco-backup

Expand All @@ -35,9 +35,9 @@ COPY --from=mysql /usr/local/mysql/bin/mysqlbinlog /usr/local/mysql/bin/mysqlbin
COPY --from=mysql /usr/local/mysql/bin/mysql /usr/local/mysql/bin/mysql

RUN apt-get update \
&& apt-get install -y --no-install-recommends libjemalloc2 zstd python3 libpython3.8 s3cmd \
&& apt-get install -y --no-install-recommends libjemalloc2 zstd python3 libpython3.10 s3cmd \
&& rm -rf /var/lib/apt/lists/* \
&& curl -o /tmp/mysqlsh.deb -fsL https://dev.mysql.com/get/Downloads/MySQL-Shell/mysql-shell_${MYSQLSH_VERSION}ubuntu20.04_amd64.deb \
&& curl -o /tmp/mysqlsh.deb -fsL https://dev.mysql.com/get/Downloads/MySQL-Shell/mysql-shell_${MYSQLSH_VERSION}ubuntu22.04_amd64.deb \
&& dpkg -i /tmp/mysqlsh.deb \
&& rm -f /tmp/mysqlsh.deb

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CODE_GENERATOR_VERSION := $(shell awk '/k8s.io\/client-go/ {print substr($$2, 2)
KUSTOMIZE_VERSION = 5.0.3
HELM_VERSION = 3.12.0
CRD_TO_MARKDOWN_VERSION = 0.0.3
MYSQLSH_VERSION = 8.0.31-1
MYSQLSH_VERSION = 8.0.34-1
MDBOOK_VERSION = 0.4.20
GORELEASER_VERSION = 1.18.2
YQ_VERSION = 4.34.1
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ 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
- 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
- Kubernetes: 1.25, 1.26, 1.27

Other MySQL 8 releases would probably work. They are simply not tested in our CI.
Expand Down Expand Up @@ -73,7 +73,7 @@ spec:
spec:
containers:
- name: mysqld
image: ghcr.io/cybozu-go/moco/mysql:8.0.30
image: ghcr.io/cybozu-go/moco/mysql:8.0.34
volumeClaimTemplates:
- metadata:
name: mysql-data
Expand Down
4 changes: 2 additions & 2 deletions docs/custom-mysqld.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ spec:
spec:
containers:
- name: mysqld
image: ghcr.io/cybozu-go/moco/mysql:8.0.30
image: ghcr.io/cybozu-go/moco/mysql:8.0.34
```
If you want to build and use your own `mysqld`, read the rest of this document.

## Dockerfile

The easiest way to build a custom `mysqld` for MOCO is to copy and edit our Dockerfile.
You can find it under [`mysql` directory in `github.com/cybozu/neco-containers`](https://github.com/cybozu/neco-containers/tree/main/mysql).
You can find it under [`containers/mysql` directory in `github.com/cybozu-go/moco`](https://github.com/cybozu-go/moco/tree/main/containers/mysql).

You should keep the following points:

Expand Down
6 changes: 3 additions & 3 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ spec:
containers:
# At least a container named "mysqld" must be defined.
- name: mysqld
image: ghcr.io/cybozu-go/moco/mysql:8.0.30
image: ghcr.io/cybozu-go/moco/mysql:8.0.34
# By limiting CPU and memory, Pods will have Guaranteed QoS class.
# requests can be omitted; it will be set to the same value as limits.
resources:
Expand Down Expand Up @@ -207,7 +207,7 @@ spec:
spec:
containers:
- name: mysqld
image: ghcr.io/cybozu-go/moco/mysql:8.0.30 # must be the same version as the donor
image: ghcr.io/cybozu-go/moco/mysql:8.0.34 # must be the same version as the donor
volumeClaimTemplates:
- metadata:
name: mysql-data
Expand Down Expand Up @@ -695,7 +695,7 @@ spec:
containers:
- name: mysqld
# Edit the next line
image: ghcr.io/cybozu-go/moco/mysql:8.0.30
image: ghcr.io/cybozu-go/moco/mysql:8.0.34
```

You are advised to make backups and/or create a replica cluster before starting the upgrade process.
Expand Down
2 changes: 1 addition & 1 deletion e2e/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
KIND_VERSION = 0.19.0
KUBERNETES_VERSION = 1.27.1
CERT_MANAGER_VERSION = 1.12.1
MYSQL_VERSION = 8.0.32
MYSQL_VERSION = 8.0.34

KIND := $(dir $(shell pwd))/bin/kind
KUBECTL := $(dir $(shell pwd))/bin/kubectl
Expand Down
2 changes: 1 addition & 1 deletion examples/anti-affinity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
topologyKey: "kubernetes.io/hostname"
containers:
- name: mysqld
image: ghcr.io/cybozu-go/moco/mysql:8.0.30
image: ghcr.io/cybozu-go/moco/mysql:8.0.34
resources:
requests:
cpu: "10"
Expand Down
2 changes: 1 addition & 1 deletion examples/collect-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: mysqld
image: ghcr.io/cybozu-go/moco/mysql:8.0.30
image: ghcr.io/cybozu-go/moco/mysql:8.0.34
volumeClaimTemplates:
- metadata:
name: mysql-data
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-mycnf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
spec:
containers:
- name: mysqld
image: ghcr.io/cybozu-go/moco/mysql:8.0.30
image: ghcr.io/cybozu-go/moco/mysql:8.0.34
volumeClaimTemplates:
- metadata:
name: mysql-data
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-probe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
spec:
containers:
- name: mysqld
image: ghcr.io/cybozu-go/moco/mysql:8.0.30
image: ghcr.io/cybozu-go/moco/mysql:8.0.34
# If you want to override the default probes, you cannot override the httpGet.
livenessProbe:
failureThreshold: 3
Expand Down
2 changes: 1 addition & 1 deletion examples/guaranteed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
spec:
containers:
- name: mysqld
image: ghcr.io/cybozu-go/moco/mysql:8.0.30
image: ghcr.io/cybozu-go/moco/mysql:8.0.34
# By limiting CPU and memory, Pods will have Guaranteed QoS class.
# requests can be omitted; it will be set to the same value as limits.
resources:
Expand Down
2 changes: 1 addition & 1 deletion examples/loadbalancer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
spec:
containers:
- name: mysqld
image: ghcr.io/cybozu-go/moco/mysql:8.0.30
image: ghcr.io/cybozu-go/moco/mysql:8.0.34
volumeClaimTemplates:
- metadata:
name: mysql-data
Expand Down

0 comments on commit d73d0d7

Please sign in to comment.