diff --git a/charts/mint/Chart.yaml b/charts/mint/Chart.yaml index 01dc643..3b46017 100644 --- a/charts/mint/Chart.yaml +++ b/charts/mint/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 3.3.1-alpha.9 +version: 3.3.1-alpha.10 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. diff --git a/charts/mint/templates/ensemble-manager-config.yaml b/charts/mint/templates/ensemble-manager-config.yaml index 1b73d60..00f0044 100644 --- a/charts/mint/templates/ensemble-manager-config.yaml +++ b/charts/mint/templates/ensemble-manager-config.yaml @@ -23,27 +23,26 @@ data: {{ .execution_engine | toRawJson | nindent 12}}, {{- end }} - {{- if eq .data_catalog.type "CKAN"}} - "data_catalog_api": {{ .data_catalog.api | quote }}, - "data_catalog_type": {{ .data_catalog.type | quote }}, + {{- end}} + + {{ with .Values.external_services}} + {{- if .ckan and eq .ckan.enabled true }} + "data_catalog_api": {{ .ckan.url | quote }}, + "data_catalog_type": {{ .ckan.type | quote }}, "data_catalog_extra": { - "owner_organization_id": {{ .data_catalog.extra.owner_organization_id | quote }}, - "owner_provenance_id": {{ .data_catalog.extra.owner_provenance_id | quote }} + "owner_organization_id": {{ .ckan.extra.owner_organization_id | quote }}, + "owner_provenance_id": {{ .ckan.extra.owner_provenance_id | quote }} }, {{- end}} - {{- end}} - + {{end}} - - {{- if eq .Values.components.ensemble_manager.config.data_server.type "S3" }} - {{- with .Values.components.ensemble_manager.config }} - "data_server_type": {{ .data_server.type | quote }}, + {{- if .Values.external_services.s3 and .Values.external_services.s3.enabled }} + "data_server_type": {{ .Values.external_services.s3.type | quote }}, "data_server": { - "region": {{ .data_server.region | quote }}, - "bucket": {{ .data_server.bucket | quote }}, - {{- end}} - "access_key": {{ .Values.secrets.data_server.s3.access_key | quote }}, - "secret_access_key": {{ .Values.secrets.data_server.s3.secret_key | quote }} + "region": {{ .Values.external_services.s3.region | quote }}, + "bucket": {{ .Values.external_services.s3.bucket | quote }}, + "access_key": {{ .Values.secrets.external_services.s3.access_key | quote }}, + "secret_access_key": {{ .Values.secrets.external_services.s3.secret_key | quote }} }, {{- end}} diff --git a/charts/mint/templates/ui-config.yaml b/charts/mint/templates/ui-config.yaml index fca7b75..c8d0067 100644 --- a/charts/mint/templates/ui-config.yaml +++ b/charts/mint/templates/ui-config.yaml @@ -85,9 +85,16 @@ data: window.REACT_APP_AIRFLOW_API = "https://airflow.mint.isi.edu/api/v1"; window.REACT_APP_AIRFLOW_DAG_DOWNLOAD_THREAD_ID = "download_thread" - {{ if and .Values.components.ensemble_manager.config.data_catalog (eq .Values.components.ensemble_manager.config.data_catalog.type "CKAN") }} - window.REACT_APP_DATA_CATALOG_TYPE = "CKAN"; - window.REACT_APP_DATA_CATALOG_KEY = {{ .Values.secrets.data_catalog.ckan.api_key | quote }}; + {{ with .Values.external_services }} + {{- if .ckan and eq .ckan.enabled true }} + window.REACT_APP_DATA_CATALOG_TYPE = {{ .ckan.type | quote }}; + window.REACT_APP_DATA_CATALOG_KEY = {{ .ckan.api_key | quote }}; + {{ end }} + {{ end }} + + {{ with .Values.components.data_catalog }} + {{ if eq .enabled false }} + window.REACT_APP_DATA_CATALOG_API = {{.Values.external_services.ckan.url | quote }}; {{ end }} {{ end }} diff --git a/charts/mint/values.yaml b/charts/mint/values.yaml index a36063d..3d944b7 100644 --- a/charts/mint/values.yaml +++ b/charts/mint/values.yaml @@ -265,17 +265,6 @@ components: environment: data_dir: /var/mint config: - data_catalog: - api: "http://localhost:5000" - type: "CKAN" - extra: - owner_organization_id: "21033e7d-484d-4974-9340-8c5755242c1f" - owner_provenance_id: "9ef60317-5da5-4050-8bbc-7d6826fee49f" - data_server: - type: "S3" - region: "ap-south-1" - bucket: "mintdata" - graphql: endpoint: "localhost:30003/v1/graphql" enable_ssl: false @@ -327,10 +316,9 @@ google: key: AIzaSyAkRnERo4F4dy9AhdrWHAN5vdJWs0vZCgM secrets: - data_catalog: + external_services: ckan: api_key: CHANGEME - data_server: s3: access_key: CHANGEME secret_key: CHANGEME @@ -385,3 +373,18 @@ autoscaling: nodeSelector: {} tolerations: [] affinity: {} + +external_services: + ckan: + enabled: false + url: "http://localhost:5000" + type: "CKAN" + api_key: "CHANGEME" + extra: + owner_organization_id: "21033e7d-484d-4974-9340-8c5755242c1f" + owner_provenance_id: "9ef60317-5da5-4050-8bbc-7d6826fee49f" + s3: + enabled: false + type: "S3" + region: "" + bucket: ""