From 117f37072c58b8c63cdea40a653980ffb2f5786f Mon Sep 17 00:00:00 2001
From: Martin Lowe <martin.lowe@eclipse-foundation.org>
Date: Tue, 13 Oct 2020 10:43:20 -0400
Subject: [PATCH] ConfigMap for adopters.json file + move adopter.json outside
 of jar

Signed-off-by: Martin Lowe <martin.lowe@eclipse-foundation.org>
---
 {src/main/resources => config}/adopters.json |  0
 src/main/k8s/production.yml                  | 11 +++++++++++
 src/main/resources/application.properties    |  5 ++++-
 3 files changed, 15 insertions(+), 1 deletion(-)
 rename {src/main/resources => config}/adopters.json (100%)

diff --git a/src/main/resources/adopters.json b/config/adopters.json
similarity index 100%
rename from src/main/resources/adopters.json
rename to config/adopters.json
diff --git a/src/main/k8s/production.yml b/src/main/k8s/production.yml
index 61b3231..b6a0406 100644
--- a/src/main/k8s/production.yml
+++ b/src/main/k8s/production.yml
@@ -41,6 +41,17 @@ spec:
           requests:
             cpu: 200m
             memory: 128Mi
+        volumeMounts:
+        - name: adopters
+          mountPath: "/config"
+          readOnly: true
+      volumes:
+        - name: adopters
+          configMap:
+            name: eclipsefdn-project-adopters-map
+            items:
+              - key: "adopters_json_compressed"
+                path: "adopters.json"
 ---
 apiVersion: "v1"
 kind: "Service"
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index e9bcfcc..85a9786 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -2,4 +2,7 @@ org.eclipsefoundation.adopters.api.ProjectsAPI/mp-rest/url=https://projects.ecli
 
 ## OAUTH CONFIG
 quarkus.http.port=8080
-quarkus.http.root-path=/adopters
\ No newline at end of file
+quarkus.http.root-path=/adopters
+
+## Adopters raw location
+eclipse.adopters.path.json=/config/adopters.json
\ No newline at end of file
-- 
GitLab