apps-minio: migrate to helm chart
diff --git a/apps/minio/chart/Chart.lock b/apps/minio/chart/Chart.lock
new file mode 100644
index 0000000..5498140
--- /dev/null
+++ b/apps/minio/chart/Chart.lock
@@ -0,0 +1,6 @@
+dependencies:
+- name: minio
+  repository: https://kubernetes-charts.storage.googleapis.com
+  version: 5.0.25
+digest: sha256:77e0578bf6c9e657f76a35f97c21a96704abec490d6eb3d680bb0a499cb572ce
+generated: "2020-05-14T20:06:48.933105+04:00"
diff --git a/apps/minio/chart/Chart.yaml b/apps/minio/chart/Chart.yaml
new file mode 100644
index 0000000..0936fbc
--- /dev/null
+++ b/apps/minio/chart/Chart.yaml
@@ -0,0 +1,15 @@
+apiVersion: v2
+name: object-store
+version: 1.0.0
+description: Provide Object store interface
+type: application
+sources:
+  - https://github.com/giolekva/pcloud/tree/master/apps/minio
+dependencies:
+  - name: minio
+    version: 5.0.25
+    repository: https://kubernetes-charts.storage.googleapis.com
+mainteners:
+  - name: Giorgi Lekveishvili
+    url: https://github.com/giolekva
+appVersion: 1.0.0
diff --git a/apps/minio/chart/README.md b/apps/minio/chart/README.md
new file mode 100644
index 0000000..3208388
--- /dev/null
+++ b/apps/minio/chart/README.md
@@ -0,0 +1,3 @@
+# Object Store
+
+Minio based S3 compatible object store
\ No newline at end of file
diff --git a/apps/minio/chart/charts/minio-5.0.25.tgz b/apps/minio/chart/charts/minio-5.0.25.tgz
new file mode 100644
index 0000000..ca149d5
--- /dev/null
+++ b/apps/minio/chart/charts/minio-5.0.25.tgz
Binary files differ
diff --git a/apps/minio/chart/templates/credentials.yaml b/apps/minio/chart/templates/credentials.yaml
new file mode 100644
index 0000000..bcec941
--- /dev/null
+++ b/apps/minio/chart/templates/credentials.yaml
@@ -0,0 +1,9 @@
+apiVersion: v1
+kind: Secret
+metadata:
+  name: minio-creds
+  namespace: {{ .Release.Namespace }}
+type: Opaque
+data:
+  accesskey: {{ .Values.accessKey | b64enc }}
+  secretkey: {{ .Values.secretKey | b64enc }}
diff --git a/apps/minio/chart/templates/ingress.yaml b/apps/minio/chart/templates/ingress.yaml
new file mode 100644
index 0000000..044c2e5
--- /dev/null
+++ b/apps/minio/chart/templates/ingress.yaml
@@ -0,0 +1,17 @@
+apiVersion: traefik.containo.us/v1alpha1
+kind: IngressRoute
+metadata:
+  name: ingress
+  namespace: {{ .Release.Namespace }}
+spec:
+  entryPoints:
+    - web
+  routes:
+  - kind: Rule
+    match: Host(`{{ .Values.ingressHost }}`)
+    services:
+    - kind: Service
+      name: minio
+      namespace: {{ .Release.Namespace }}
+      passHostHeader: true
+      port: {{ .Values.minio.service.port }}
diff --git a/apps/minio/chart/values.yaml b/apps/minio/chart/values.yaml
new file mode 100644
index 0000000..79a3fca
--- /dev/null
+++ b/apps/minio/chart/values.yaml
@@ -0,0 +1,12 @@
+accessKey: minio
+secretKey: minio123
+ingressHost: minio
+minio:
+  existingSecret: minio-creds
+  fullnameOverride: minio
+  image:
+    repository: giolekva/minio-arm
+    tag: latest
+    pullPolicy: Always
+  persistence:
+    size: 1Gi
diff --git a/apps/minio/deployment.yaml b/apps/minio/deployment.yaml
deleted file mode 100644
index a480be2..0000000
--- a/apps/minio/deployment.yaml
+++ /dev/null
@@ -1,108 +0,0 @@
-apiVersion: miniocontroller.min.io/v1beta1
-kind: MinIOInstance
-metadata:
-  name: minio
-## If specified, MinIOInstance pods will be dispatched by specified scheduler.
-## If not specified, the pod will be dispatched by default scheduler.
-# scheduler:
-#  name: my-custom-scheduler
-spec:
-  selector:
-    matchLabels:
-      app: minio # Should match spec.metadata.labels
-  ## Add metadata to the all pods created by the StatefulSet
-  metadata:
-    labels:
-      app: minio # Should match spec.selector.matchLabels
-    annotations:
-      prometheus.io/path: /minio/prometheus/metrics
-      prometheus.io/port: "9000"
-      prometheus.io/scrape: "true"
-  ## Registry location and Tag to download MinIO Server image
-  image: minio/minio:RELEASE.2020-01-03T19-12-21Z
-  ## Secret with credentials to be used by MinIO instance.
-  credsSecret:
-    name: minio-creds-secret
-  ## Supply number of replicas.
-  ## For standalone mode, supply 1. For distributed mode, supply 4 or more (should be even).
-  ## Note that the operator does not support upgrading from standalone to distributed mode.
-  replicas: 1
-  ## PodManagement policy for pods created by StatefulSet. Can be "OrderedReady" or "Parallel"
-  ## Refer https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#pod-management-policy
-  ## for details. Defaults to "Parallel"
-  ## If set to "OrderedReady", then disable Readiness checks below. Readiness check will only
-  ## work if PodManagementPolicy is set to "Parallel".
-  podManagementPolicy: Parallel
-  ## Enable Kubernetes based certificate generation and signing as explained in
-  ## https://kubernetes.io/docs/tasks/tls/managing-tls-in-a-cluster
-  requestAutoCert: false
-  ## Used when "requestAutoCert" is set to true. Set CommonName for the auto-generated certificate.
-  ## Internal DNS name for the pod will be used if CommonName is not provided.
-  certConfig:
-    commonName: ""
-    organizationName: []
-    dnsNames: []
-
-  ## Used to specify a toleration for a pod
-  # tolerations:
-  #  - effect: NoSchedule
-  #    key: dedicated
-  #    operator: Equal
-  #    value: storage
-  ## Add environment variables to be set in MinIO container (https://github.com/minio/minio/tree/master/docs/config)
-  env:
-    - name: MINIO_BROWSER
-      value: "on"
-    # - name: MINIO_STORAGE_CLASS_RRS
-    #   value: "EC:2"
-  ## Configure resource requests and limits for MinIO containers
-  resources:
-    requests:
-      memory: 512Mi
-      cpu: 250m
-  ## Liveness probe detects situations where MinIO server instance
-  ## is not working properly and needs restart. Kubernetes automatically
-  ## restarts the pods if liveness checks fail.
-  liveness:
-    httpGet:
-      path: /minio/health/live
-      port: 9000
-    initialDelaySeconds: 120
-    periodSeconds: 20
-  ## Readiness probe detects situations when MinIO server instance
-  ## is not ready to accept traffic. Kubernetes doesn't forward
-  ## traffic to the pod while readiness checks fail.
-  ## Readiness check will only work if PodManagementPolicy is set to "Parallel".
-  ## Disable this check if you're setting PodManagementPolicy to "OrderedReady".
-  readiness:
-    httpGet:
-      path: /minio/health/ready
-      port: 9000
-    initialDelaySeconds: 120
-    periodSeconds: 20
-  ## nodeSelector parameters for MinIO Pods. It specifies a map of key-value pairs. For the pod to be
-  ## eligible to run on a node, the node must have each of the
-  ## indicated key-value pairs as labels.
-  ## Read more here: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
-  # nodeSelector:
-  #   disktype: ssd
-  ## Affinity settings for MinIO pods. Read more about affinity
-  ## here: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity.
-  # affinity:
-  ## Secret with certificates to configure TLS for MinIO certs. Create secrets as explained
-  ## here: https://github.com/minio/minio/tree/master/docs/tls/kubernetes#2-create-kubernetes-secret
-  # externalCertSecret:
-  # name: tls-ssl-minio
-  ## Mountpath where PV will be mounted inside container(s). Defaults to "/export".
-  # mountPath: /export
-  ## Subpath inside Mountpath where MinIO starts. Defaults to "".
-  # subPath: /data
-  volumeClaimTemplate:
-    metadata:
-      name: data
-    spec:
-      accessModes:
-        - ReadWriteOnce
-      resources:
-        requests:
-          storage: 10Gi
\ No newline at end of file
diff --git a/apps/minio/ingress.yaml b/apps/minio/ingress.yaml
deleted file mode 100644
index 511e5bb..0000000
--- a/apps/minio/ingress.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
-apiVersion: traefik.containo.us/v1alpha1
-kind: IngressRoute
-metadata:
-  name: ingress
-  namespace: minio
-spec:
-  entryPoints:
-    - web
-  routes:
-  - kind: Rule
-    match: Host(`minio`)
-    services:
-    - kind: Service
-      name: minio
-      namespace: minio
-      passHostHeader: true
-      port: 9000
diff --git a/apps/minio/secrets.yaml b/apps/minio/secrets.yaml
deleted file mode 100644
index afc7e94..0000000
--- a/apps/minio/secrets.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-apiVersion: v1
-kind: Secret
-metadata:
-  name: minio-creds
-type: Opaque
-data:
-  accesskey: bWluaW8= # base 64 encoded "minio" (echo -n 'minio' | base64)
-  secretkey: bWluaW8xMjM= # based 64 encoded "minio123" (echo -n 'minio123' | base64)
diff --git a/apps/minio/setup.sh b/apps/minio/setup.sh
index 08d9c06..b4ee13b 100644
--- a/apps/minio/setup.sh
+++ b/apps/minio/setup.sh
@@ -1,20 +1,4 @@
 #!/bin/sh
 
 kubectl create namespace minio
-kubectl -n minio create -f secrets.yaml
-helm --namespace minio install minio-initial stable/minio \
-     --set fullnameOverride=minio \
-     --set image.repository=giolekva/minio-arm \
-     --set image.tag=latest \
-     --set image.pullPolicy=Always \
-     --set existingSecret=minio-creds \
-     --set persistence.size=1Gi
-kubectl -n minio create -f ingress.yaml
-
-
-# mc config host add pcloud http://minio:9000 minio minio123
-# mc mb pcloud/images
-# mc admin config set pcloud notify_webhook:pcloud queue_limit="100" queue_dir="/tmp/events" endpoint="http://minio-importer.app-minio-importer.svc:80/new_object"
-# mc admin service restart pcloud
-# mc event add pcloud/images arn:minio:sqs::pcloud:webhook --event put
-# mc event list pcloud/images
+helm --namespace minio install minio-initial chart/