Skip to content

Commit

Permalink
feat(deployment): update mysql to 5.7 and support running as nonroot (#…
Browse files Browse the repository at this point in the history
…5278)

* Create mysql-serviceaccount.yaml

* Update kustomization.yaml

* Update mysql-deployment.yaml

* Update mysql-deployment.yaml

* Update mysql-deployment.yaml

* Update tag_for_hosted.sh

* Update mysql-deployment.yaml
  • Loading branch information
juliusvonkohout authored Mar 14, 2021
1 parent 60a2612 commit 3cdb1d9
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
3 changes: 2 additions & 1 deletion manifests/kustomize/third-party/mysql/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ kind: Kustomization
resources:
- mysql-deployment.yaml
- mysql-pv-claim.yaml
- mysql-service.yaml
- mysql-service.yaml
- mysql-serviceaccount.yaml
13 changes: 10 additions & 3 deletions manifests/kustomize/third-party/mysql/mysql-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,18 @@ spec:
labels:
app: mysql
spec:
serviceAccountName: mysql
containers:
- env:
# https://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_ignore-db-dir
# Ext4, Btrfs etc. volumes root directories have a lost+found directory that should not be treated as a database.
- args:
- --ignore-db-dir=lost+found
- --datadir
- /var/lib/mysql
env:
- name: MYSQL_ALLOW_EMPTY_PASSWORD
value: "true"
image: gcr.io/ml-pipeline/mysql:5.6
image: gcr.io/ml-pipeline/mysql:5.7
name: mysql
ports:
- containerPort: 3306
Expand All @@ -30,4 +37,4 @@ spec:
volumes:
- name: mysql-persistent-storage
persistentVolumeClaim:
claimName: mysql-pv-claim
claimName: mysql-pv-claim
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: mysql

4 changes: 2 additions & 2 deletions test/tag_for_hosted.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ docker tag gcr.io/ml-pipeline/minio:RELEASE.2019-08-14T20-37-41Z-license-complia
docker push gcr.io/$PROJECT_ID/hosted/$COMMIT_SHA/minio:$SEM_VER
docker push gcr.io/$PROJECT_ID/hosted/$COMMIT_SHA/minio:$MM_VER

docker tag gcr.io/ml-pipeline/mysql:5.6 gcr.io/$PROJECT_ID/hosted/$COMMIT_SHA/mysql:$SEM_VER
docker tag gcr.io/ml-pipeline/mysql:5.6 gcr.io/$PROJECT_ID/hosted/$COMMIT_SHA/mysql:$MM_VER
docker tag gcr.io/ml-pipeline/mysql:5.7 gcr.io/$PROJECT_ID/hosted/$COMMIT_SHA/mysql:$SEM_VER
docker tag gcr.io/ml-pipeline/mysql:5.7 gcr.io/$PROJECT_ID/hosted/$COMMIT_SHA/mysql:$MM_VER
docker push gcr.io/$PROJECT_ID/hosted/$COMMIT_SHA/mysql:$SEM_VER
docker push gcr.io/$PROJECT_ID/hosted/$COMMIT_SHA/mysql:$MM_VER

Expand Down

0 comments on commit 3cdb1d9

Please sign in to comment.