| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, |
| # software distributed under the License is distributed on an |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| # KIND, either express or implied. See the License for the |
| # specific language governing permissions and limitations |
| # under the License. |
| # |
| |
| |
| apiVersion: v1 |
| kind: PersistentVolume |
| metadata: |
| name: fineractmysql-pv-volume |
| labels: |
| type: local |
| spec: |
| storageClassName: manual |
| capacity: |
| storage: 10Gi |
| accessModes: |
| - ReadWriteMany |
| hostPath: |
| path: "/mnt/data" |
| |
| --- |
| |
| apiVersion: v1 |
| kind: PersistentVolumeClaim |
| metadata: |
| name: fineractmysql-pv-claim |
| spec: |
| storageClassName: manual |
| accessModes: |
| - ReadWriteMany |
| resources: |
| requests: |
| storage: 5Gi |
| |
| --- |
| |
| apiVersion: v1 |
| kind: Service |
| metadata: |
| labels: |
| app: fineract-server |
| name: fineractmysql |
| spec: |
| ports: |
| - protocol: TCP |
| port: 3306 |
| targetPort: 3306 |
| selector: |
| app: fineract-server |
| tier: fineractmysql |
| clusterIP: None |
| |
| --- |
| |
| apiVersion: apps/v1 |
| kind: Deployment |
| metadata: |
| labels: |
| app: fineract-server |
| name: fineractmysql |
| spec: |
| selector: |
| matchLabels: |
| app: fineract-server |
| tier: fineractmysql |
| strategy: |
| type: Recreate |
| template: |
| metadata: |
| labels: |
| app: fineract-server |
| tier: fineractmysql |
| spec: |
| containers: |
| - image: mariadb:10.6 |
| name: mysql |
| resources: |
| requests: |
| memory: "1Gi" |
| cpu: "1000m" |
| limits: |
| memory: "5Gi" |
| cpu: "2000m" |
| env: |
| - name: MARIADB_ROOT_PASSWORD |
| valueFrom: |
| secretKeyRef: |
| name: fineract-tenants-db-secret |
| key: password |
| livenessProbe: |
| exec: |
| command: ["sh","-c","mysqladmin ping -h localhost -uroot -p${MARIADB_ROOT_PASSWORD}"] |
| failureThreshold: 10 |
| timeoutSeconds: 10 |
| readinessProbe: |
| exec: |
| command: |
| - sh |
| - -c |
| - mysqladmin ping -uroot -p${MARIADB_ROOT_PASSWORD} |
| failureThreshold: 10 |
| initialDelaySeconds: 5 |
| periodSeconds: 5 |
| ports: |
| - containerPort: 3306 |
| name: fineractmysql |
| volumeMounts: |
| - name: fineractmysql-initdb |
| mountPath: /docker-entrypoint-initdb.d/ |
| - name: fineractmysql-persistent-storage |
| mountPath: /var/lib/mysql/ |
| volumes: |
| - name: fineractmysql-initdb |
| configMap: |
| name: fineractmysql-initdb |
| - name: fineractmysql-persistent-storage |
| persistentVolumeClaim: |
| claimName: fineractmysql-pv-claim |