summaryrefslogtreecommitdiffstats
path: root/docs/samples
diff options
context:
space:
mode:
Diffstat (limited to 'docs/samples')
-rw-r--r--docs/samples/access/externalip.yaml28
-rw-r--r--docs/samples/mysql/templates/01-sds-secrets.yml.j226
-rw-r--r--docs/samples/mysql/vars/sds.yml24
3 files changed, 78 insertions, 0 deletions
diff --git a/docs/samples/access/externalip.yaml b/docs/samples/access/externalip.yaml
new file mode 100644
index 0000000..3827968
--- /dev/null
+++ b/docs/samples/access/externalip.yaml
@@ -0,0 +1,28 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: epics-softioc-external
+ namespace: epics
+spec:
+ type: ClusterIP
+ selector:
+ deploymentconfig: epics-softioc
+ externalIPs:
+ - 192.168.130.1
+ ports:
+ - name: 5064-tcp
+ port: 5064
+ protocol: TCP
+ targetPort: 5064
+ - name: 5064-udp
+ port: 5064
+ protocol: UDP
+ targetPort: 5064
+ - name: 5065-tcp
+ port: 5065
+ protocol: TCP
+ targetPort: 5065
+ - name: 5065-udp
+ port: 5065
+ protocol: UDP
+ targetPort: 5065
diff --git a/docs/samples/mysql/templates/01-sds-secrets.yml.j2 b/docs/samples/mysql/templates/01-sds-secrets.yml.j2
new file mode 100644
index 0000000..2922118
--- /dev/null
+++ b/docs/samples/mysql/templates/01-sds-secrets.yml.j2
@@ -0,0 +1,26 @@
+apiVersion: v1
+kind: Template
+metadata:
+ name: sds-secrets
+ labels:
+ app: sds
+ annotations:
+ descriptions: "SymmetricDS Secrets"
+objects:
+- apiVersion: v1
+ kind: Secret
+ metadata:
+ annotations:
+ template.openshift.io/expose-root_password: '{.data[''root-password'']}'
+ template.openshift.io/expose-database_password: '{.data[''database-password'']}'
+ name: sds
+ stringData:
+ root-password: "${DATABASE_PASSWORD}"
+ database-password: "${DATABASE_PASSWORD}"
+parameters:
+- description: SymmetricDS Database Password
+ displayName: SymmetricDS Database Password
+ from: '[a-zA-Z0-9]{16}'
+ generate: expression
+ name: DATABASE_PASSWORD
+ required: true
diff --git a/docs/samples/mysql/vars/sds.yml b/docs/samples/mysql/vars/sds.yml
new file mode 100644
index 0000000..abe0f4f
--- /dev/null
+++ b/docs/samples/mysql/vars/sds.yml
@@ -0,0 +1,24 @@
+sds:
+ pods:
+ sds-mysql:
+ service: { ports: [ 3306 ] }
+ sched: { replicas: 1, strategy: "Recreate" }
+ groups: [ "services_sds" ]
+ images:
+ - stream: "openshift/mysql:5.7"
+ env:
+ - { name: "MYSQL_USER", value: "sds" }
+ - { name: "MYSQL_PASSWORD", value: "secret@sds/database-password" }
+ - { name: "MYSQL_ROOT_PASSWORD", value: "secret@sds/root-password" }
+ - { name: "MYSQL_DATABASE", value: "sds" }
+ - { name: "MYSQL_MAX_CONNECTIONS", value: "50" }
+ mappings:
+ - { name: "db", path: "sds", mount: "/var/lib/mysql/data" }
+ resources: { limit: { cpu: 1000m, mem: 2Gi } }
+# probes:
+# - { port: 3306 }
+ probes:
+ - { type: "liveness", port: 3306 }
+ - { type: "readiness", command: [ /bin/sh, -i, -c, MYSQL_PWD="$MYSQL_PASSWORD" mysql -h 127.0.0.1 -u $MYSQL_USER -D $MYSQL_DATABASE -e 'SELECT 1' ], delay: "15", timeout: "5" }
+ hooks:
+ - { type: "postStart", command: [ /bin/sh, -i, -c, sleep 10; MYSQL_PWD="$MYSQL_ROOT_PASSWORD" mysql -h 127.0.0.1 -u root -D $MYSQL_DATABASE -e "GRANT ALL ON *.* TO 'sds'@'%'; UPDATE mysql.user SET Super_Priv='Y' WHERE user='sds' AND host='%'; FLUSH PRIVILEGES;" ] }