charts: move pcloud yaml configs into templates
diff --git a/apps/face-detection/chart/Chart.yaml b/apps/face-detection/chart/Chart.yaml
index 54dac91..b99438f 100644
--- a/apps/face-detection/chart/Chart.yaml
+++ b/apps/face-detection/chart/Chart.yaml
@@ -2,7 +2,7 @@
name: face-detection
version: 1.0.0
description: Provides MTCNN and HaarCascade based face recognition
-type: library
+type: application
sources:
- https://github.com/giolekva/pcloud/tree/master/apps/face-detection
mainteners:
diff --git a/apps/face-detection/chart/face-detection.tar.gz b/apps/face-detection/chart/face-detection.tar.gz
index 4bb0bd5..8e5f353 100644
--- a/apps/face-detection/chart/face-detection.tar.gz
+++ b/apps/face-detection/chart/face-detection.tar.gz
Binary files differ
diff --git a/apps/face-detection/chart/templates/deployment.yaml b/apps/face-detection/chart/templates/deployment.yaml
deleted file mode 100644
index 2f1784c..0000000
--- a/apps/face-detection/chart/templates/deployment.yaml
+++ /dev/null
@@ -1,23 +0,0 @@
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: {{ .Chart.Name }}
- namespace: {{ .Release.Namespace }}
-spec:
- selector:
- matchLabels:
- app: {{ .Chart.Name }}
- replicas: 1
- template:
- metadata:
- labels:
- app: {{ .Chart.Name }}
- spec:
- containers:
- - name: {{ .Chart.Name }}
- image: {{ .Values.image.name }}:{{ .Values.image.tag }}
- imagePullPolicy: {{ .Values.image.pullPolicy }}
- ports:
- - containerPort: {{ .Values.containerPort }}
- command: ["minio-importer"]
- args: ["--logtostderr", "--port={{ .Values.containerPort }}", "--api_addr={{ .Values.pcloudApiAddress }}"]
diff --git a/apps/face-detection/chart/Actions.yaml b/apps/face-detection/chart/templates/pcloud/Actions.yaml
similarity index 71%
rename from apps/face-detection/chart/Actions.yaml
rename to apps/face-detection/chart/templates/pcloud/Actions.yaml
index cc3d089..32b2a99 100644
--- a/apps/face-detection/chart/Actions.yaml
+++ b/apps/face-detection/chart/templates/pcloud/Actions.yaml
@@ -4,12 +4,12 @@
kind: Pod
apiVersion: v1
metadata:
- name: detect-faces-{{ .Id }}
+ name: detect-faces-{-{ .Id }-}
spec:
containers:
- name: detect-faces
image: giolekva/face-detector:latest
imagePullPolicy: Always
command: ["python3", "main.py"]
- args: [{{ .PCloudApiAddr }}, {{ .ObjectStoreAddr }}, {{ .Id }}]
+ args: [{-{ .PCloudApiAddr }-}, {-{ .ObjectStoreAddr }-}, {-{ .Id }-}]
restartPolicy: Never
diff --git a/apps/face-detection/chart/templates/service.yaml b/apps/face-detection/chart/templates/service.yaml
deleted file mode 100644
index c5aadb3..0000000
--- a/apps/face-detection/chart/templates/service.yaml
+++ /dev/null
@@ -1,13 +0,0 @@
-apiVersion: v1
-kind: Service
-metadata:
- name: {{ .Chart.Name }}
- namespace: {{ .Release.Namespace }}
-spec:
- type: ClusterIP
- selector:
- app: {{ .Chart.Name }}
- ports:
- - nodePort:
- port: {{ .Values.servicePort }}
- targetPort: {{ .Values.containerPort }}
diff --git a/apps/minio/chart/minio.tar.gz b/apps/minio/chart/minio.tar.gz
index 6834005..19633bd 100644
--- a/apps/minio/chart/minio.tar.gz
+++ b/apps/minio/chart/minio.tar.gz
Binary files differ
diff --git a/apps/minio/chart/templates/configmap.yaml b/apps/minio/chart/templates/configmap.yaml
index 5861511..ff62eda 100644
--- a/apps/minio/chart/templates/configmap.yaml
+++ b/apps/minio/chart/templates/configmap.yaml
@@ -3,4 +3,5 @@
metadata:
name: action-env
data:
- minio_addr: http://{{ template "minio.fullname" . }}:{{ .Values.minio.service.port }}
+ # TODO(giolekva): figure out how to use template "minio.fullname" .
+ minio_addr: http://{{ .Values.minio.fullnameOverride }}:{{ .Values.minio.service.port }}
diff --git a/apps/minio/chart/templates/ingress.yaml b/apps/minio/chart/templates/ingress.yaml
index 2e09222..94bd141 100644
--- a/apps/minio/chart/templates/ingress.yaml
+++ b/apps/minio/chart/templates/ingress.yaml
@@ -11,7 +11,8 @@
match: Host(`{{ .Values.ingressHost }}`)
services:
- kind: Service
- name: {{ template "minio.fullname" . }}
+ # TODO(giolekva): figure out how to use template "minio.fullname" .
+ name: {{ .Values.minio.fullnameOverride }}
namespace: {{ .Release.Namespace }}
passHostHeader: true
port: {{ .Values.minio.service.port }}
diff --git a/apps/minio/chart/templates/pcloud/Actions.yaml b/apps/minio/chart/templates/pcloud/Actions.yaml
index 3d674a6..6873de0 100644
--- a/apps/minio/chart/templates/pcloud/Actions.yaml
+++ b/apps/minio/chart/templates/pcloud/Actions.yaml
@@ -29,5 +29,5 @@
name: minio-creds
key: secretkey
command: ["/bin/sh", "-c"]
- args: ["mc config host add minio $MINIO_ADDR $ACCESS_KEY $SECRET_KEY && mc mb minio/[[ .BucketName ]] && mc admin config set minio notify_webhook:minio queue_limit=\"1000\" queue_dir=\"/tmp/events\" endpoint=\"[[ .WebhookURL ]]\" && mc admin service restart minio && mc event add minio/[[ .BucketName ]] arn:minio:sqs::minio:webhook --event put && mc policy set public minio/[[ .BucketName ]]"]
+ args: ["mc config host add minio $MINIO_ADDR $ACCESS_KEY $SECRET_KEY && mc mb minio/{-{ .BucketName }-} && mc admin config set minio notify_webhook:minio queue_limit=\"1000\" queue_dir=\"/tmp/events\" endpoint=\"{-{ .WebhookURL }-}\" && mc admin service restart minio && mc event add minio/{-{ .BucketName }-} arn:minio:sqs::minio:webhook --event put && mc policy set public minio/{-{ .BucketName }-}"]
restartPolicy: Never
diff --git a/apps/minio/importer/chart/minio-importer.tar.gz b/apps/minio/importer/chart/minio-importer.tar.gz
index 4c3bb91..50c978d 100644
--- a/apps/minio/importer/chart/minio-importer.tar.gz
+++ b/apps/minio/importer/chart/minio-importer.tar.gz
Binary files differ