Created
May 15, 2020 18:32
-
-
Save onefoursix/bdb44194bc272229d804ab217252e256 to your computer and use it in GitHub Desktop.
SDC Deployment YAML with MySQL connection properties loaded from a Kubernetes Secret
This file contains hidden or 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
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: sdc-jdbc | |
| namespace: ns1 | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| app: sdc-jdbc | |
| template: | |
| metadata: | |
| labels: | |
| app: sdc-jdbc | |
| spec: | |
| containers: | |
| - name: datacollector | |
| image: <your-repo>/<your-sdc-image>:<version> | |
| imagePullPolicy: Always | |
| ports: | |
| - containerPort: 18630 | |
| env: | |
| - name: HOST | |
| valueFrom: | |
| fieldRef: | |
| fieldPath: status.podIP | |
| - name: PORT0 | |
| value: "18630" | |
| volumeMounts: | |
| - name: mysql-secret | |
| mountPath: /resources/mysql | |
| volumes: | |
| - name: mysql-secret | |
| secret: | |
| secretName: mysql-secret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment