-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add integration tests for external storage/db connections
Fix pre-commit issues Update test
- Loading branch information
1 parent
259315b
commit 0a6a268
Showing
13 changed files
with
363 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: mariadb | ||
namespace: test-mariadb | ||
labels: | ||
app: mariadb | ||
component: data-science-pipelines | ||
spec: | ||
strategy: | ||
type: Recreate # Need this since backing PVC is ReadWriteOnce, which creates resource lock condition in default Rolling strategy | ||
selector: | ||
matchLabels: | ||
app: mariadb | ||
component: data-science-pipelines | ||
template: | ||
metadata: | ||
labels: | ||
app: mariadb | ||
component: data-science-pipelines | ||
spec: | ||
containers: | ||
- name: mariadb | ||
image: quay.io/centos7/mariadb-103-centos7:ea07c0dade9571d78a272b453fd2dea92077dc7f | ||
ports: | ||
- containerPort: 3306 | ||
readinessProbe: | ||
exec: | ||
command: | ||
- /bin/sh | ||
- "-i" | ||
- "-c" | ||
- >- | ||
MYSQL_PWD=$MYSQL_PASSWORD mysql -h 127.0.0.1 -u $MYSQL_USER -D | ||
$MYSQL_DATABASE -e 'SELECT 1' | ||
failureThreshold: 3 | ||
initialDelaySeconds: 5 | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
timeoutSeconds: 1 | ||
livenessProbe: | ||
failureThreshold: 3 | ||
initialDelaySeconds: 30 | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
tcpSocket: | ||
port: 3306 | ||
timeoutSeconds: 1 | ||
env: | ||
- name: MYSQL_USER | ||
value: "mlpipeline" | ||
- name: MYSQL_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
key: "password" | ||
name: "ds-pipeline-db-test" | ||
- name: MYSQL_DATABASE | ||
value: "mlpipeline" | ||
- name: MYSQL_ALLOW_EMPTY_PASSWORD | ||
value: "true" | ||
resources: | ||
limits: | ||
cpu: 20m | ||
memory: 500Mi | ||
requests: | ||
cpu: 20m | ||
memory: 100m | ||
volumeMounts: | ||
- name: mariadb-persistent-storage | ||
mountPath: /var/lib/mysql | ||
volumes: | ||
- name: mariadb-persistent-storage | ||
persistentVolumeClaim: | ||
claimName: mariadb-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: test-mariadb | ||
resources: | ||
- deployment.yaml | ||
- pvc.yaml | ||
- secret.yaml | ||
- service.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
kind: PersistentVolumeClaim | ||
apiVersion: v1 | ||
metadata: | ||
name: mariadb-test | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 500Mi | ||
volumeMode: Filesystem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
kind: Secret | ||
apiVersion: v1 | ||
metadata: | ||
name: ds-pipeline-db-test | ||
namespace: test-mariadb | ||
labels: | ||
app: mariadb | ||
component: data-science-pipelines | ||
stringData: | ||
password: password | ||
type: Opaque |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
name: mariadb | ||
namespace: test-mariadb | ||
labels: | ||
app: mariadb | ||
component: data-science-pipelines | ||
spec: | ||
ports: | ||
- port: 3306 | ||
protocol: TCP | ||
targetPort: 3306 | ||
selector: | ||
app: mariadb | ||
component: data-science-pipelines |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
kind: Deployment | ||
apiVersion: apps/v1 | ||
metadata: | ||
name: minio | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: minio | ||
template: | ||
metadata: | ||
labels: | ||
app: minio | ||
spec: | ||
volumes: | ||
- name: data | ||
persistentVolumeClaim: | ||
claimName: minio | ||
containers: | ||
- resources: | ||
limits: | ||
cpu: 20m | ||
memory: 500Mi | ||
requests: | ||
cpu: 20m | ||
memory: 100m | ||
name: minio | ||
env: | ||
- name: MINIO_ROOT_USER | ||
valueFrom: | ||
secretKeyRef: | ||
name: minio | ||
key: accesskey | ||
- name: MINIO_ROOT_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: minio | ||
key: secretkey | ||
ports: | ||
- containerPort: 9000 | ||
protocol: TCP | ||
imagePullPolicy: IfNotPresent | ||
volumeMounts: | ||
- name: data | ||
mountPath: /data | ||
subPath: minio | ||
image: 'quay.io/minio/minio:RELEASE.2023-10-16T04-13-43Z' | ||
args: | ||
- server | ||
- /data | ||
- --console-address | ||
- ":9001" | ||
strategy: | ||
type: Recreate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: test-minio | ||
resources: | ||
- deployment.yaml | ||
- service.yaml | ||
- pvc.yaml | ||
- secret.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
kind: PersistentVolumeClaim | ||
apiVersion: v1 | ||
metadata: | ||
name: minio | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 500Mi | ||
volumeMode: Filesystem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
kind: Secret | ||
apiVersion: v1 | ||
metadata: | ||
name: minio | ||
stringData: | ||
accesskey: accesskey | ||
secretkey: secretkey | ||
type: Opaque |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
name: minio | ||
spec: | ||
ports: | ||
- name: https | ||
protocol: TCP | ||
port: 9000 | ||
targetPort: 9000 | ||
- name: console | ||
protocol: TCP | ||
port: 9001 | ||
targetPort: 9001 | ||
selector: | ||
app: minio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.