From cee6c1507bd8fca5194dc747d3493b4f2f125ae3 Mon Sep 17 00:00:00 2001 From: Joakim Olsson Date: Sat, 20 Nov 2021 08:44:50 +0100 Subject: [PATCH] chore: change to an image which work on M1 Mac --- kustomization.yaml | 8 +-- mysql.yaml | 34 ++++----- postgres.yaml | 50 ++++++------- rabbitmq.yaml | 172 ++++++++++++++++++++++----------------------- 4 files changed, 132 insertions(+), 132 deletions(-) diff --git a/kustomization.yaml b/kustomization.yaml index 8bfea7c..d2f61ea 100644 --- a/kustomization.yaml +++ b/kustomization.yaml @@ -1,7 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - mysql.yaml - - postgres.yaml - - rabbitmq.yaml - - https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml +- mysql.yaml +- postgres.yaml +- rabbitmq.yaml +- https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml diff --git a/mysql.yaml b/mysql.yaml index ca1cd94..5bc3a22 100644 --- a/mysql.yaml +++ b/mysql.yaml @@ -25,21 +25,21 @@ spec: app: mysql spec: containers: - - image: mysql:8 + - image: jamielsharief/mysql + name: mysql + env: + - name: MYSQL_ROOT_PASSWORD + value: password + ports: + - containerPort: 3306 name: mysql - env: - - name: MYSQL_ROOT_PASSWORD - value: password - ports: - - containerPort: 3306 - name: mysql - volumeMounts: - - name: data - mountPath: /var/lib/mysql - volumes: + volumeMounts: - name: data - hostPath: - path: /data/mysql + mountPath: /var/lib/mysql + volumes: + - name: data + hostPath: + path: /data/mysql --- apiVersion: v1 @@ -50,10 +50,10 @@ metadata: name: mysql spec: ports: - - name: mysql - port: 3306 - nodePort: 3306 - protocol: TCP + - name: mysql + port: 3306 + nodePort: 3306 + protocol: TCP selector: app: mysql sessionAffinity: None diff --git a/postgres.yaml b/postgres.yaml index e0715ab..c118768 100644 --- a/postgres.yaml +++ b/postgres.yaml @@ -22,30 +22,30 @@ spec: app: postgres spec: containers: - - name: postgres - image: postgres:12.0 - imagePullPolicy: "IfNotPresent" - resources: - requests: - memory: 200Mi - limits: - memory: 300Mi - ports: - - containerPort: 5432 - env: - - name: POSTGRES_DB - value: postgres - - name: POSTGRES_USER - value: postgres - - name: POSTGRES_PASSWORD - value: postgres - volumeMounts: - - name: data - mountPath: /var/lib/postgresql/data - volumes: + - name: postgres + image: postgres:12.0 + imagePullPolicy: "IfNotPresent" + resources: + requests: + memory: 200Mi + limits: + memory: 300Mi + ports: + - containerPort: 5432 + env: + - name: POSTGRES_DB + value: postgres + - name: POSTGRES_USER + value: postgres + - name: POSTGRES_PASSWORD + value: postgres + volumeMounts: - name: data - hostPath: - path: /data/postgres + mountPath: /var/lib/postgresql/data + volumes: + - name: data + hostPath: + path: /data/postgres --- apiVersion: v1 kind: Service @@ -55,8 +55,8 @@ metadata: app: postgres spec: ports: - - port: 5432 - nodePort: 5432 + - port: 5432 + nodePort: 5432 selector: app: postgres type: NodePort diff --git a/rabbitmq.yaml b/rabbitmq.yaml index e91429a..d5689b6 100644 --- a/rabbitmq.yaml +++ b/rabbitmq.yaml @@ -30,73 +30,73 @@ spec: app: rabbitmq spec: containers: - - env: - - name: RABBITMQ_DEFAULT_USER - value: user - - name: RABBITMQ_DEFAULT_PASS - value: password - - name: RABBITMQ_NODE_PORT_NUMBER - value: "5672" - - name: RABBITMQ_NODE_TYPE - value: stats - - name: RABBITMQ_NODENAME - value: rabbit@localhost - - name: RABBITMQ_CLUSTER_NODE_NAME - - name: RABBITMQ_DEFAULT_VHOST - value: / - - name: RABBITMQ_MANAGER_PORT_NUMBER - value: "15672" - - name: RABBITMQ_DISK_FREE_LIMIT - value: '"8GiB"' - image: sparetimecoders/rabbitmq:latest - imagePullPolicy: Always - livenessProbe: - exec: - command: - - rabbitmqctl - - status - failureThreshold: 6 - initialDelaySeconds: 120 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 5 - name: rabbitmq - ports: - - containerPort: 4369 - name: epmd - protocol: TCP - - containerPort: 5672 - name: amqp - protocol: TCP - - containerPort: 25672 - name: dist - protocol: TCP - - containerPort: 15672 - name: stats - protocol: TCP - readinessProbe: - exec: - command: - - rabbitmqctl - - status - failureThreshold: 3 - initialDelaySeconds: 10 - periodSeconds: 5 - successThreshold: 1 - timeoutSeconds: 3 - resources: - requests: - cpu: 100m - memory: 256Mi - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - name: data - mountPath: /var/lib/rabbitmq - volumes: + - env: + - name: RABBITMQ_DEFAULT_USER + value: user + - name: RABBITMQ_DEFAULT_PASS + value: password + - name: RABBITMQ_NODE_PORT_NUMBER + value: "5672" + - name: RABBITMQ_NODE_TYPE + value: stats + - name: RABBITMQ_NODENAME + value: rabbit@localhost + - name: RABBITMQ_CLUSTER_NODE_NAME + - name: RABBITMQ_DEFAULT_VHOST + value: / + - name: RABBITMQ_MANAGER_PORT_NUMBER + value: "15672" + - name: RABBITMQ_DISK_FREE_LIMIT + value: '"8GiB"' + image: sparetimecoders/rabbitmq:latest + imagePullPolicy: Always + livenessProbe: + exec: + command: + - rabbitmqctl + - status + failureThreshold: 6 + initialDelaySeconds: 120 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + name: rabbitmq + ports: + - containerPort: 4369 + name: epmd + protocol: TCP + - containerPort: 5672 + name: amqp + protocol: TCP + - containerPort: 25672 + name: dist + protocol: TCP + - containerPort: 15672 + name: stats + protocol: TCP + readinessProbe: + exec: + command: + - rabbitmqctl + - status + failureThreshold: 3 + initialDelaySeconds: 10 + periodSeconds: 5 + successThreshold: 1 + timeoutSeconds: 3 + resources: + requests: + cpu: 100m + memory: 256Mi + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: - name: data - hostPath: - path: /data/rabbitmq + mountPath: /var/lib/rabbitmq + volumes: + - name: data + hostPath: + path: /data/rabbitmq dnsPolicy: ClusterFirst restartPolicy: Always @@ -112,26 +112,26 @@ metadata: spec: externalTrafficPolicy: Cluster ports: - - name: epmd - nodePort: 31799 - port: 4369 - protocol: TCP - targetPort: epmd - - name: amqp - nodePort: 5672 - port: 5672 - protocol: TCP - targetPort: amqp - - name: dist - nodePort: 32687 - port: 25672 - protocol: TCP - targetPort: dist - - name: stats - nodePort: 15672 - port: 15672 - protocol: TCP - targetPort: stats + - name: epmd + nodePort: 31799 + port: 4369 + protocol: TCP + targetPort: epmd + - name: amqp + nodePort: 5672 + port: 5672 + protocol: TCP + targetPort: amqp + - name: dist + nodePort: 32687 + port: 25672 + protocol: TCP + targetPort: dist + - name: stats + nodePort: 15672 + port: 15672 + protocol: TCP + targetPort: stats selector: app: rabbitmq sessionAffinity: None