sdap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eamonf...@apache.org
Subject [incubator-sdap-nexus] branch bug_fixes updated: Cleanup
Date Tue, 08 Dec 2020 17:46:47 GMT
This is an automated email from the ASF dual-hosted git repository.

eamonford pushed a commit to branch bug_fixes
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexus.git


The following commit(s) were added to refs/heads/bug_fixes by this push:
     new e9cffd2  Cleanup
e9cffd2 is described below

commit e9cffd2a291e6cc65246cf708ff8c90b7e5694d1
Author: Eamon Ford <eamonford@gmail.com>
AuthorDate: Tue Dec 8 09:46:32 2020 -0800

    Cleanup
---
 helm/templates/collection-manager.yml | 19 ++++++++-----------
 helm/templates/granule-ingester.yml   |  9 +++++----
 helm/templates/history-pvc.yml        |  3 ++-
 helm/values.yaml                      |  7 +------
 4 files changed, 16 insertions(+), 22 deletions(-)

diff --git a/helm/templates/collection-manager.yml b/helm/templates/collection-manager.yml
index 3404e49..993e71e 100644
--- a/helm/templates/collection-manager.yml
+++ b/helm/templates/collection-manager.yml
@@ -1,7 +1,4 @@
 {{- if .Values.ingestion.enabled }}
-{{- $history := .Values.ingestion.history | default dict }}
-{{- $s3 := .Values.ingestion.granules.s3 | default dict }}
-{{ $aws_creds_envs := $s3.awsCredsEnvs | default dict }}
 
 apiVersion: apps/v1
 kind: Deployment
@@ -32,18 +29,18 @@ spec:
               value: {{ .Values.rabbitmq.fullnameOverride }}
             - name: COLLECTIONS_PATH
               value: {{ include "nexus.collectionsConfig.mountPath" . }}/collections.yml
-            {{- if $history.solrEnabled }}
+            {{- if .Values.ingestion.history.solrEnabled }}
             - name: HISTORY_URL
               value: {{ include "nexus.urls.solr" . }}
             {{- else }}
             - name: HISTORY_PATH
               value: {{ include "nexus.history.mountPath" . }}
             {{- end }}
-            {{- if $s3.bucket }}
+            {{- if .Values.ingestion.granules.s3.bucket }}
             - name: S3_BUCKET
-              value: {{ $s3.bucket }}
+              value: {{ .Values.ingestion.granules.s3.bucket }}
             {{- end }}
-            {{- range $name, $value := $aws_creds_envs }}
+            {{- range $name, $value := .Values.ingestion.granules.s3.awsCredsEnvs }}
             - name: {{ $name }}
               value: {{ $value }}
             {{- end }}
@@ -55,23 +52,23 @@ spec:
               cpu: {{ .Values.ingestion.collectionManager.cpu }}
               memory: {{ .Values.ingestion.collectionManager.memory }}
           volumeMounts:
-            {{- if not $history.solrEnabled }}
+            {{- if not .Values.ingestion.history.solrEnabled }}
             - name: history-volume
               mountPath: {{ include "nexus.history.mountPath" . }}
             {{- end }}
             - name: collections-config-volume
               mountPath: {{ include "nexus.collectionsConfig.mountPath" . }}
-{{- if not $s3.bucket }}
+{{- if not .Values.ingestion.granules.s3.bucket }}
 {{ include "nexus.ingestion.dataVolumeMount" . | indent 12 }}
 {{- end }}
       volumes:
-{{- if not $s3.bucket }}
+{{- if not .Values.ingestion.granules.s3.bucket }}
 {{ include "nexus.ingestion.dataVolume" . | indent 8 }}
 {{- end }}
         - name: collections-config-volume
           configMap:
             name: {{ include "nexus.collectionsConfig.configmapName" . }}
-        {{- if not $history.solrEnabled }}
+        {{- if not .Values.ingestion.history.solrEnabled }}
         - name: history-volume
           persistentVolumeClaim:
             claimName: history-volume-claim
diff --git a/helm/templates/granule-ingester.yml b/helm/templates/granule-ingester.yml
index 3a2aeeb..405edb8 100644
--- a/helm/templates/granule-ingester.yml
+++ b/helm/templates/granule-ingester.yml
@@ -1,8 +1,5 @@
 {{- if .Values.ingestion.enabled }}
 
-{{- $s3 := .Values.ingestion.granules.s3 | default dict }}
-{{ $aws_creds_envs := $s3.awsCredsEnvs | default dict }}
-
 apiVersion: apps/v1
 kind: Deployment
 metadata:
@@ -42,7 +39,7 @@ spec:
             - name: MAX_CONCURRENCY
               value: "{{ .Values.ingestion.granuleIngester.maxConcurrency }}"
             {{ end }}
-            {{- range $name, $value := $aws_creds_envs }}
+            {{- range $name, $value := .Values.ingestion.granules.s3.awsCredsEnvs }}
             - name: {{ $name }}
               value: {{ $value }}
             {{- end }}
@@ -54,9 +51,13 @@ spec:
               cpu: {{ .Values.ingestion.granuleIngester.cpu }}
               memory: {{ .Values.ingestion.granuleIngester.memory }}
           volumeMounts:
+{{- if not .Values.ingestion.granules.s3.bucket }}
 {{ include "nexus.ingestion.dataVolumeMount" . | indent 12 }}
+{{- end }}
       volumes:
+{{- if not .Values.ingestion.granules.s3.bucket }}
 {{ include "nexus.ingestion.dataVolume" . | indent 8 }}
+{{- end }}
       restartPolicy: Always
 {{- end }}
 
diff --git a/helm/templates/history-pvc.yml b/helm/templates/history-pvc.yml
index 254d9e9..50e9249 100644
--- a/helm/templates/history-pvc.yml
+++ b/helm/templates/history-pvc.yml
@@ -1,3 +1,4 @@
+{{- if not .Values.ingestion.history.solrEnabled }}
 apiVersion: v1
 kind: PersistentVolumeClaim
 metadata:
@@ -11,4 +12,4 @@ spec:
     requests:
       storage: 1Gi
   storageClassName: {{ .Values.ingestion.history.storageClass }}
-
+{{- end }}
diff --git a/helm/values.yaml b/helm/values.yaml
index 32e3908..657fb6a 100644
--- a/helm/values.yaml
+++ b/helm/values.yaml
@@ -75,12 +75,7 @@ ingestion:
       bucket: 
 
       ## awsCredsEnvs can include any environment variables that contain AWS credentials
-      awsCredsEnvs:
-      # AWS_ACCESS_KEY_ID: secret
-      # AWS_SECRET_ACCESS_KEY: secret
-      # AWS_SESSION_TOKEN: secret
-      # AWS_DEFAULT_REGION: us-west-2
-
+      awsCredsEnvs: {}
 
   ## Where to find the Collections Config file
   ## ref: https://github.com/apache/incubator-sdap-ingester/tree/dev/collection_manager#the-collections-configuration-file


Mime
View raw message