Last active
February 21, 2019 18:53
-
-
Save incfly/ba299926767e0e92c15fbe5f982ec441 to your computer and use it in GitHub Desktop.
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
kind: PersistentVolumeClaim | |
apiVersion: v1 | |
metadata: | |
name: mysql-pvc | |
spec: | |
accessModes: | |
- ReadWriteMany | |
volumeMode: Filesystem | |
resources: | |
requests: | |
storage: 1Gi | |
storageClassName: "fast" | |
selector: | |
matchLabels: | |
release: dev | |
--- | |
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
name: tmp-mysql-1 | |
labels: | |
release: dev | |
spec: | |
capacity: | |
storage: 1Gi | |
volumeMode: Filesystem | |
persistentVolumeReclaimPolicy: Retain | |
storageClassName: "fast" | |
accessModes: | |
- ReadWriteMany | |
hostPath: | |
path: /tmp/mysql | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: mysql | |
labels: | |
app: mysql | |
spec: | |
selector: | |
app: mysql | |
ports: | |
- port: 3306 | |
name: tcp | |
protocol: TCP | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: mysql-v1 | |
spec: | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: mysql | |
version: v1 | |
spec: | |
containers: | |
- name: mysql | |
image: mysql:5.7.22 | |
imagePullPolicy: IfNotPresent | |
env: | |
- name: MYSQL_ROOT_PASSWORD | |
value: "root" | |
ports: | |
- containerPort: 3306 | |
volumeMounts: | |
- name: mysql-volume | |
mountPath: /var/lib/mysql | |
volumes: | |
- name: mysql-volume | |
persistentVolumeClaim: | |
claimName: mysql-pvc | |
restartPolicy: Always | |
--- | |
apiVersion: networking.istio.io/v1alpha3 | |
kind: DestinationRule | |
metadata: | |
name: mysql-istio-mtls | |
spec: | |
host: mysql.default.svc.cluster.local | |
trafficPolicy: | |
tls: | |
mode: ISTIO_MUTUAL | |
# --- | |
# apiVersion: "authentication.istio.io/v1alpha1" | |
# kind: "MeshPolicy" | |
# metadata: | |
# name: "default" | |
# spec: | |
# peers: | |
# - mtls: | |
# mode: PERMISSIVE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment