EOX GitLab Instance

Skip to content
Snippets Groups Projects
Commit 0abaff01 authored by Fabian Schindler's avatar Fabian Schindler
Browse files

Fixing templates for registrar and preprocessor

parent 6fbb8e8e
No related branches found
No related tags found
2 merge requests!37Chart,!36Staging to master to prepare 1.0.0 release
{{- define "preprocessor.storage" }}
source:
{{- with .Values.config.objectStorage.download }}
type: {{ .type }}
kwargs:
{{- if eq .type "swift" }}
{{- if eq .type "swift" }}
username: {{ .username }}
password: {{ .password }}
tenant_name: {{ .tenant_name }}
......@@ -10,17 +11,33 @@
auth_url: {{ .auth_url }}
auth_version: {{ .auth_version }}
user_domain_name: {{ .user_domain_name }}
{{- else if eq .type "s3" }}
{{- else if eq .type "s3" }}
bucket: {{ .bucket }}
endpoint_url: {{ .endpoint_url }}
access_key_id: {{ .access_key_id }}
secret_access_key: {{ .secret_access_key }}
region: {{ .region }}
{{- end }}
{{- end -}}
source:
{{ template "preprocessor.storage" .Values.config.objectStorage.download | indent 2 }}
{{- end }}
{{- end }}
target:
{{ template "preprocessor.storage" .Values.config.objectStorage.data | indent 2 }}
{{- with .Values.config.objectStorage.data }}
type: {{ .type }}
kwargs:
{{- if eq .type "swift" }}
username: {{ .username }}
password: {{ .password }}
tenant_name: {{ .tenant_name }}
tenant_id: {{ .tenant_id }}
region_name: {{ .region_name }}
auth_url: {{ .auth_url }}
auth_version: {{ .auth_version }}
user_domain_name: {{ .user_domain_name }}
{{- else if eq .type "s3" }}
bucket: {{ .bucket }}
endpoint_url: {{ .endpoint_url }}
access_key_id: {{ .access_key_id }}
secret_access_key: {{ .secret_access_key }}
region: {{ .region }}
{{- end }}
{{- end }}
{{ toYaml .Values.config.preprocessor | indent 2 }}
sources:
- kwargs:
{{- with .Values.config.objectStorage.download }}
type: {{ .type }}
name: name # TODO
kwargs:
{{- if eq .type "swift" }}
username: {{ .username }}
password: {{ .password }}
tenant_name: {{ .tenant_name }}
tenant_id: {{ .tenant_id }}
region_name: {{ .region_name }}
auth_url: {{ .auth_url }}
auth_version: {{ .auth_version }}
user_domain_name: {{ .user_domain_name }}
{{- else if eq .type "s3" }}
bucket: {{ .bucket }}
endpoint_url: {{ .endpoint_url }}
access_key_id: {{ .access_key_id }}
secret_access_key: {{ .secret_access_key }}
region: {{ .region }}
{{- end }}
{{- end }}
schemes:
{{- range .Values.config.registrar.schemes | default list }}
- {{ toYaml . }}
{{- end }}
backends:
- type: eoxserver
filter:
kwargs:
instance_base_path: /var/www/pvs/dev
instance_name: pvs_instance
mapping:
{{- range $product_type_name, $product_type := .Values.config.products.types }}
{{ $product_type_name }}:
{{- range $level := list "Level_1" "Level_3" }}
{{ $level }}:
product_type_name: {{ $product_type_name | quote }}
collections:
{{- range $collection_name, $collection_conf := $.Values.config.collections }}
{{- if and (has $product_type_name $collection_conf.product_types) (has $level $collection_conf.product_levels) }}
- {{ $collection_name }}
{{- end }}
{{- end }}
coverages:
{{ toYaml $product_type.coverages }}
masks:
{{- range $mask_name, $_ := $product_type.masks }}
{{ $mask_name }}: {{ $mask_name }}
{{- end }}
{{- end }}
{{- end }}
......@@ -3,4 +3,4 @@ kind: ConfigMap
metadata:
name: {{ include "vs.fullname" . }}-preprocessor-config
data:
{{ (tpl (.Files.Glob "files/preprocessor-config.yaml").AsConfig . ) | indent 2 }}
{{ (tpl (.Files.Glob "files/preprocessor-config.yaml").AsConfig . ) | nindent 2 }}
......@@ -41,11 +41,11 @@ config:
user_domain_name: "user_domain_name"
cache:
type: S3
bucket: "bucket:"
endpoint_url: "endpoint_url:"
access_key_id: "access_key_id:"
secret_access_key: "secret_access_key:"
region: "region:"
bucket: "bucket"
endpoint_url: "endpoint_url"
access_key_id: "access_key_id"
secret_access_key: "secret_access_key"
region: "region"
redis:
REDIS_HOST: redis
REDIS_PORT: "6379"
......@@ -193,6 +193,10 @@ config:
PH1B: # just to pass validation
nested: true
registrar:
schemes:
- type: gsc
# mapping of collection name to objects
collections:
VHR_IMAGE_2018:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment