Skip to content

Commit d13bada

Browse files
Merge pull request opendatahub-io#34 from gmfrasca/redhat-images
Update MySQL Image, add MariaDB overlay
2 parents 7cbc55f + cda0435 commit d13bada

File tree

7 files changed

+154
-2
lines changed

7 files changed

+154
-2
lines changed

manifests/opendatahub/base/configmaps/pipeline-install-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ data:
55
appVersion: 1.7.0
66
autoUpdatePipelineDefaultVersion: "true"
77
bucketName: mlpipeline
8-
cacheDb: cachedb
8+
cacheDb: mlpipeline
99
cacheImage: registry.access.redhat.com/ubi8/ubi-minimal
1010
cacheNodeRestrictions: "false"
1111
cronScheduleTimezone: UTC
1212
dbHost: mysql
1313
dbPort: "3306"
1414
defaultPipelineRoot: ""
15-
mlmdDb: metadb
15+
mlmdDb: mlpipeline
1616
pipelineDb: mlpipeline
1717
warning: |
1818
1. Do not use kubectl to edit this configmap, because some values are used
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
labels:
6+
app: mariadb
7+
application-crd-id: kubeflow-pipelines
8+
name: mariadb
9+
spec:
10+
replicas: 1
11+
strategy:
12+
type: Recreate # Need this since backing PVC is ReadWriteOnce, which creates resource lock condition in default Rolling strategy
13+
selector:
14+
matchLabels:
15+
app: mariadb
16+
application-crd-id: kubeflow-pipelines
17+
template:
18+
metadata:
19+
labels:
20+
app: mariadb
21+
application-crd-id: kubeflow-pipelines
22+
spec:
23+
containers:
24+
- name: mariadb
25+
image: mysql
26+
ports:
27+
- containerPort: 3306
28+
readinessProbe:
29+
exec:
30+
command:
31+
- /bin/sh
32+
- "-i"
33+
- "-c"
34+
- >-
35+
MYSQL_PWD=$MYSQL_PASSWORD mysql -h 127.0.0.1 -u $MYSQL_USER -D
36+
$MYSQL_DATABASE -e 'SELECT 1'
37+
failureThreshold: 3
38+
initialDelaySeconds: 5
39+
periodSeconds: 10
40+
successThreshold: 1
41+
timeoutSeconds: 1
42+
livenessProbe:
43+
failureThreshold: 3
44+
initialDelaySeconds: 30
45+
periodSeconds: 10
46+
successThreshold: 1
47+
tcpSocket:
48+
port: 3306
49+
timeoutSeconds: 1
50+
env:
51+
- name: MYSQL_USER
52+
valueFrom:
53+
secretKeyRef:
54+
name: $(database_secret)
55+
key: username
56+
- name: MYSQL_PASSWORD
57+
valueFrom:
58+
secretKeyRef:
59+
name: $(database_secret)
60+
key: password
61+
- name: MYSQL_DATABASE
62+
valueFrom:
63+
configMapKeyRef:
64+
key: pipelineDb
65+
name: $(pipeline_install_configuration)
66+
- name: MYSQL_ALLOW_EMPTY_PASSWORD
67+
value: "true"
68+
resources:
69+
requests:
70+
cpu: 300m
71+
memory: 500Mi
72+
limits:
73+
cpu: 500m
74+
memory: 1Gi
75+
volumeMounts:
76+
- name: mariadb-persistent-storage
77+
mountPath: /var/lib/mysql
78+
volumes:
79+
- name: mariadb-persistent-storage
80+
persistentVolumeClaim:
81+
claimName: mariadb-pv-claim
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
4+
5+
bases:
6+
- ../../base
7+
8+
resources:
9+
# ServiceAccounts
10+
- ./serviceaccounts/mysql.yaml
11+
12+
# Secrets
13+
- ./secrets/mysql-secret.yaml
14+
15+
# PersistentVolumeClaims
16+
- ./persistentvolumeclaims/mariadb-pv-claim.yaml
17+
18+
# Deployments
19+
- ./deployments/mariadb.yaml
20+
21+
# Services
22+
- ./services/mysql.yaml
23+
24+
generatorOptions:
25+
disableNameSuffixHash: true
26+
27+
images:
28+
- name: mysql
29+
newName: registry.redhat.io/rhel8/mariadb-103
30+
newTag: "1-188"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: v1
2+
kind: PersistentVolumeClaim
3+
metadata:
4+
labels:
5+
application-crd-id: kubeflow-pipelines
6+
name: mariadb-pv-claim
7+
spec:
8+
accessModes:
9+
- ReadWriteOnce
10+
resources:
11+
requests:
12+
storage: 20Gi
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
labels:
5+
application-crd-id: kubeflow-pipelines
6+
name: mysql-secret
7+
stringData:
8+
password: mlpipeline # override this
9+
username: mlpipeline # override this
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: v1
2+
kind: ServiceAccount
3+
metadata:
4+
labels:
5+
application-crd-id: kubeflow-pipelines
6+
name: mysql
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
labels:
5+
application-crd-id: kubeflow-pipelines
6+
name: mysql
7+
spec:
8+
ports:
9+
- port: 3306
10+
protocol: TCP
11+
targetPort: 3306
12+
selector:
13+
app: mariadb
14+
application-crd-id: kubeflow-pipelines

0 commit comments

Comments
 (0)