Add test for mariadb
Change-Id: I48ac063c8871523dee7b55f813468f2120427970
This commit is contained in:
parent
bd96f4b8ef
commit
834a2d9165
|
@ -5,6 +5,32 @@
|
|||
set -x
|
||||
|
||||
oc cluster up
|
||||
oc login -u system:admin
|
||||
oc delete scc anyuid hostaccess hostmount-anyuid hostnetwork privileged nonroot restricted
|
||||
|
||||
cat <<EOF | oc create -f -
|
||||
kind: SecurityContextConstraints
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: permissive
|
||||
allowHostDirVolumePlugin: true
|
||||
allowHostIPC: true
|
||||
allowHostNetwork: true
|
||||
allowHostPID: true
|
||||
allowHostPorts: true
|
||||
allowPrivilegedContainer: true
|
||||
allowedCapabilities:
|
||||
- '*'
|
||||
runAsUser:
|
||||
type: RunAsAny
|
||||
seLinuxContext:
|
||||
type: RunAsAny
|
||||
groups:
|
||||
- system:authenticated
|
||||
defaultAddCapabilities: []
|
||||
fsGroup:
|
||||
type: RunAsAny
|
||||
EOF
|
||||
executable: /bin/bash
|
||||
become: true
|
||||
delegate_to: "primary"
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
- name: Get mariadb cluster ip
|
||||
shell:
|
||||
cmd: |
|
||||
kubectl get service mariadb --namespace {{namespace}} --template={%raw%}{{.spec.clusterIP}}{%endraw%}
|
||||
executable: /bin/bash
|
||||
register: mariadb_ip
|
||||
|
||||
- name: Wait for mariadb to become available
|
||||
wait_for:
|
||||
host={{mariadb_ip.stdout}}
|
||||
port=3306
|
||||
delay=1
|
||||
timeout=300
|
Loading…
Reference in New Issue