diff --git a/charts/platform-api/Chart.yaml b/charts/platform-api/Chart.yaml index b0ca5f5..f21cb48 100644 --- a/charts/platform-api/Chart.yaml +++ b/charts/platform-api/Chart.yaml @@ -1,4 +1,4 @@ apiVersion: v1 name: ushahidi-platform-api -version: 0.0.1-alpha.19 +version: 0.0.1-alpha.20 icon: https://github.ushahidi.org/helm-charts/icon.png diff --git a/charts/platform-api/templates/api-worker.yml b/charts/platform-api/templates/api-worker.yml index 13fe56d..8486251 100644 --- a/charts/platform-api/templates/api-worker.yml +++ b/charts/platform-api/templates/api-worker.yml @@ -176,6 +176,8 @@ spec: value: {{ .Values.api.params.upload_max_filesize | quote }} - name: PHP_POST_MAX_SIZE value: {{ .Values.api.params.upload_max_filesize | quote }} + - name: MEDIA_MAX_UPLOAD + value: {{ .Values.api.params.media_max_upload | quote }} {{- if .Values.config.shared_secret }} - name: PLATFORM_SHARED_SECRET value: {{ .Values.config.shared_secret | quote }} diff --git a/charts/platform-api/tests/multi_test.yaml b/charts/platform-api/tests/multi_test.yaml new file mode 100644 index 0000000..728e94a --- /dev/null +++ b/charts/platform-api/tests/multi_test.yaml @@ -0,0 +1,15 @@ +# # yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json +suite: simple test +templates: +- templates/api-worker.yaml +- templates/memcached.yaml + +tests: +- it: api should work + values: + - ./values/simple.yaml + template: templates/api.yaml + asserts: + - equal: + path: metadata.name + value: api diff --git a/charts/platform-api/tests/values/multi-values.yaml b/charts/platform-api/tests/values/multi-values.yaml new file mode 100644 index 0000000..8a0f641 --- /dev/null +++ b/charts/platform-api/tests/values/multi-values.yaml @@ -0,0 +1,51 @@ +minReadySeconds: 60 +image: + tag: project-mzima +config: + appenv: production + timzone: UTC + multisite: + enabled: true + domain: ushahidi.io + api_domain: api.ushahidi.io + email: support@ushahidi.com + drivers: + cache: memcached + ratelimiter_cache: memcached + mail_from: + address: support@ushahidi.com + name: "Platform Deployment Admin" + redis: + host: production-redis.ujenic.0001.euw1.cache.amazonaws.com + port: 6379 + mailgun_mail: + domain: mg.ushahidi.com + secret: abcdef + # -> secret_ref + rackspace_filesystem: + region: ORD + container: platform-cloud + username: ushahidi.api + apikey: cdefghi + # -> apikey_secret + +api: + replicas: 2 + limits: + cpu: "1" + memory: "512Mi" + requests: + cpu: "100m" + memory: "512Mi" + ingress: + host: io-test-api.staging.ush.zone # later: "*.api.ushahidi.io" + annotations: + external-dns.alpha.kubernetes.io/hostname: io-test-1.staging.ush.zone # ensure we control this +worker: + replicas: 0 # this will still run on the old infra for now +mysql: + enabled: false +redis: + enabled: false +memcached: + enabled: true \ No newline at end of file diff --git a/charts/platform-api/values.yaml b/charts/platform-api/values.yaml index 8366b87..eaf6732 100644 --- a/charts/platform-api/values.yaml +++ b/charts/platform-api/values.yaml @@ -118,6 +118,7 @@ api: params: php_exec_time_limit: 60 upload_max_filesize: 2m + media_max_upload: 2000000 limits: cpu: "1" memory: "1Gi"