diff --git a/.github/workflows/build-and-push.yaml b/.github/workflows/build-and-push.yaml index c87e30a7..7afbc78a 100644 --- a/.github/workflows/build-and-push.yaml +++ b/.github/workflows/build-and-push.yaml @@ -39,20 +39,7 @@ jobs: build_and_push_helm: name: publish pycsw helm to acr runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - domain: - - 3d - - dem - - raster - - pycsw steps: - - name: Display matrix and index - run: | - echo "Running on domain ${{ matrix.domain }}" - echo "This is matrix job #${{ strategy.job-index }}" - - name: checkout repo from latest commit uses: actions/checkout@v4 @@ -67,14 +54,14 @@ jobs: id: build_helm_chart uses: MapColonies/shared-workflows/actions/build-and-push-helm@build-and-push-helm-v1.0.1 with: - context: ./helm/${{ matrix.domain }} - domain: ${{ matrix.domain }} + context: ./helm + domain: common registry: ${{ secrets.ACR_URL }} - name: Update Helm Package in artifacts.json uses: MapColonies/shared-workflows/actions/update-artifacts-file@update-artifacts-file-v1 with: - domain: ${{ matrix.domain }} + domain: common type: helm artifact_name: ${{ steps.build_helm_chart.outputs.chart }} artifact_tag: ${{ steps.build_helm_chart.outputs.ver }} diff --git a/helm/dem/.helmignore b/helm/.helmignore similarity index 100% rename from helm/dem/.helmignore rename to helm/.helmignore diff --git a/helm/3d/Chart.yaml b/helm/3d/Chart.yaml deleted file mode 100644 index 50121b27..00000000 --- a/helm/3d/Chart.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v2 -name: pycsw -description: A Helm chart for 3d pycsw deployment -type: application -version: 6.7.3 -appVersion: 6.7.3 -dependencies: - - name: nginx - version: 2.3.1 - repository: oci://acrarolibotnonprod.azurecr.io/helm/common - - name: mclabels - version: 1.0.1 - repository: oci://acrarolibotnonprod.azurecr.io/helm/infra diff --git a/helm/3d/config/location.conf b/helm/3d/config/location.conf deleted file mode 100644 index 9080b5b0..00000000 --- a/helm/3d/config/location.conf +++ /dev/null @@ -1,4 +0,0 @@ -uwsgi_pass {{ include "pycsw.fullname" . }}:{{ .Values.env.port }}; -include uwsgi_params; -uwsgi_hide_header Set-Cookie; -uwsgi_param HTTP_Cookie ""; diff --git a/helm/3d/config/mappings.py b/helm/3d/config/mappings.py deleted file mode 100644 index 05e21604..00000000 --- a/helm/3d/config/mappings.py +++ /dev/null @@ -1,72 +0,0 @@ -MD_CORE_MODEL = { - 'typename': 'pycsw:CoreMetadata', - 'outputschema': 'http://pycsw.org/metadata', - 'mappings': { - # Needed fot PYCSW - 'pycsw:Links': 'links', - 'pycsw:Type': 'type', - 'pycsw:Typename': 'typename', - 'pycsw:Schema': 'schema', - 'pycsw:MDSource': 'mdsource', - 'pycsw:XML': 'xml', - 'pycsw:AnyText': 'anytext', - 'pycsw:InsertDate': 'insert_date', - 'pycsw:BoundingBox': 'wkt_geometry', - 'pycsw:Keywords': 'keywords', - - # Profile 3D fields - 'pycsw:Identifier': 'identifier', - 'pycsw:productId': 'product_id', - 'pycsw:title': 'product_name', - 'pycsw:productVersion': 'product_version', - 'pycsw:productType': 'product_type', - 'pycsw:productSubType': 'product_sub_type', - 'pycsw:abstract': 'description', - 'pycsw:creationDate': 'creation_date', - 'pycsw:updateDate': 'update_date', - 'pycsw:tempExtentBegin': 'source_start_date', - 'pycsw:tempExtentEnd': 'source_end_date', - 'pycsw:minResolution': 'min_resolution', - 'pycsw:maxResolution': 'max_resolution', - 'pycsw:horizontalAccuracyCE90': 'horizontal_accuracy_ce_90', - 'pycsw:accuracyLE90': 'accuracy_le_90', - 'pycsw:accuracySE90': 'accuracy_se_90', - 'pycsw:relativeAccuracySE90': 'relative_accuracy_se_90', - 'pycsw:visualAccuracy': 'visual_accuracy', - 'pycsw:sensorType': 'sensor_type', - 'pycsw:footprint': 'footprint', - 'pycsw:heightRangeFrom': 'height_range_from', - 'pycsw:heightRangeTo': 'height_range_to', - 'pycsw:CRS': 'srs', - 'pycsw:CRSName': 'srs_name', - 'pycsw:region': 'region', - 'pycsw:classification': 'classification', - 'pycsw:productionSystem': 'production_system', - 'pycsw:productionSystemVersion': 'production_system_version', - 'pycsw:creator': 'producer_name', - 'pycsw:minFlightAlt': 'min_flight_alt', - 'pycsw:maxFlightAlt': 'max_flight_alt', - 'pycsw:geographicArea': 'geographic_area', - 'pycsw:productBBox': 'product_bbox', - 'pycsw:productSource': 'product_source', - 'pycsw:productStatus': 'product_status', - - # Not in xml - 'pycsw:Title': 'title', - 'pycsw:AlternateTitle': 'title', - 'pycsw:Creator': 'producer_name', - 'pycsw:Abstract': 'description', - 'pycsw:Publisher': 'producer_name', - 'pycsw:Contributor': 'producer_name', - 'pycsw:Modified': 'update_date', - 'pycsw:Date': 'creation_date', - 'pycsw:Format': 'type', - 'pycsw:Source': 'product_name', - 'pycsw:AccessConstraints': 'classification', - 'pycsw:CRS': 'srs', - 'pycsw:Relation': '', - 'pycsw:Language': '', - 'pycsw:Keywords': '', - 'pycsw:TopicCategory': '' - } -} diff --git a/helm/3d/config/pycsw.cfg b/helm/3d/config/pycsw.cfg deleted file mode 100644 index 671ce94a..00000000 --- a/helm/3d/config/pycsw.cfg +++ /dev/null @@ -1,73 +0,0 @@ -[server] -home=/home/pycsw -url=${PYCSW_SERVER_URL} -mimetype=application/xml; charset=UTF-8 -encoding=UTF-8 -language=en-US -{{- if .Values.env.maxrecords}} -maxrecords={{ .Values.env.maxrecords }} -{{- end}} -loglevel={{ .Values.env.loglevel }} -logfile={{ .Values.env.logfile }} -#ogc_schemas_base=http://foo -#federatedcatalogues=http://catalog.data.gov/csw -#pretty_print=true -#gzip_compresslevel=8 -#domainquerytype=range -#domaincounts=true -#spatial_ranking=true -profiles={{ .Values.env.profiles }} - -[manager] -transactions=false -allowed_ips=127.0.0.1 -#csw_harvest_pagesize=10 - -[metadata:main] -identification_title=pycsw Geospatial Catalogue -identification_abstract=pycsw is an OGC CSW server implementation written in Python -identification_keywords=catalogue,discovery,metadata -identification_keywords_type=theme -identification_fees=None -identification_accessconstraints=None -provider_name=Organization Name -provider_url=https://pycsw.org/ -contact_name=Lastname, Firstname -contact_position=Position Title -contact_address=Mailing Address -contact_city=City -contact_stateorprovince=Administrative Area -contact_postalcode=Zip or Postal Code -contact_country=Country -contact_phone=+xx-xxx-xxx-xxxx -contact_fax=+xx-xxx-xxx-xxxx -contact_email=Email Address -contact_url=Contact URL -contact_hours=Hours of Service -contact_instructions=During hours of service. Off on weekends. -contact_role=pointOfContact - -[repository] -# sqlite -#database=sqlite:////home/pycsw/tests/functionaltests/suites/cite/data/cite.db -# postgres -database={{ template "pycsw-pg-connection-string" . }} -#database=postgresql://postgres:postgres@postgis-postgis/postgres -# mysql -#database=mysql://username:password@localhost/pycsw?charset=utf8 -mappings=${PYCSW_MAPPINGS_FILEPATH} -table=${DB_SCHEMA}.records -{{- if .Values.filterProductStatus }} -filter=(product_status != 'UNPUBLISHED' AND product_status != 'BEING_DELETED') -{{- end}} -stable_sort=true -[metadata:inspire] -#enabled=true -#languages_supported=eng,gre -#default_language=eng -#date=YYYY-MM-DD -#gemet_keywords=Utility and governmental services -#conformity_service=notEvaluated -#contact_name=Organization Name -#contact_email=Email Address -#temp_extent=YYYY-MM-DD/YYYY-MM-DD diff --git a/helm/3d/config/pycswWsgi.ini b/helm/3d/config/pycswWsgi.ini deleted file mode 100644 index d00faba3..00000000 --- a/helm/3d/config/pycswWsgi.ini +++ /dev/null @@ -1,38 +0,0 @@ -[uwsgi] -; based on https://github.com/kartoza/docker-mapproxy/blob/master/build_data/uwsgi.ini -chdir = /home/pycsw/pycsw -wsgi-file = cors.py -pidfile = /tmp/pycsw.pid -processes = {{ .Values.env.uwsgi.processes }} ; Maximum number of workers allowed -cheaper = 2 ; Minimum number of workers allowed -enable-threads = true -threads = {{ .Values.env.uwsgi.threads }} -master = true -disable-logging = true -vacuum = true -die-on-term = true ; Shutdown when receiving SIGTERM (default is respawn) -need-app = true ; This parameter prevents uWSGI from starting if it is unable to find or load your application module -max-requests = 1000 ; Restart workers after this many requests -reload-on-rss = 2048 ; Restart workers after this much resident memory -buffer-size = 14336 ; 14K, Set the internal buffer size for uwsgi packet -worker-reload-mercy = 60 ; How long to wait before forcefully killing workers -wsgi-disable-file-wrapper = true -harakiri = 60 -py-callos-afterfork = true ; allow workers to trap signals -cheaper-algo = busyness -cheaper-initial = 2 ; Workers created at startup -cheaper-overload = 1 ; Length of a cycle in seconds -cheaper-step = 2 ; How many workers to spawn at a time -cheaper-busyness-multiplier = 30 ; How many cycles to wait before killing workers -cheaper-busyness-min = 20 ; Below this threshold, kill workers (if stable for multiplier cycles) -cheaper-busyness-max = 70 ; Above this threshold, spawn new workers -cheaper-busyness-backlog-alert = 2 ; Spawn emergency workers if more than this many requests are waiting in the queue -cheaper-busyness-backlog-step = 2 ; How many emergency workers to create if there are too many requests in the queue -chmod-socket = 664 -uid = 1000 -gid = 0 -socket = :{{ .Values.env.pycswUwsgiPort }} -http-socket = :{{ .Values.env.port }} -stats = :{{ .Values.env.uwsgi.statsServer.stats }} -stats-http = {{ .Values.env.uwsgi.statsServer.enabled }} -stats-min = {{ .Values.env.uwsgi.statsServer.statsMinify }} diff --git a/helm/3d/config/server.conf b/helm/3d/config/server.conf deleted file mode 100644 index ed865a8d..00000000 --- a/helm/3d/config/server.conf +++ /dev/null @@ -1,10 +0,0 @@ -# pycsw server-level settings -keepalive_timeout 500; -proxy_connect_timeout 600; -proxy_send_timeout 600; -send_timeout 600; -client_max_body_size 5000; -client_header_timeout 600; -client_body_timeout 600; -client_header_buffer_size 12288; # 12K -large_client_header_buffers 4 12288; # 12K diff --git a/helm/3d/templates/_helpers.tpl b/helm/3d/templates/_helpers.tpl deleted file mode 100644 index 29ddb521..00000000 --- a/helm/3d/templates/_helpers.tpl +++ /dev/null @@ -1,139 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "pycsw.name" -}} -{{- default .Chart.Name | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "pycsw.fullname" -}} -{{- $name := default .Chart.Name }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "pycsw.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "pycsw.labels" -}} -helm.sh/chart: {{ include "pycsw.chart" . }} -{{ include "pycsw.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{ include "mclabels.labels" . }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "pycsw.selectorLabels" -}} -app.kubernetes.io/name: {{ include "pycsw.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{ include "mclabels.selectorLabels" . }} -{{- end }} - -{{/* - Returns the pycsw server url based on the provided values. -*/}} -{{- define "pycsw.serverURL" -}} - {{- $serverURL := "" }} - {{- if not .Values.nginx.route.host }} - {{- $serverURL = printf "http://localhost:8000" }} - {{- else -}} - {{- $protocol := .Values.nginx.route.tls.enabled | ternary "https" "http" }} - {{- $serverURL = printf "%s://%s" $protocol .Values.nginx.route.host }} - {{- if .Values.nginx.route.path }} - {{- $serverURL = printf "%s%s" $serverURL .Values.nginx.route.path }} - {{- end -}} - {{- end -}} - {{- printf "%s" $serverURL | quote }} -{{- end -}} - -{{/* -Returns the cloud provider name from the chart's values if exists or from global, defaults to minikube -*/}} -{{- define "pycsw.cloudProviderFlavor" -}} -{{- if .Values.cloudProvider.flavor }} - {{- .Values.cloudProvider.flavor -}} -{{- else -}} - {{- .Values.global.cloudProvider.flavor | default "minikube" -}} -{{- end -}} -{{- end -}} - -{{/* -Returns the tag of the chart. -*/}} -{{- define "pycsw.tag" -}} -{{- default (printf "v%s" .Chart.AppVersion) .Values.image.tag }} -{{- end }} - -{{/* -Returns the cloud provider docker registry url from the chart's values if exists or from global -*/}} -{{- define "pycsw.cloudProviderDockerRegistryUrl" -}} -{{- if .Values.cloudProvider.dockerRegistryUrl }} - {{- printf "%s/" .Values.cloudProvider.dockerRegistryUrl -}} -{{- else -}} - {{- printf "%s/" .Values.global.cloudProvider.dockerRegistryUrl -}} -{{- end -}} -{{- end -}} - -{{/* -Returns the cloud provider image pull secret name from the chart's values if exists or from global -*/}} -{{- define "pycsw.cloudProviderImagePullSecretName" -}} -{{- if .Values.cloudProvider.imagePullSecretName }} - {{- .Values.cloudProvider.imagePullSecretName -}} -{{- else if .Values.global.cloudProvider.imagePullSecretName -}} - {{- .Values.global.cloudProvider.imagePullSecretName -}} -{{- end -}} -{{- end -}} - -{{- define "pycsw-pg-connection-string" -}} -{{- "postgresql://${DB_USER}" -}} -{{- if .Values.global.postgres.user.requirePassword -}} -{{- ":${DB_PASSWORD}" -}} -{{- end -}} -{{- "@${DB_HOST}:${DB_PORT}/${DB_NAME}" -}} -{{- if .Values.global.postgres.ssl.enabled -}} -{{- "?sslmode=require" -}} -{{- if .Values.global.postgres.ssl.caFileName -}} -{{- "&sslrootcert=" -}}/.postgresql/ca.pem -{{- end -}} -{{- if .Values.global.postgres.ssl.certFileName -}} -{{- "&sslcert=" -}}/.postgresql/cert.pem -{{- end -}} -{{- if .Values.global.postgres.ssl.keyFileName -}} -{{- "&sslkey=" -}}/.postgresql/key.pem -{{- end -}} -{{- end -}} -{{- end -}} - -{{- define "pycsw.cors.allowedHeaders" -}} -{{- $headerList := list -}} -{{- if ne .Values.authentication.cors.allowedHeaders "" -}} -{{- range $k, $v := (split "," .Values.authentication.cors.allowedHeaders) -}} -{{- $headerList = append $headerList $v -}} -{{- end -}} -{{- $headerList = uniq $headerList -}} -{{- quote (join "," $headerList) -}} -{{- else -}} -"" -{{- end -}} -{{- end -}} diff --git a/helm/3d/templates/_tplValues.tpl b/helm/3d/templates/_tplValues.tpl deleted file mode 100644 index 901d8808..00000000 --- a/helm/3d/templates/_tplValues.tpl +++ /dev/null @@ -1,92 +0,0 @@ -{{/* -Copyright VMware, Inc. -SPDX-License-Identifier: APACHE-2.0 -*/}} - -{{/* vim: set filetype=mustache: */}} -{{/* -Renders a value that contains template perhaps with scope if the scope is present. -Usage: -{{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $ ) }} -{{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $ "scope" $app ) }} -*/}} -{{- define "common.tplvalues.render" -}} -{{- $value := typeIs "string" .value | ternary .value (.value | toYaml) }} -{{- if contains "{{" (toJson .value) }} - {{- if .scope }} - {{- tpl (cat "{{- with $.RelativeScope -}}" $value "{{- end }}") (merge (dict "RelativeScope" .scope) .context) }} - {{- else }} - {{- tpl $value .context }} - {{- end }} -{{- else }} - {{- $value }} -{{- end }} -{{- end -}} - -{{/* -Merge a list of values that contains template after rendering them. -Merge precedence is consistent with http://masterminds.github.io/sprig/dicts.html#merge-mustmerge -Usage: -{{ include "common.tplvalues.merge" ( dict "values" (list .Values.path.to.the.Value1 .Values.path.to.the.Value2) "context" $ ) }} -*/}} -{{- define "common.tplvalues.merge" -}} -{{- $dst := dict -}} -{{- range .values -}} -{{- $dst = include "common.tplvalues.render" (dict "value" . "context" $.context "scope" $.scope) | fromYaml | merge $dst -}} -{{- end -}} -{{ $dst | toYaml }} -{{- end -}} -{{/* -End of usage example -*/}} - -{{/* -Common definitions -*/}} -{{- define "merged.ca" -}} -{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.ca .Values.global.ca ) "context" . ) }} -{{- end -}} - -{{- define "merged.podAnnotations" -}} -{{- $globalAnnotations := dict }} -{{- range $key, $value := .Values.global.podAnnotations }} - {{- if $value.enabled }} - {{- $globalAnnotations = merge $globalAnnotations $value.annotations }} - {{- end }} -{{- end }} -{{- $mergedAnnotations := merge .Values.podAnnotations $globalAnnotations }} -{{- range $key, $value := $mergedAnnotations }} -{{ $key }}: "{{ $value }}" -{{- end }} -{{- end }} - -{{- define "merged.extraVolumes" -}} -{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.extraVolumes .Values.global.extraVolumes ) "context" . ) }} -{{- end -}} - -{{- define "merged.sidecars" -}} -{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.sidecars .Values.global.sidecars ) "context" . ) }} -{{- end -}} - -{{- define "merged.extraVolumeMounts" -}} -{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.extraVolumeMounts .Values.global.extraVolumeMounts ) "context" . ) }} -{{- end -}} - -{{- define "merged.metrics" -}} -{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.env.metrics .Values.global.metrics ) "context" . ) }} -{{- end -}} - -{{- define "merged.tracing" -}} -{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.env.tracing .Values.global.tracing ) "context" . ) }} -{{- end -}} - -{{/* -Custom definitions -*/}} -{{- define "merged.postgres" -}} -{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.postgres .Values.global.postgres ) "context" . ) }} -{{- end -}} - -{{- define "merged.opala" -}} -{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.opala .Values.global.opala ) "context" . ) }} -{{- end -}} diff --git a/helm/3d/templates/configmap-nginx.yaml b/helm/3d/templates/configmap-nginx.yaml deleted file mode 100644 index 2f5c85fa..00000000 --- a/helm/3d/templates/configmap-nginx.yaml +++ /dev/null @@ -1,8 +0,0 @@ -{{- $fullName := include "pycsw.fullname" . -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ $fullName }}-nginx-configmap -data: - location.conf: {{ tpl (.Files.Get "config/location.conf") . | quote }} - server.conf: {{ tpl (.Files.Get "config/server.conf") . | quote }} diff --git a/helm/3d/templates/configmap.yaml b/helm/3d/templates/configmap.yaml deleted file mode 100644 index 8964fc98..00000000 --- a/helm/3d/templates/configmap.yaml +++ /dev/null @@ -1,37 +0,0 @@ -{{- $chartName := include "pycsw.name" . -}} -{{- $fullName := include "pycsw.fullname" . -}} -{{- $ca := (include "merged.ca" . ) | fromYaml }} -{{- $tracing := (include "merged.tracing" . ) | fromYaml }} -{{- $metrics := (include "merged.metrics" . ) | fromYaml }} -{{- $postgres := (include "merged.postgres" . ) | fromYaml }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ $fullName }} -data: - {{ if $tracing.enabled }} - TELEMETRY_TRACING_ENABLED: 'true' - TELEMETRY_TRACING_URL: {{ $tracing.url }} - {{ end }} - {{ if $metrics.enabled }} - TELEMETRY_METRICS_ENABLED: 'true' - TELEMETRY_METRICS_URL: {{ $metrics.url }} - {{ end }} - {{- if $ca.enabled }} - REQUESTS_CA_BUNDLE: {{ printf "%s/%s" $ca.path $ca.key | quote }} - NODE_EXTRA_CA_CERTS: {{ printf "%s/%s" $ca.path $ca.key | quote }} - {{- end }} - pycsw.cfg: {{ tpl (.Files.Get "config/pycsw.cfg") . | quote }} - mappings.py: {{ .Files.Get "config/mappings.py" | quote }} - uwsgi.ini: {{ tpl (.Files.Get "config/pycswWsgi.ini") . | quote }} - CORS_ENABLED: {{ .Values.authentication.cors.enabled | quote }} - CORS_ALLOWED_HEADERS: {{ template "pycsw.cors.allowedHeaders" . }} - CORS_ALLOWED_ORIGIN: {{ .Values.authentication.cors.allowedOrigin | quote }} - LOG_FORMAT: {{ .Values.env.logFormat | quote }} - DB_HOST: {{ quote $postgres.host }} - DB_PORT: {{ quote $postgres.port }} - DB_NAME: {{ quote $postgres.name }} - POSTGRES_ENABLE_SSL_AUTH: {{ quote $postgres.ssl.enabled }} - DB_SCHEMA: {{ quote $postgres.schema }} - COORDINATE_PRECISION: {{ quote .Values.env.bboxPrecisionDigits }} - PGAPPNAME: {{ $chartName }} diff --git a/helm/3d/templates/deployment.yaml b/helm/3d/templates/deployment.yaml deleted file mode 100644 index bd71779e..00000000 --- a/helm/3d/templates/deployment.yaml +++ /dev/null @@ -1,202 +0,0 @@ -{{- $releaseName := .Release.Name -}} -{{- $chartName := include "pycsw.name" . -}} -{{- $fullName := include "pycsw.fullname" . -}} -{{- $cloudProviderFlavor := include "pycsw.cloudProviderFlavor" . -}} -{{- $tag := include "pycsw.tag" . -}} -{{- $cloudProviderImagePullSecretName := include "pycsw.cloudProviderImagePullSecretName" . -}} -{{- $cloudProviderDockerRegistryUrl := include "pycsw.cloudProviderDockerRegistryUrl" . -}} -{{- $ca := (include "merged.ca" . ) | fromYaml }} -{{- $podAnnotations := (include "merged.podAnnotations" . ) | fromYaml }} -{{- $extraVolumes := (include "merged.extraVolumes" . ) | fromYaml }} -{{- $extraVolumeMounts := (include "merged.extraVolumeMounts" . ) | fromYaml }} -{{- $sidecars := (include "merged.sidecars" . ) | fromYaml }} -{{- $postgres := (include "merged.postgres" . ) | fromYaml }} -{{- $serverURL := include "pycsw.serverURL" . -}} - - -{{- if $ca.enabled }} -{{- if and $ca.useExternal (not $ca.secretName) }} -{{- fail "When using external ca secret the value for ca.secretName should be set" }} -{{- end }} -{{- end }} - -{{- if $postgres.ssl.enabled }} -{{- if and $postgres.ssl.useExternal (not $postgres.ssl.secretName) }} -{{- fail "When using external ssl secret the value for .Values.authentication.ssl.secretName should be set" }} -{{- end }} -{{- end }} - -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ $fullName }} - labels: - app: {{ $chartName }} - component: {{ $chartName }} - release: {{ $releaseName }} - {{- include "pycsw.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.replicaCount }} - revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} - selector: - matchLabels: - app: {{ $chartName }} - release: {{ $releaseName }} - run: {{ $fullName }} - {{- include "pycsw.selectorLabels" . | nindent 6 }} - template: - metadata: - labels: - app: {{ $chartName }} - release: {{ $releaseName }} - run: {{ $fullName }} - {{- include "pycsw.selectorLabels" . | nindent 8 }} - annotations: - {{ include "mclabels.annotations" . | nindent 8 }} - {{ include "merged.podAnnotations" . | nindent 8 }} - {{- if .Values.resetOnConfigChange }} - checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - {{- end }} - spec: - {{- if $cloudProviderImagePullSecretName }} - imagePullSecrets: - - name: {{ $cloudProviderImagePullSecretName | quote }} - {{- end }} - containers: - - name: {{ $fullName }}-deployment - {{- with .Values.image }} - image: {{ $cloudProviderDockerRegistryUrl }}{{ .repository }}:{{ $tag }} - {{- end }} - volumeMounts: - - name: pyscw-config - mountPath: /etc/pycsw/pycsw.cfg - subPath: pycsw.cfg - - name: pyscw-mappings - mountPath: /etc/pycsw/mappings.py - subPath: mappings.py - - mountPath: "/pycsw/uwsgi.ini" - name: uwsgi-config - subPath: uwsgi.ini - {{- if $ca.enabled }} - - mountPath: {{ printf "%s/%s" $ca.path $ca.key | quote }} - name: root-ca - subPath: {{ quote $ca.key }} - {{- end }} - {{- if $extraVolumeMounts -}} - {{ toYaml $extraVolumeMounts | nindent 12 }} - {{- end }} - {{- if $postgres.ssl.enabled }} - - name: ca-file - mountPath: /certs/ca.crt - subPath: ca.pem - - name: key-file - mountPath: /certs/key.pem - subPath: key.pem - - name: cert-file - mountPath: /certs/cert.pem - subPath: cert.pem - {{- end }} - env: - - name: PYCSW_SERVER_URL - value: {{ $serverURL }} - - name: PYCSW_MAPPINGS_FILEPATH - value: /etc/pycsw/mappings.py - - name: DB_USER - valueFrom: - secretKeyRef: - name: {{ $postgres.user.secretName }} - key: username - {{- if $postgres.user.requirePassword }} - - name: DB_PASSWORD - valueFrom: - secretKeyRef: - name: {{ $postgres.user.secretName }} - key: password - {{- end }} - {{- if $postgres.ssl.enabled }} - - name: POSTGRES_CERTS_MOUNT_PATH - value: /certs - - name: POSTGRES_CERT_FILE_NAME - value: cert.pem - - name: POSTGRES_KEY_FILE_NAME - value: key.pem - {{- end }} - envFrom: - - configMapRef: - name: {{ $fullName }} - ports: - - name: http - containerPort: {{ .Values.env.pycswUwsgiPort }} - protocol: {{ .Values.env.protocol }} - {{- if .Values.livenessProbe.enabled }} - livenessProbe: - initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} - timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} - failureThreshold: {{ .Values.livenessProbe.failureThreshold }} - httpGet: - path: {{ .Values.livenessProbe.path }} - port: {{ .Values.env.port }} - {{- end }} - {{- if .Values.readinessProbe.enabled }} - readinessProbe: - initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} - timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} - failureThreshold: {{ .Values.readinessProbe.failureThreshold }} - httpGet: - path: {{ .Values.readinessProbe.path }} - port: {{ .Values.env.port }} - {{- end }} - {{- if .Values.resources.enabled }} - resources: - {{- toYaml .Values.resources.value | nindent 12 }} - {{- end }} - {{- if $sidecars }} - {{ tpl ($sidecars) . | nindent 8 }} - {{- end }} - volumes: - {{- if $ca.enabled }} - - name: root-ca - secret: - secretName: {{ $ca.secretName }} - {{- end }} - {{- if $extraVolumes -}} - {{ tpl (toYaml $extraVolumes) . | nindent 8 }} - {{- end }} - - name: pyscw-config - configMap: - name: {{ $fullName }} - items: - - key: "pycsw.cfg" - path: "pycsw.cfg" - - name: pyscw-mappings - configMap: - name: {{ $fullName }} - items: - - key: "mappings.py" - path: "mappings.py" - - name: uwsgi-config - configMap: - name: {{ $fullName }} - items: - - key: "uwsgi.ini" - path: "uwsgi.ini" - {{- if $postgres.ssl.enabled }} - - name: ca-file - secret: - secretName: {{ $postgres.ssl.secretName }} - items: - - key: {{ $postgres.ssl.caFileName }} - path: ca.pem - - name: key-file - secret: - secretName: {{ $postgres.ssl.secretName }} - items: - - key: {{ $postgres.ssl.keyFileName }} - path: key.pem - - name: cert-file - secret: - secretName: {{ $postgres.ssl.secretName }} - items: - - key: {{ $postgres.ssl.certFileName }} - path: cert.pem - {{- end }} diff --git a/helm/3d/templates/service.yaml b/helm/3d/templates/service.yaml deleted file mode 100644 index 6fa7ba3f..00000000 --- a/helm/3d/templates/service.yaml +++ /dev/null @@ -1,30 +0,0 @@ -{{- $releaseName := .Release.Name -}} -{{- $chartName := include "pycsw.name" . -}} -{{- $fullName := include "pycsw.fullname" . -}} -{{- $serviceName := include "pycsw.fullname" . -}} -{{- $cloudProviderFlavor := include "pycsw.cloudProviderFlavor" . -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ $fullName }} - labels: - app: {{ $chartName }} - component: {{ $chartName }} - release: {{ $releaseName }} - {{- include "pycsw.labels" . | nindent 4 }} -spec: - {{- if eq $cloudProviderFlavor "minikube" }} - type: NodePort - {{- end }} - ports: - - port: {{ .Values.env.port }} - targetPort: {{ .Values.env.pycswUwsgiPort }} - protocol: {{ .Values.env.protocol }} - {{- if eq $cloudProviderFlavor "minikube" }} - nodePort: {{ .Values.nodePort }} - {{- end }} - selector: - app: {{ $chartName }} - release: {{ $releaseName }} - run: {{ $fullName }} - {{- include "pycsw.selectorLabels" . | nindent 4 }} diff --git a/helm/3d/values.yaml b/helm/3d/values.yaml deleted file mode 100644 index 766ebe47..00000000 --- a/helm/3d/values.yaml +++ /dev/null @@ -1,241 +0,0 @@ -global: - cloudProvider: - dockerRegistryUrl: test # - Filled for Helm lint to pass - flavor: openshift - imagePullSecretName: - imagePullPolicy: IfNotPresent - tracing: {} - metrics: {} - opala: - enabled: - - postgres: - host: - port: - schema: - name: - user: - requirePassword: false - rejectUnauthorized: false - useExternal: false - secretName: '' - username: '' - password: '' - ssl: - enabled: false - useExternal: false - secretName: '' - caFileName: '' - certFileName: '' - keyFileName: '' - -cloudProvider: - dockerRegistryUrl: # test # - Fill for Helm lint to pass - flavor: - imagePullSecretName: - -imagePullPolicy: - -image: - repository: pycsw - tag: - -nodePort: 30030 -replicaCount: 1 -revisionHistoryLimit: 3 # Amount of revisions we keep - -authentication: - cors: - enabled: true - allowedOrigin: '*' - allowedHeaders: '*' - -postgres: - host: - port: - schema: - name: - user: - requirePassword: false - rejectUnauthorized: false - useExternal: false - secretName: '' - username: '' - password: '' - ssl: - enabled: false - useExternal: false - secretName: '' - caFileName: '' - certFileName: '' - keyFileName: '' - -livenessProbe: - enabled: true - initialDelaySeconds: 10 - timeoutSeconds: 5 - failureThreshold: 6 - path: /csw?service=CSW&request=GetCapabilities&version=3.0.0 - -readinessProbe: - enabled: true - initialDelaySeconds: 10 - timeoutSeconds: 5 - failureThreshold: 6 - path: /csw?service=CSW&request=GetCapabilities&version=3.0.0 - -ca: - enabled: false - useExternal: false - secretName: - path: - key: - -extraVolumes: {} - -extraVolumeMounts: {} - -sidecars: {} - -podAnnotations: {} - -mclabels: - component: backend - partOf: serving - owner: 3d - gisDomain: 3d - logScraping: true - -opala: - enabled: - domain: - url: - -env: - port: 8080 - pycswUwsgiPort: 8000 - protocol: TCP - logLevel: WARNING - maxRecords: 50 - logfile: '' - profiles: mc_3d - bboxPrecisionDigits: 10 - logFormat: >- - %(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s" - %({x-forwarded-for}i)s %(L)s - tracing: - enabled: false - url: http://localhost:55681/v1/trace - metrics: - enabled: false - url: 'http://localhost:55681/v1/metrics' - uwsgi: - processes: - threads: - statsServer: - enabled: - stats: - statsMinify: - -filterProductStatus: false - -resources: - enabled: true - value: - limits: - cpu: 100m - memory: 128Mi - requests: - cpu: 100m - memory: 128Mi - -route: - enabled: false - path: / - host: - timeout: - enabled: false # defaults to 30s by openshift - duration: 60s # supported units (us, ms, s, m, h, d) - rewriteTarget: '' - tls: - enabled: true - termination: edge - insecureEdgeTerminationPolicy: Redirect - useCerts: false - certificate: '' - key: '' - caCertificate: '' - -ingress: - enabled: false - path: / - host: localhost - cors: - enabled: true - origin: '*' - -nginx: - mclabels: - partOf: serving - owner: 3d - gisDomain: 3d - nginx: - extensions: - location: - enabled: true - fileName: location.conf - server: - enabled: true - fileName: server.conf - extraVolumes: - - name: nginx-config - configMap: - name: "{{ .Release.Name }}-nginx-configmap" - extraVolumeMounts: - - name: nginx-config - mountPath: "/etc/nginx/conf.d/extensions/location.conf" - subPath: location.conf - - name: nginx-config - mountPath: "/etc/nginx/conf.d/extensions/server.conf" - subPath: server.conf - backend: - enabled: false - - prometheusExporter: - enabled: true - - opentelemetry: - serviceName: nginx - samplerMethod: AlwaysOff - exporterHost: otel-collector - exporterPort: 4317 - ratio: 10 - - enabled: false - nameOverride: "3d-pycsw-nginx" - replicaCount: 1 - environment: development - port: 8080 - internalServicePort: 80 - targetPort: 8080 - servicePort: 8080 - nodePort: 30001 - route: - enabled: - -uwsgiExporter: - image: - repository: "timonwong/uwsgi-exporter" - tag: "latest" - env: - logLevel: info # one of [debug, info, warn, error] - port: 9117 - resources: - enabled: true - value: - limits: - cpu: 100m - memory: 128Mi - requests: - cpu: 100m - memory: 128Mi diff --git a/helm/pycsw/Chart.yaml b/helm/Chart.yaml similarity index 86% rename from helm/pycsw/Chart.yaml rename to helm/Chart.yaml index 1e849a79..a9af06d9 100644 --- a/helm/pycsw/Chart.yaml +++ b/helm/Chart.yaml @@ -2,11 +2,11 @@ apiVersion: v2 name: pycsw description: Common Helm chart for pycsw service, consumed as a dependency by team deployment charts type: application -version: 6.7.0 -appVersion: 6.7.0 +version: 6.7.3 +appVersion: 6.7.3 dependencies: - name: nginx - version: 2.2.1 + version: 2.3.1 repository: oci://acrarolibotnonprod.azurecr.io/helm/common - name: mclabels version: 1.1.0 diff --git a/helm/pycsw/README.md b/helm/README.md similarity index 100% rename from helm/pycsw/README.md rename to helm/README.md diff --git a/helm/pycsw/config/location.conf b/helm/config/location.conf similarity index 100% rename from helm/pycsw/config/location.conf rename to helm/config/location.conf diff --git a/helm/dem/config/pycswWsgi.ini b/helm/config/pycswWsgi.ini similarity index 100% rename from helm/dem/config/pycswWsgi.ini rename to helm/config/pycswWsgi.ini diff --git a/helm/pycsw/config/server.conf b/helm/config/server.conf similarity index 100% rename from helm/pycsw/config/server.conf rename to helm/config/server.conf diff --git a/helm/dem/Chart.yaml b/helm/dem/Chart.yaml deleted file mode 100644 index b01b3c18..00000000 --- a/helm/dem/Chart.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v2 -name: pycsw -description: A Helm chart for pycsw service -type: application -version: 6.7.3 -appVersion: 6.7.3 -dependencies: - - name: nginx - version: 1.1.0 - repository: oci://acrarolibotnonprod.azurecr.io/helm - - name: mclabels - version: 1.0.1 - repository: oci://acrarolibotnonprod.azurecr.io/helm/infra diff --git a/helm/dem/config/default.conf b/helm/dem/config/default.conf deleted file mode 100644 index c1386b7b..00000000 --- a/helm/dem/config/default.conf +++ /dev/null @@ -1,61 +0,0 @@ - -{{- $chartName := include "pycsw.name" . -}} -{{- $serviceName := include "service.fullname" . -}} -{{- $releaseName := .Release.Name -}} - -{{- $opalaEnabled := .Values.nginx.authorization.enabled }} - - -upstream pycsw { - server {{ $serviceName }}:{{ .Values.servicePort }}; -} - -server { - listen {{ .Values.nginx.nginxTargetPort }}; - # the domain name it will serve for - server_name pycsw; - # max upload size, adjust to taste - keepalive_timeout 500; - proxy_connect_timeout 600; - proxy_send_timeout 600; - send_timeout 600; - client_max_body_size 5000; - client_header_timeout 600; - client_body_timeout 600; - client_header_buffer_size 12288; # 12K - large_client_header_buffers 4 12288; # 12K - fastcgi_read_timeout 300; - location /liveness { - access_log off; - log_not_found off; - return 200 "I'm alive\n"; - } - location / { - set $original_method $request_method; - set $original_args $args; - {{- if $opalaEnabled }} - set $domain {{ .Values.nginx.authorization.domain }}; - auth_request /_validate_jwt; - {{ end }} - - include uwsgi_params; - uwsgi_pass pycsw; - uwsgi_hide_header Set-Cookie; # ensures the header will not be passed back to the client - uwsgi_param HTTP_Cookie ""; # ensures that a client cannot pass any prior cookies to the webapp and spoil your cache - } - - {{- if $opalaEnabled }} - location = /_validate_jwt { - internal; - - js_content auth.opaAuth; - } - - location = /opa { - internal; - - proxy_set_header Content-Type application/json; - proxy_pass {{ .Values.nginx.authorization.url }}; - } - {{ end }} -} diff --git a/helm/dem/config/log_format.conf b/helm/dem/config/log_format.conf deleted file mode 100644 index b2f323fa..00000000 --- a/helm/dem/config/log_format.conf +++ /dev/null @@ -1,81 +0,0 @@ -map $msec $nanosec { - ~(.*)\.(.*) $1$2000000; -} - -log_format json escape=json - '{' - '"Timestamp": $nanosec,' - '"Attributes": {' - '"mapcolonies.time_local":"$time_local",' - {{ if and (.Values.global.opalaEnabled) (.Values.nginx.authorization.enabled) }} - '"mapcolonies.http.auth.token.client_name":"$jwt_payload_sub",' - {{ end }} - '"http.status_code": $status,' - '"http.url": "$http_referer",' - '"http.x_forwarded_for": "$http_x_forwarded_for",' - '"http.proxy_add_x_forwarded_for": "$proxy_add_x_forwarded_for",' - '"http.user_agent": "$http_user_agent",' - '"http.request_time": $request_time,' - '"request_length": "$request_length",' - '"http.host": "$host",' - '"upstream_addr": "$upstream_addr",' - '"upstream_status": "$upstream_status",' - '"upstream_connect_time": "$upstream_connect_time",' - '"upstream_header_time": "$upstream_header_time",' - '"upstream_response_time": "$upstream_response_time",' - '"upstream_response_length": "$upstream_response_length",' - '"upstream_bytes_sent": "$upstream_bytes_sent",' - '"upstream_bytes_received": "$upstream_bytes_received",' - '"upstream_http_name": "$upstream_http_name",' - '"bytes_sent": "$bytes_sent",' - '"body_bytes_sent": "$body_bytes_sent",' - '"content_type":"$content_type",' - '"content_length":"$content_length",' - '"remote_addr": "$remote_addr",' - '"remote_port": "$remote_port",' - '"remote_user": "$remote_user",' - '"connection":"$connection",' - '"cache_status":"$upstream_cache_status",' - '"connection_requests": "$connection_requests",' - '"connections_active": "$connections_active",' - '"connections_reading": "$connections_reading",' - '"connections_writing": "$connections_writing",' - '"connections_waiting": "$connections_waiting",' - '"ancient_browser": "$ancient_browser",' - '"modern_browser": "$modern_browser",' - '"binary_remote_addr": "$binary_remote_addr",' - '"hostname": "$hostname",' - '"http_name": "$http_name",' - '"pid": "$pid",' - '"proxy_protocol_addr": "$proxy_protocol_addr",' - '"proxy_protocol_port": "$proxy_protocol_port",' - '"proxy_protocol_server_addr": "$proxy_protocol_server_addr",' - '"proxy_protocol_server_port": "$proxy_protocol_server_port",' - '"proxy_host": "$proxy_host",' - '"proxy_port": "$proxy_port",' - '"realip_remote_addr": "$realip_remote_addr",' - '"realip_remote_port": "$realip_remote_port",' - '"server_name": "$server_name",' - '"server_addr ": "$server_addr ",' - '"server_port": "$server_port",' - '"server_protocol": "$server_protocol",' - '"tcpinfo_rtt": "$tcpinfo_rtt",' - '"tcpinfo_rttvar": "$tcpinfo_rttvar",' - '"tcpinfo_snd_cwnd": "$tcpinfo_snd_cwnd",' - '"tcpinfo_rcv_space": "$tcpinfo_rcv_space",' - '"uid_got": "$uid_got",' - '"uid_reset": "$uid_reset",' - '"uid_set": "$uid_set"' - '},' - '"TraceId": "$opentelemetry_trace_id",' ## this is a byte sequence (hex-encoded in JSON) - '"SpanId": "$opentelemetry_span_id",' - {{ if .Values.nginx.authorization.enabled }} - '"TokenUser": "$jwt_payload_sub",' - {{ else }} - '"TokenUser": "NoAuth",' - {{ end }} - '"SeverityText": "INFO",' - '"SeverityNumber": 9,' - '"RequestBody": "$request_body",' - '"Body": "$request"' - '}'; diff --git a/helm/dem/config/mappings.py b/helm/dem/config/mappings.py deleted file mode 100644 index 95b03837..00000000 --- a/helm/dem/config/mappings.py +++ /dev/null @@ -1,68 +0,0 @@ -MD_CORE_MODEL = { - 'typename': 'pycsw:CoreMetadata', - 'outputschema': 'http://pycsw.org/metadata', - 'mappings': { - # Needed for PYCSW - 'pycsw:Identifier': 'identifier', - 'pycsw:Typename': 'typename', - 'pycsw:Schema': 'schema', - 'pycsw:MdSource': 'mdsource', - 'pycsw:InsertDate': 'insert_date_utc', - 'pycsw:XML': 'xml', - 'pycsw:AnyText': 'anytext', - 'pycsw:BoundingBox': 'wkt_geometry', - 'pycsw:Links': 'links', - 'pycsw:Keywords': 'keywords', - 'pycsw:Type': 'type', - 'pycsw:Title': 'product_name', - 'pycsw:Abstract': 'description', - 'pycsw:AlternateTitle': 'product_name', - 'pycsw:AccessConstraints': 'classification', - 'pycsw:Creator': 'producer_name', - 'pycsw:CRS': 'srs_id', - 'pycsw:Publisher': 'producer_name', - 'pycsw:Contributor': 'producer_name', - 'pycsw:CreationDate': 'creation_date_utc', - 'pycsw:Date': 'creation_date_utc', - 'pycsw:Format': 'type', - 'pycsw:Modified': 'update_date_utc', - 'pycsw:Source': 'product_name', - 'pycsw:Relation': '', - 'pycsw:Language': '', - 'pycsw:TopicCategory': '', - - # Common profile fields - 'pycsw:Classification': 'classification', - 'pycsw:ProductId': 'product_id', - 'pycsw:ProductVersion': 'product_version', - 'pycsw:ProductType': 'product_type', - 'pycsw:productSubType': 'product_sub_type', - 'pycsw:CRSName': 'srs_name', - 'pycsw:updateDateUTC': 'update_date_utc', - 'pycsw:ingestionDateUTC': 'ingestion_date_utc', - 'pycsw:TempExtent_begin': 'acquisition_time_begin_utc', - 'pycsw:TempExtent_end': 'acquisition_time_end_utc', - 'pycsw:maxResolutionDegree': 'max_resolution_degree', - 'pycsw:minResolutionDegree': 'min_resolution_degree', - 'pycsw:maxResolutionMeter': 'max_resolution_meter', - 'pycsw:minResolutionMeter': 'min_resolution_meter', - 'pycsw:maxHorizontalAccuracyCEP90': 'max_horizontal_accuracy_cep_90', - 'pycsw:minHorizontalAccuracyCEP90': 'min_horizontal_accuracy_cep_90', - 'pycsw:maxAbsoluteAccuracyLEP90': 'max_absolute_accuracy_lep_90', - 'pycsw:minAbsoluteAccuracyLEP90': 'min_absolute_accuracy_lep_90', - 'pycsw:maxRelativeAccuracyLEP90': 'max_relative_accuracy_lep_90', - 'pycsw:minRelativeAccuracyLEP90': 'min_relative_accuracy_lep_90', - 'pycsw:sensorType': 'sensors', - 'pycsw:region': 'region', - 'pycsw:footprint': 'footprint_geojson', - 'pycsw:noDataValue': 'no_data_value', - 'pycsw:areaOrPoint': 'area_or_point', - 'pycsw:dataType': 'data_type', - 'pycsw:verticalType': 'vertical_type', - 'pycsw:verticalSrsId': 'vertical_srs_id', - 'pycsw:verticalSrsName': 'vertical_srs_name', - - 'pycsw:productBBox':'product_bbox', - 'pycsw:productStatus': 'product_status', - } -} diff --git a/helm/dem/config/nginx.conf b/helm/dem/config/nginx.conf deleted file mode 100644 index 6e1d7c35..00000000 --- a/helm/dem/config/nginx.conf +++ /dev/null @@ -1,37 +0,0 @@ -#user nginx; -worker_processes 4; - -error_log /var/log/nginx/error.log notice; -pid /tmp/nginx.pid; -load_module modules/ngx_http_js_module.so; -load_module /otel/otel_ngx_module.so; - - - -events { - worker_connections 1024; -} - - -http { - opentelemetry_config /otel/otel-nginx.toml; - include /etc/nginx/mime.types; - default_type application/octet-stream; - - {{ if .Values.nginx.authorization.enabled }} - js_import auth from /etc/nginx/auth.js; - js_set $jwt_payload_sub auth.jwtPayloadSub; - {{ end }} - - include /etc/nginx/log_format.conf; - access_log /var/log/nginx/access.log json; - - sendfile on; - #tcp_nopush on; - - keepalive_timeout 65; - - #gzip on; - - include /etc/nginx/conf.d/*.conf; -} diff --git a/helm/dem/config/pycsw.cfg b/helm/dem/config/pycsw.cfg deleted file mode 100644 index fbe03ddb..00000000 --- a/helm/dem/config/pycsw.cfg +++ /dev/null @@ -1,74 +0,0 @@ -[server] -home=/home/pycsw -url=${PYCSW_SERVER_URL} -mimetype=application/xml; charset=UTF-8 -encoding=UTF-8 -language=en-US -{{- if .Values.env.maxrecords}} -maxrecords={{ .Values.env.maxrecords }} -{{- end}} -loglevel={{ .Values.env.loglevel }} -logfile={{ .Values.env.logfile }} -#ogc_schemas_base=http://foo -#federatedcatalogues=http://catalog.data.gov/csw -#pretty_print=true -#gzip_compresslevel=8 -#domainquerytype=range -#domaincounts=true -#spatial_ranking=true -profiles={{ .Values.env.profiles }} - -[manager] -transactions=false -allowed_ips=127.0.0.1 -#csw_harvest_pagesize=10 - -[metadata:main] -identification_title=pycsw Geospatial Catalogue -identification_abstract=pycsw is an OGC CSW server implementation written in Python -identification_keywords=catalogue,discovery,metadata -identification_keywords_type=theme -identification_fees=None -identification_accessconstraints=None -provider_name=Organization Name -provider_url=https://pycsw.org/ -contact_name=Lastname, Firstname -contact_position=Position Title -contact_address=Mailing Address -contact_city=City -contact_stateorprovince=Administrative Area -contact_postalcode=Zip or Postal Code -contact_country=Country -contact_phone=+xx-xxx-xxx-xxxx -contact_fax=+xx-xxx-xxx-xxxx -contact_email=Email Address -contact_url=Contact URL -contact_hours=Hours of Service -contact_instructions=During hours of service. Off on weekends. -contact_role=pointOfContact - -[repository] -# sqlite -#database=sqlite:////home/pycsw/tests/functionaltests/suites/cite/data/cite.db -# postgres -database={{ template "pycsw-pg-connection-string" . }} -#database=postgresql://postgres:postgres@postgis-postgis/postgres -# mysql -#database=mysql://username:password@localhost/pycsw?charset=utf8 -mappings=${PYCSW_MAPPINGS_FILEPATH} -table=${DB_SCHEMA}.records -#filter=type = 'http://purl.org/dc/dcmitype/Dataset' -{{- if .Values.filterProductStatus }} -filter=(product_status != 'UNPUBLISHED' AND product_status != 'BEING_DELETED') -{{- end }} -stable_sort=true -[metadata:inspire] -#enabled=true -#languages_supported=eng,gre -#default_language=eng -#date=YYYY-MM-DD -#gemet_keywords=Utility and governmental services -#conformity_service=notEvaluated -#contact_name=Organization Name -#contact_email=Email Address -#temp_extent=YYYY-MM-DD/YYYY-MM-DD diff --git a/helm/dem/templates/_helpers.tpl b/helm/dem/templates/_helpers.tpl deleted file mode 100644 index 4613eb62..00000000 --- a/helm/dem/templates/_helpers.tpl +++ /dev/null @@ -1,173 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "pycsw.name" -}} -{{- default .Chart.Name | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "pycsw.fullname" -}} -{{- $name := default .Chart.Name }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "pycsw.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "pycsw.labels" -}} -helm.sh/chart: {{ include "pycsw.chart" . }} -{{ include "pycsw.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{ include "mclabels.labels" . }} -{{- end }} - -{{/* -Returns the tag of the chart. -*/}} -{{- define "pycsw.tag" -}} -{{- default (printf "v%s" .Chart.AppVersion) .Values.image.tag }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "pycsw.selectorLabels" -}} -app.kubernetes.io/name: {{ include "pycsw.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{ include "mclabels.selectorLabels" . }} -{{- end }} - -{{/* -Returns the environment from global if exists or from the chart's values, defaults to development -*/}} -{{- define "pycsw.environment" -}} -{{- if .Values.global.environment }} - {{- .Values.global.environment -}} -{{- else -}} - {{- .Values.environment | default "development" -}} -{{- end -}} -{{- end -}} - -{{/* -Returns the pycsw server url based on the provided values, default localhost -*/}} -{{- define "pycsw.serverURL" -}} - {{- if not .Values.nginx.route.host }} - {{- printf "http://localhost:8000" -}} - {{- else -}} - {{- $protocol := ternary "https" "http" .Values.nginx.route.tls.enabled -}} - {{- printf "%s://%s" $protocol .Values.nginx.route.host -}} - {{- if .Values.nginx.route.path -}} - {{- printf "%s" .Values.nginx.route.path -}} - {{- end -}} - {{- end -}} -{{- end -}} - -{{/* -Returns the cloud provider name from global if exists or from the chart's values, defaults to minikube -*/}} -{{- define "pycsw.cloudProviderFlavor" -}} -{{- if .Values.global.cloudProvider.flavor }} - {{- .Values.global.cloudProvider.flavor -}} -{{- else if .Values.cloudProvider -}} - {{- .Values.cloudProvider.flavor | default "minikube" -}} -{{- else -}} - {{ "minikube" }} -{{- end -}} -{{- end -}} - -{{/* -Returns the cloud provider docker registry url from global if exists or from the chart's values -*/}} -{{- define "pycsw.cloudProviderDockerRegistryUrl" -}} -{{- if .Values.global.cloudProvider.dockerRegistryUrl }} - {{- printf "%s/" .Values.global.cloudProvider.dockerRegistryUrl -}} -{{- else if .Values.cloudProvider.dockerRegistryUrl -}} - {{- printf "%s/" .Values.cloudProvider.dockerRegistryUrl -}} -{{- else -}} -{{- end -}} -{{- end -}} - -{{/* -Returns the cloud provider image pull secret name from global if exists or from the chart's values -*/}} -{{- define "pycsw.cloudProviderImagePullSecretName" -}} -{{- if .Values.global.cloudProvider.imagePullSecretName }} - {{- .Values.global.cloudProvider.imagePullSecretName -}} -{{- else if .Values.cloudProvider.imagePullSecretName -}} - {{- .Values.cloudProvider.imagePullSecretName -}} -{{- end -}} -{{- end -}} - -{{/* -Returns the tracing url from global if exists or from the chart's values -*/}} -{{- define "pycsw.tracingUrl" -}} -{{- if .Values.global.tracing.url }} - {{- .Values.global.tracing.url -}} -{{- else if .Values.cloudProvider -}} - {{- .Values.env.tracing.url -}} -{{- end -}} -{{- end -}} - -{{/* -Returns the tracing url from global if exists or from the chart's values -*/}} -{{- define "pycsw.metricsUrl" -}} -{{- if .Values.global.metrics.url }} - {{- .Values.global.metrics.url -}} -{{- else -}} - {{- .Values.env.metrics.url -}} -{{- end -}} -{{- end -}} - -{{- define "pycsw-pg-connection-string" -}} -{{- $db := (include "common.db.merged" .) | fromYaml }} -{{- "postgresql://${DB_USER}" -}} -{{- if .Values.env.db.requirePassword -}} -{{- ":${DB_PASSWORD}" -}} -{{- end -}} -{{- "@${DB_HOST}:${DB_PORT}/${DB_NAME}" -}} -{{- if $db.sslEnabled -}} -{{- "?sslmode=require" -}} -{{- if $db.secrets.caFileKey -}} -{{- "&sslrootcert=" -}}/.postgresql/ca.pem -{{- end -}} -{{- if $db.secrets.certFileKey -}} -{{- "&sslcert=" -}}/.postgresql/cert.pem -{{- end -}} -{{- if $db.secrets.keyFileKey -}} -{{- "&sslkey=" -}}/.postgresql/key.pem -{{- end -}} -{{- end -}} -{{- end -}} - -{{- define "pycsw.cors.allowedHeaders" -}} -{{- $authentication := (include "common.authentication.merged" .) | fromYaml }} -{{- $headerList := list -}} -{{- if ne .Values.env.cors.allowedHeaders "" -}} -{{- range $k, $v := (split "," .Values.env.cors.allowedHeaders) -}} -{{- $headerList = append $headerList $v -}} -{{- end -}} -{{- $headerList = uniq $headerList -}} -{{- quote (join "," $headerList) -}} -{{- end -}} -{{- end -}} diff --git a/helm/dem/templates/_resources.tpl b/helm/dem/templates/_resources.tpl deleted file mode 100644 index bf7a281f..00000000 --- a/helm/dem/templates/_resources.tpl +++ /dev/null @@ -1,42 +0,0 @@ -{{/* -Create service name as used by the service name label. -*/}} -{{- define "service.fullname" -}} -{{- printf "%s-%s-%s" .Release.Name .Chart.Name "service" }} -{{- end }} - -{{/* -Create configmap name as used by the service name label. -*/}} -{{- define "configmap.fullname" -}} -{{- printf "%s-%s-%s" .Release.Name .Chart.Name "configmap" | indent 1 }} -{{- end }} - -{{/* -Create pycsw nginx configmap name as used by the service name label. -*/}} -{{- define "nginx-configmap.fullname" -}} -{{- printf "%s-%s-%s" .Release.Name .Chart.Name "nginx-configmap" | indent 1 }} -{{- end }} - -{{/* -Create deployment name as used by the service name label. -*/}} -{{- define "deployment.fullname" -}} -{{- printf "%s-%s-%s" .Release.Name .Chart.Name "deployment" | indent 1 }} -{{- end }} - - -{{/* -Create route name as used by the service name label. -*/}} -{{- define "route.fullname" -}} -{{- printf "%s-%s-%s" .Release.Name .Chart.Name "route" | indent 1 }} -{{- end }} - -{{/* -Create ingress name as used by the service name label. -*/}} -{{- define "ingress.fullname" -}} -{{- printf "%s-%s-%s" .Release.Name .Chart.Name "ingress" | indent 1 }} -{{- end }} diff --git a/helm/dem/templates/configmap.yaml b/helm/dem/templates/configmap.yaml deleted file mode 100644 index fa8dcc2b..00000000 --- a/helm/dem/templates/configmap.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- $chartName := include "pycsw.name" . -}} -{{- $configmapName := include "configmap.fullname" . }} -{{- $tracingUrl := include "pycsw.tracingUrl" . -}} -{{- $metricsUrl := include "pycsw.metricsUrl" . -}} -{{- $db := (include "common.db.merged" .) | fromYaml }} -{{- if .Values.enabled -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ $configmapName }} -data: - {{ if .Values.env.tracing.enabled }} - TELEMETRY_TRACING_ENABLED: 'true' - TELEMETRY_TRACING_URL: {{ $tracingUrl }} - {{ end }} - {{ if .Values.env.metrics.enabled }} - TELEMETRY_METRICS_ENABLED: 'true' - TELEMETRY_METRICS_URL: {{ $metricsUrl }} - {{ end }} - pycsw.cfg: {{ tpl (.Files.Get "config/pycsw.cfg") . | quote }} - mappings.py: {{ .Files.Get "config/mappings.py" | quote }} - uwsgi.ini: {{ tpl (.Files.Get "config/pycswWsgi.ini") . | quote }} - CORS_ENABLED: {{ .Values.env.cors.enabled | quote }} - CORS_ALLOWED_HEADERS: {{ template "pycsw.cors.allowedHeaders" . }} - CORS_ALLOWED_ORIGIN: {{ .Values.env.cors.allowedOrigin | quote }} - LOG_FORMAT: {{ .Values.env.logFormat | quote }} - DB_HOST: {{ $db.host }} - DB_PORT: {{ $db.port | quote }} - DB_NAME: {{ $db.name }} - POSTGRES_ENABLE_SSL_AUTH: {{ $db.sslEnabled | quote }} - DB_SCHEMA: {{ quote .Values.env.db.schema }} - PGAPPNAME: {{ $chartName }} - COORDINATE_PRECISION: {{ quote .Values.env.bboxPrecisionDigits }} - AUTH_ENABLED: {{ .Values.nginx.authorization.enabled | quote }} #maybe deprecated or used in other networks -{{- end }} diff --git a/helm/dem/templates/deployment.yaml b/helm/dem/templates/deployment.yaml deleted file mode 100644 index d15690e3..00000000 --- a/helm/dem/templates/deployment.yaml +++ /dev/null @@ -1,214 +0,0 @@ -{{- $releaseName := .Release.Name -}} -{{- $chartName := include "pycsw.name" . -}} -{{- $configmapName := include "configmap.fullname" . }} -{{- $deploymentName := include "deployment.fullname" . }} -{{- $cloudProviderFlavor := include "pycsw.cloudProviderFlavor" . -}} -{{- $cloudProviderDockerRegistryUrl := include "pycsw.cloudProviderDockerRegistryUrl" . -}} -{{- $cloudProviderImagePullSecretName := include "pycsw.cloudProviderImagePullSecretName" . -}} -{{- $db := (include "common.db.merged" .) | fromYaml }} -{{ $sslSecretName := ternary .Values.authentication.ssl.externalSecretName (printf "%s%s" .Release.Name "-open-ssl") .Values.authentication.ssl.useExternal }} -{{ $postgresSecretName := ternary $db.secrets.externalSecretName (printf "%s%s" .Release.Name "-postgres-secret") $db.secrets.useExternal }} -{{- $imageTag := include "pycsw.tag" . -}} -{{- $serverURL := include "pycsw.serverURL" . -}} - -{{- if .Values.enabled -}} - -{{- if .Values.authentication.ssl.enabled }} -{{- if and .Values.authentication.ssl.useExternal (not .Values.authentication.ssl.externalSecretName) }} -{{- fail "When using external ssl secret the value for .Values.authentication.ssl.externalSecretName should be set" }} -{{- end }} -{{- end }} - -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ $deploymentName }} - labels: - app: {{ $chartName }} - component: {{ $chartName }} - environment: {{ include "pycsw.environment" . }} - release: {{ $releaseName }} - {{- include "pycsw.labels" . | nindent 4 }} - annotations: - collectord.io/index: {{ quote .Values.splunkIndex }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app: {{ $chartName }} - release: {{ $releaseName }} - run: {{ $releaseName }}-{{ $chartName }} - {{- include "pycsw.selectorLabels" . | nindent 6 }} - template: - metadata: - labels: - app: {{ $chartName }} - release: {{ $releaseName }} - run: {{ $releaseName }}-{{ $chartName }} - {{- include "pycsw.selectorLabels" . | nindent 8 }} - annotations: - {{- if .Values.resetOnConfigChange }} - checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - {{- end }} - {{- if .Values.podAnnotations }} - {{- toYaml .Values.podAnnotations | nindent 8 }} - {{- end }} - {{ include "mclabels.annotations" . | nindent 8 }} - - spec: - {{- if $cloudProviderImagePullSecretName }} - imagePullSecrets: - - name: {{ $cloudProviderImagePullSecretName | quote }} - {{- end }} - containers: - - name: {{ $releaseName }} - {{- with .Values.image }} - image: {{ $cloudProviderDockerRegistryUrl }}{{ .repository }}:{{ $imageTag }} - {{- end }} - volumeMounts: - {{- if .Values.global.ca.secretName }} - - mountPath: {{ printf "%s/%s" .Values.global.ca.path .Values.global.ca.key | quote }} - name: root-ca - subPath: {{ quote .Values.caKey }} - {{- end }} - {{- if .Values.global.ca.secretName }} - - name: root-ca - mountPath: "/usr/local/share/ca-certificates" - {{- end }} - {{- if .Values.authentication.ssl.enabled }} - - name: open-ssl - mountPath: "/etc/ssl/openssl.cnf" - subPath: "openssl.cnf" - {{- end }} - - name: pyscw-config - mountPath: /etc/pycsw/pycsw.cfg - subPath: pycsw.cfg - - name: pyscw-mappings - mountPath: /etc/pycsw/mappings.py - subPath: mappings.py - - mountPath: "/pycsw/uwsgi.ini" - name: uwsgi-config - subPath: uwsgi.ini - {{- if $db.sslEnabled }} - {{- if $db.secrets.caFileKey }} - - name: ca-file - mountPath: /certs/ca.crt - subPath: ca.pem - {{- end }} - {{- if $db.secrets.keyFileKey }} - - name: key-file - mountPath: /certs/key.pem - subPath: key.pem - {{- end }} - {{- if $db.secrets.certFileKey }} - - name: cert-file - mountPath: /certs/cert.pem - subPath: cert.pem - {{- end }} - {{- end }} - env: - {{- if .Values.global.ca.secretName }} - - name: REQUESTS_CA_BUNDLE - value: {{ printf "%s/%s" .Values.caPath .Values.caKey | quote }} - - name: NODE_EXTRA_CA_CERTS - value: {{ printf "%s/%s" .Values.caPath .Values.caKey | quote }} - {{- end }} - - name: PYCSW_SERVER_URL - value: {{ $serverURL }} - - name: PYCSW_MAPPINGS_FILEPATH - value: /etc/pycsw/mappings.py - - name: DB_USER - valueFrom: - secretKeyRef: - name: {{ $postgresSecretName }} - key: username - {{- if .Values.env.db.requirePassword }} - - name: DB_PASSWORD - valueFrom: - secretKeyRef: - name: {{ $postgresSecretName }} - key: password - {{- end }} - - name: POSTGRES_CERTS_MOUNT_PATH - value: /certs - - name: POSTGRES_CERT_FILE_NAME - value: cert.pem - - name: POSTGRES_KEY_FILE_NAME - value: key.pem - envFrom: - - configMapRef: - name: {{ $configmapName }} - ports: - - name: http - containerPort: {{ .Values.pycswPort }} - protocol: TCP - readinessProbe: - httpGet: - path: /csw?service=CSW&request=GetCapabilities&version=3.0.0 - port: 8080 - initialDelaySeconds: 30 - timeoutSeconds: 5 - {{- if .Values.resources.enabled }} - resources: - {{- toYaml .Values.resources.value | nindent 12 }} - {{- end }} - ################################################## uwsgi exporter deployment############################################## - {{- if .Values.env.metrics.enabled }} - {{- template "pycsw-chart.uwsgi-exporter-container" (merge (dict "releaseName" .releaseName "chartName" .chartName "cloudProviderDockerRegistryUrl" $cloudProviderDockerRegistryUrl "resources" .Values.uwsgiExporter.resources) .) }} - {{- end }} - volumes: - {{- if .Values.global.ca.secretName }} - - name: root-ca - secret: - secretName: {{ .Values.global.ca.secretName }} - {{- end }} - {{- if .Values.authentication.ssl.enabled }} - - name: open-ssl - secret: - secretName: {{ $sslSecretName }} - {{- end }} - - name: pyscw-config - configMap: - name: {{ $configmapName }} - items: - - key: "pycsw.cfg" - path: "pycsw.cfg" - - name: pyscw-mappings - configMap: - name: {{ $configmapName }} - items: - - key: "mappings.py" - path: "mappings.py" - - name: uwsgi-config - configMap: - name: {{ $configmapName }} - items: - - key: "uwsgi.ini" - path: "uwsgi.ini" - {{- if $db.sslEnabled }} - {{- if $db.secrets.caFileKey }} - - name: ca-file - secret: - secretName: {{ $postgresSecretName }} - items: - - key: {{ $db.secrets.caFileKey }} - path: ca.pem - {{- end }} - {{- if $db.secrets.keyFileKey }} - - name: key-file - secret: - secretName: {{ $postgresSecretName }} - items: - - key: {{ $db.secrets.keyFileKey }} - path: key.pem - {{- end }} - {{- if $db.secrets.certFileKey }} - - name: cert-file - secret: - secretName: {{ $postgresSecretName }} - items: - - key: {{ $db.secrets.certFileKey }} - path: cert.pem - {{- end }} - {{- end }} -{{- end -}} diff --git a/helm/dem/templates/nginx/nginx-configmap.yaml b/helm/dem/templates/nginx/nginx-configmap.yaml deleted file mode 100644 index 7a35a310..00000000 --- a/helm/dem/templates/nginx/nginx-configmap.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if .Values.nginx.enabled -}} -{{- $chartName := include "pycsw.name" . -}} -{{- $releaseName := .Release.Name -}} -{{- $nginxConfigmapName := include "nginx-configmap.fullname" . }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ $nginxConfigmapName }} - labels: - app: {{ $releaseName }}-{{ $chartName }} - component: nginx-configmap - environment: {{ .Values.environment }} - release: {{ $releaseName }} -data: - default.conf: {{ tpl (.Files.Get "config/default.conf") . | quote }} - nginx.conf: {{ tpl (.Files.Get "config/nginx.conf") . | quote }} - log_format.conf: {{ tpl (.Files.Get "config/log_format.conf") . | quote }} -{{- end }} diff --git a/helm/dem/templates/service.yaml b/helm/dem/templates/service.yaml deleted file mode 100644 index c531377c..00000000 --- a/helm/dem/templates/service.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- $releaseName := .Release.Name -}} -{{- $chartName := include "pycsw.name" . -}} -{{- $cloudProviderFlavor := include "pycsw.cloudProviderFlavor" . -}} -{{- $serviceName := include "service.fullname" . -}} -{{- if .Values.enabled -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ $serviceName }} - labels: - app: {{ $chartName }} - component: {{ $chartName }} - environment: {{ include "pycsw.environment" . }} - release: {{ $releaseName }} - {{- include "pycsw.labels" . | nindent 4 }} -spec: - {{- if eq $cloudProviderFlavor "minikube" }} - type: NodePort - {{- end }} - ports: - - port: {{ .Values.servicePort }} - targetPort: {{ .Values.pycswPort }} - protocol: TCP - {{- if eq $cloudProviderFlavor "minikube" }} - nodePort: {{ .Values.nodePort }} - {{- end }} - selector: - app: {{ $chartName }} - release: {{ $releaseName }} - run: {{ $releaseName }}-{{ $chartName }} - {{- include "pycsw.selectorLabels" . | nindent 4 }} -{{- end }} diff --git a/helm/dem/values.yaml b/helm/dem/values.yaml deleted file mode 100644 index 74d723f5..00000000 --- a/helm/dem/values.yaml +++ /dev/null @@ -1,211 +0,0 @@ -global: - cloudProvider: - dockerRegistryUrl: "" - imagePullSecretName: "" - flavor: openshift - tracing: {} - metrics: {} - environment: "" - ca: - secretName: "" - path: "/usr/local/share/ca-certificates" - key: "ca.crt" - db: - host: "" - name: "" - port: 5432 - sslEnabled: false - rejectUnauthorized: false - secrets: - useExternal: true - externalSecretName: "dem-dev-postgres-secret" - caFileKey: "" - certFileKey: "" - keyFileKey: "" - -mclabels: - component: backend - partOf: serving - owner: dem - gisDomain: dem - prometheus: - enabled: true - port: 9117 - longScraping: true - -enabled: true -environment: development -replicaCount: 1 -initialDelaySeconds: 60 -resetOnConfigChange: true -splunkIndex: "" -imagePullPolicy: Always - -cloudProvider: - dockerRegistryUrl: "" - imagePullSecretName: "" - flavor: openshift - -authentication: - ssl: - enabled: false - useExternal: false - externalSecretName: "" -db: - host: "" - name: "" - port: 5432 - sslEnabled: false - rejectUnauthorized: false - secrets: - useExternal: false - externalSecretName: "" - caFileKey: "" - certFileKey: "" - keyFileKey: "" - -image: - repository: common/pycsw - tag: - -internalServicePort: 80 -pycswPort: 8000 -nodePort: 30018 -servicePort: 8080 - -# add pod annotations -# example: -# podAnnotations: -# annotation1: annotation-value-1 -# annotation2: annotation-value-2 -podAnnotations: {} - -filterProductStatus: false - -env: - loglevel: WARNING - maxrecords: null - bboxPrecisionDigits: 10 - logfile: "" - profiles: mc_dem - logFormat: >- - %(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s" %({x-forwarded-for}i)s %(L)s - uwsgi: - processes: 6 - threads: 10 - statsServer: - enabled: true - stats: 1717 - statsMinify: true - cors: - enabled: true - allowedOrigin: "*" - allowedHeaders: "x-api-key" - db: - schema: DemCatalogManager - requirePassword: true - tracing: - enabled: false - url: http://localhost:55681/v1/trace - metrics: - prometheus: - scrape: true - port: 9117 - enabled: true - url: http://localhost:55681/v1/metrics - -resources: - enabled: true - value: - limits: - cpu: 2 - memory: 1200Mi - requests: - cpu: 2 - memory: 1200Mi - -nginx: - enabled: true - fullnameOverride: "" - replicaCount: 1 - image: - repository: common/nginx-otel-unprivileged - tag: "v1.0.0" - - port: 8080 - internalServicePort: 80 - nginxTargetPort: 8080 - targetPort: 8080 - nodePort: 30003 - - authorization: - enabled: true - domain: "dem" - url: http://opa-dev-opa-service.infra-services/v1/data/http/authz/decision - token: - queryName: token - - extraVolumes: - - name: nginx-config - configMap: - name: "{{ .Release.Name }}-pycsw-nginx-configmap" - - extraVolumeMounts: - - name: nginx-config - mountPath: "/etc/nginx/conf.d/default.conf" - subPath: default.conf - - mountPath: "/etc/nginx/nginx.conf" - name: nginx-config - subPath: nginx.conf - - name: nginx-config - mountPath: "/etc/nginx/log_format.conf" - subPath: log_format.conf - - resources: - enabled: true - value: - limits: - cpu: 100m - memory: 128Mi - requests: - cpu: 100m - memory: 128Mi - - route: - enabled: true - path: /api/dem/v2 - host: - timeout: - enabled: false # defaults to 30s by openshift - duration: 60s # supported units (us, ms, s, m, h, d) - tls: - enabled: true - useCerts: false - certificate: "" - key: "" - caCertificate: "" - - ingress: - enabled: false - path: /api/dem/v2 - host: "localhost" - tls: - enabled: true - useExternal: "" - -uwsgiExporter: - image: - repository: "common/timonwong/uwsgi-exporter" - tag: "latest" - env: - logLevel: info # one of [debug, info, warn, error] - port: 9117 - resources: - enabled: true - value: - limits: - cpu: 100m - memory: 128Mi - requests: - cpu: 100m - memory: 128Mi diff --git a/helm/pycsw/.helmignore b/helm/pycsw/.helmignore deleted file mode 100644 index 0cb7b3bf..00000000 --- a/helm/pycsw/.helmignore +++ /dev/null @@ -1,26 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ -*.txt -*local.json -*local.yaml diff --git a/helm/pycsw/config/pycswWsgi.ini b/helm/pycsw/config/pycswWsgi.ini deleted file mode 100644 index 4c9d53e5..00000000 --- a/helm/pycsw/config/pycswWsgi.ini +++ /dev/null @@ -1,38 +0,0 @@ -[uwsgi] -; based on https://github.com/kartoza/docker-mapproxy/blob/master/build_data/uwsgi.ini -chdir = /home/pycsw/pycsw -wsgi-file = cors.py -pidfile = /tmp/pycsw.pid -socket = :{{ .Values.pycswPort }} -processes = {{ .Values.env.uwsgi.processes }} ; Maximum number of workers allowed -cheaper = 2 ; Minimum number of workers allowed -enable-threads = true -threads = {{ .Values.env.uwsgi.threads }} -master = true -disable-logging = true -vacuum = true -die-on-term = true ; Shutdown when receiving SIGTERM (default is respawn) -need-app = true ; This parameter prevents uWSGI from starting if it is unable to find or load your application module -max-requests = 1000 ; Restart workers after this many requests -reload-on-rss = 2048 ; Restart workers after this much resident memory -buffer-size = 14336 ; 14K, Set the internal buffer size for uwsgi packet -worker-reload-mercy = 60 ; How long to wait before forcefully killing workers -wsgi-disable-file-wrapper = true -harakiri = 60 -py-callos-afterfork = true ; allow workers to trap signals -cheaper-algo = busyness -cheaper-initial = 2 ; Workers created at startup -cheaper-overload = 1 ; Length of a cycle in seconds -cheaper-step = 2 ; How many workers to spawn at a time -cheaper-busyness-multiplier = 30 ; How many cycles to wait before killing workers -cheaper-busyness-min = 20 ; Below this threshold, kill workers (if stable for multiplier cycles) -cheaper-busyness-max = 70 ; Above this threshold, spawn new workers -cheaper-busyness-backlog-alert = 2 ; Spawn emergency workers if more than this many requests are waiting in the queue -cheaper-busyness-backlog-step = 2 ; How many emergency workers to create if there are too many requests in the queue -chmod-socket = 664 -uid = 1000 -gid = 0 -http-socket = :8080 -stats = :{{ .Values.env.uwsgi.statsServer.stats }} -stats-http = {{ .Values.env.uwsgi.statsServer.enabled }} -stats-min = {{ .Values.env.uwsgi.statsServer.statsMinify }} diff --git a/helm/pycsw/templates/_tplValues.tpl b/helm/pycsw/templates/_tplValues.tpl deleted file mode 100644 index 36a81f4a..00000000 --- a/helm/pycsw/templates/_tplValues.tpl +++ /dev/null @@ -1,54 +0,0 @@ -{{/* -Copyright VMware, Inc. -SPDX-License-Identifier: APACHE-2.0 -*/}} - -{{/* vim: set filetype=mustache: */}} -{{/* -Renders a value that contains template perhaps with scope if the scope is present. -Usage: -{{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $ ) }} -{{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $ "scope" $app ) }} -*/}} -{{- define "common.tplvalues.render" -}} -{{- $value := typeIs "string" .value | ternary .value (.value | toYaml) }} -{{- if contains "{{" (toJson .value) }} - {{- if .scope }} - {{- tpl (cat "{{- with $.RelativeScope -}}" $value "{{- end }}") (merge (dict "RelativeScope" .scope) .context) }} - {{- else }} - {{- tpl $value .context }} - {{- end }} -{{- else }} - {{- $value }} -{{- end }} -{{- end -}} - -{{/* -Merge a list of values that contains template after rendering them. -Merge precedence is consistent with http://masterminds.github.io/sprig/dicts.html#merge-mustmerge -Usage: -{{ include "common.tplvalues.merge" ( dict "values" (list .Values.path.to.the.Value1 .Values.path.to.the.Value2) "context" $ ) }} -*/}} -{{- define "common.tplvalues.merge" -}} -{{- $dst := dict -}} -{{- range .values -}} -{{- $dst = include "common.tplvalues.render" (dict "value" . "context" $.context "scope" $.scope) | fromYaml | merge $dst -}} -{{- end -}} -{{ $dst | toYaml }} -{{- end -}} - -{{/* -End of usage example -*/}} - -{{/* -Custom definitions -*/}} - -{{- define "common.db.merged" -}} -{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.db .Values.global.db ) "context" . ) }} -{{- end -}} - -{{- define "common.authentication.merged" -}} -{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.authentication .Values.global.authentication ) "context" . ) }} -{{- end -}} diff --git a/helm/pycsw/templates/uwsgi-exporter/uwsgi-exporter-container.yaml b/helm/pycsw/templates/uwsgi-exporter/uwsgi-exporter-container.yaml deleted file mode 100644 index 300d463a..00000000 --- a/helm/pycsw/templates/uwsgi-exporter/uwsgi-exporter-container.yaml +++ /dev/null @@ -1,33 +0,0 @@ -{{- define "pycsw-chart.uwsgi-exporter-container" }} - - name: uwsgi-exporter - image: {{ .cloudProviderDockerRegistryUrl }}{{ .Values.uwsgiExporter.image.repository }}:{{ .Values.uwsgiExporter.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - args: - - "--stats.uri=http://localhost:{{ .Values.env.uwsgi.statsServer.stats }}" - - "--log.level={{ .Values.uwsgiExporter.env.logLevel }}" - {{- if .resources.enabled }} - resources: - {{- toYaml .resources.value | nindent 12 }} - {{- end }} - livenessProbe: - httpGet: - path: "/-/healthy" - port: "uwsgimetrics" - initialDelaySeconds: 2 - periodSeconds: 10 - timeoutSeconds: 5 - failureThreshold: 3 - successThreshold: 1 - readinessProbe: - httpGet: - path: "/metrics" - port: "uwsgimetrics" - initialDelaySeconds: 2 - periodSeconds: 10 - timeoutSeconds: 5 - failureThreshold: 3 - successThreshold: 1 - ports: - - name: "uwsgimetrics" - containerPort: {{ .Values.uwsgiExporter.port }} -{{- end }} diff --git a/helm/raster/.helmignore b/helm/raster/.helmignore deleted file mode 100644 index 0cb7b3bf..00000000 --- a/helm/raster/.helmignore +++ /dev/null @@ -1,26 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ -*.txt -*local.json -*local.yaml diff --git a/helm/raster/Chart.yaml b/helm/raster/Chart.yaml deleted file mode 100644 index 33b7fcb4..00000000 --- a/helm/raster/Chart.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v2 -name: pycsw -description: A Helm chart for pycsw service -type: application -version: 6.7.3 -appVersion: 6.7.3 -dependencies: - - name: nginx - version: 2.3.1 - repository: oci://acrarolibotnonprod.azurecr.io/helm/common - - name: mclabels - version: 1.0.1 - repository: oci://acrarolibotnonprod.azurecr.io/helm/infra diff --git a/helm/raster/config/log_format.conf b/helm/raster/config/log_format.conf deleted file mode 100644 index 69e07c04..00000000 --- a/helm/raster/config/log_format.conf +++ /dev/null @@ -1,81 +0,0 @@ -map $msec $nanosec { - ~(.*)\.(.*) $1$2000000; -} - -log_format main escape=json - '{' - '"Timestamp": $nanosec,' - '"Attributes": {' - '"mapcolonies.time_local":"$time_local",' - {{ if and (.Values.global.opalaEnabled) (.Values.nginx.authorization.enabled) }} - '"mapcolonies.http.auth.token.client_name":"$jwt_payload_sub",' - {{ end }} - '"http.status_code": $status,' - '"http.url": "$http_referer",' - '"http.x_forwarded_for": "$http_x_forwarded_for",' - '"http.proxy_add_x_forwarded_for": "$proxy_add_x_forwarded_for",' - '"http.user_agent": "$http_user_agent",' - '"http.request_time": $request_time,' - '"request_length": "$request_length",' - '"http.host": "$host",' - '"upstream_addr": "$upstream_addr",' - '"upstream_status": "$upstream_status",' - '"upstream_connect_time": "$upstream_connect_time",' - '"upstream_header_time": "$upstream_header_time",' - '"upstream_response_time": "$upstream_response_time",' - '"upstream_response_length": "$upstream_response_length",' - '"upstream_bytes_sent": "$upstream_bytes_sent",' - '"upstream_bytes_received": "$upstream_bytes_received",' - '"upstream_http_name": "$upstream_http_name",' - '"bytes_sent": "$bytes_sent",' - '"body_bytes_sent": "$body_bytes_sent",' - '"content_type":"$content_type",' - '"content_length":"$content_length",' - '"remote_addr": "$remote_addr",' - '"remote_port": "$remote_port",' - '"remote_user": "$remote_user",' - '"connection":"$connection",' - '"cache_status":"$upstream_cache_status",' - '"connection_requests": "$connection_requests",' - '"connections_active": "$connections_active",' - '"connections_reading": "$connections_reading",' - '"connections_writing": "$connections_writing",' - '"connections_waiting": "$connections_waiting",' - '"ancient_browser": "$ancient_browser",' - '"modern_browser": "$modern_browser",' - '"binary_remote_addr": "$binary_remote_addr",' - '"hostname": "$hostname",' - '"http_name": "$http_name",' - '"pid": "$pid",' - '"proxy_protocol_addr": "$proxy_protocol_addr",' - '"proxy_protocol_port": "$proxy_protocol_port",' - '"proxy_protocol_server_addr": "$proxy_protocol_server_addr",' - '"proxy_protocol_server_port": "$proxy_protocol_server_port",' - '"proxy_host": "$proxy_host",' - '"proxy_port": "$proxy_port",' - '"realip_remote_addr": "$realip_remote_addr",' - '"realip_remote_port": "$realip_remote_port",' - '"server_name": "$server_name",' - '"server_addr ": "$server_addr ",' - '"server_port": "$server_port",' - '"server_protocol": "$server_protocol",' - '"tcpinfo_rtt": "$tcpinfo_rtt",' - '"tcpinfo_rttvar": "$tcpinfo_rttvar",' - '"tcpinfo_snd_cwnd": "$tcpinfo_snd_cwnd",' - '"tcpinfo_rcv_space": "$tcpinfo_rcv_space",' - '"uid_got": "$uid_got",' - '"uid_reset": "$uid_reset",' - '"uid_set": "$uid_set"' - '},' - '"TraceId": "$otel_trace_id",' ## this is a byte sequence (hex-encoded in JSON) - '"SpanId": "$otel_span_id",' - {{ if .Values.nginx.authorization.enabled }} - '"TokenUser": "$jwt_payload_sub",' - {{ else }} - '"TokenUser": "NoAuth",' - {{ end }} - '"SeverityText": "INFO",' - '"SeverityNumber": 9,' - '"RequestBody": "$request_body",' - '"Body": "$request"' - '}'; \ No newline at end of file diff --git a/helm/raster/config/mappings.py b/helm/raster/config/mappings.py deleted file mode 100644 index 3d00cf54..00000000 --- a/helm/raster/config/mappings.py +++ /dev/null @@ -1,65 +0,0 @@ -MD_CORE_MODEL = { - 'typename': 'pycsw:CoreMetadata', - 'outputschema': 'http://pycsw.org/metadata', - 'mappings': { - # Needed for PYCSW - 'pycsw:Identifier': 'identifier', - 'pycsw:Typename': 'typename', - 'pycsw:Schema': 'schema', - 'pycsw:MdSource': 'mdsource', - 'pycsw:InsertDate': 'insert_date', - 'pycsw:XML': 'xml', - 'pycsw:AnyText': 'anytext', - 'pycsw:BoundingBox': 'wkt_geometry', - 'pycsw:Links': 'links', - 'pycsw:Keywords': 'keywords', - - # Common profile fields - 'pycsw:Type': 'type', - 'pycsw:Classification': 'classification', - 'pycsw:AccessConstraints': 'classification', - 'pycsw:ProductId': 'product_id', - 'pycsw:Title': 'product_name', - 'pycsw:AlternateTitle': 'product_name', - 'pycsw:ProductVersion': 'product_version', - 'pycsw:ProductType': 'product_type', - 'pycsw:productSubType': 'product_sub_type', - 'pycsw:Abstract': 'description', - 'pycsw:CRS': 'srs', - 'pycsw:CRSName': 'srs_name', - 'pycsw:Creator': 'producer_name', - 'pycsw:Publisher': 'producer_name', - 'pycsw:Contributor': 'producer_name', - 'pycsw:CreationDate': 'creation_date_utc', - 'pycsw:Date': 'creation_date_utc', - 'pycsw:Format': 'type', - 'pycsw:Modified': 'update_date_utc', - 'pycsw:UpdateDate': 'update_date_utc', - 'pycsw:IngestionDate': 'ingestion_date', - 'pycsw:TempExtent_begin': 'imaging_time_begin_utc', - 'pycsw:TempExtent_end': 'imaging_time_end_utc', - 'pycsw:Resolution': 'max_resolution_deg', - 'pycsw:minResolutionDeg': 'min_resolution_deg', - 'pycsw:horizontalAccuracyCE90': 'min_horizontal_accuracy_ce_90', - 'pycsw:maxHorizontalAccuracyCE90': 'max_horizontal_accuracy_ce_90', - 'pycsw:sensorType': 'sensors', - 'pycsw:Region': 'region', - 'pycsw:footprint': 'footprint_geojson', - 'pycsw:Source': 'product_name', - 'pycsw:transparency': 'transparency', - 'pycsw:MimeType': 'tile_mime_format', - - 'pycsw:Relation': '', - 'pycsw:Language': '', - 'pycsw:TopicCategory': '', - - 'pycsw:maxResolutionMeter': 'max_resolution_meter', - 'pycsw:minResolutionMeter': 'min_resolution_meter', - 'pycsw:productBBox':'product_bbox', - 'pycsw:productStatus': 'product_status', - - # Added for mc-raster - 'pycsw:Rms': 'rms', - 'pycsw:Scale': 'scale', - } -} diff --git a/helm/raster/config/pycsw-location.conf b/helm/raster/config/pycsw-location.conf deleted file mode 100644 index 8324e526..00000000 --- a/helm/raster/config/pycsw-location.conf +++ /dev/null @@ -1,6 +0,0 @@ - -# pycsw custom uwsgi settings injected into root location -uwsgi_pass {{ include "service.fullname" . }}:{{ .Values.servicePort }}; -include uwsgi_params; -uwsgi_hide_header Set-Cookie; -uwsgi_param HTTP_Cookie ""; diff --git a/helm/raster/config/pycsw-server.conf b/helm/raster/config/pycsw-server.conf deleted file mode 100644 index ed865a8d..00000000 --- a/helm/raster/config/pycsw-server.conf +++ /dev/null @@ -1,10 +0,0 @@ -# pycsw server-level settings -keepalive_timeout 500; -proxy_connect_timeout 600; -proxy_send_timeout 600; -send_timeout 600; -client_max_body_size 5000; -client_header_timeout 600; -client_body_timeout 600; -client_header_buffer_size 12288; # 12K -large_client_header_buffers 4 12288; # 12K diff --git a/helm/raster/config/pycsw.cfg b/helm/raster/config/pycsw.cfg deleted file mode 100644 index a2013ab4..00000000 --- a/helm/raster/config/pycsw.cfg +++ /dev/null @@ -1,75 +0,0 @@ -[server] -home=/home/pycsw -url=${PYCSW_SERVER_URL} -mimetype=application/xml; charset=UTF-8 -encoding=UTF-8 -language=en-US -{{- if .Values.env.maxrecords}} -maxrecords={{ .Values.env.maxrecords }} -{{- end}} -loglevel={{ .Values.env.loglevel }} -logfile={{ .Values.env.logfile }} -#ogc_schemas_base=http://foo -#federatedcatalogues=http://catalog.data.gov/csw -#pretty_print=true -#gzip_compresslevel=8 -#domainquerytype=range -#domaincounts=true -#spatial_ranking=true -profiles={{ .Values.env.profiles }} - -[manager] -transactions=false -allowed_ips=127.0.0.1 -#csw_harvest_pagesize=10 - -[metadata:main] -identification_title=pycsw Geospatial Catalogue -identification_abstract=pycsw is an OGC CSW server implementation written in Python -identification_keywords=catalogue,discovery,metadata -identification_keywords_type=theme -identification_fees=None -identification_accessconstraints=None -provider_name=Organization Name -provider_url=https://pycsw.org/ -contact_name=Lastname, Firstname -contact_position=Position Title -contact_address=Mailing Address -contact_city=City -contact_stateorprovince=Administrative Area -contact_postalcode=Zip or Postal Code -contact_country=Country -contact_phone=+xx-xxx-xxx-xxxx -contact_fax=+xx-xxx-xxx-xxxx -contact_email=Email Address -contact_url=Contact URL -contact_hours=Hours of Service -contact_instructions=During hours of service. Off on weekends. -contact_role=pointOfContact - -[repository] -# sqlite -#database=sqlite:////home/pycsw/tests/functionaltests/suites/cite/data/cite.db -# postgres -database={{ template "pycsw-pg-connection-string" . }} -#database=postgresql://postgres:postgres@postgis-postgis/postgres -# mysql -#database=mysql://username:password@localhost/pycsw?charset=utf8 -mappings=${PYCSW_MAPPINGS_FILEPATH} -table=${DB_SCHEMA}.records -#filter=type = 'http://purl.org/dc/dcmitype/Dataset' -{{- if .Values.filterProductStatus }} -filter=product_status != 'UNPUBLISHED' -{{- end }} -stable_sort=true - -[metadata:inspire] -#enabled=true -#languages_supported=eng,gre -#default_language=eng -#date=YYYY-MM-DD -#gemet_keywords=Utility and governmental services -#conformity_service=notEvaluated -#contact_name=Organization Name -#contact_email=Email Address -#temp_extent=YYYY-MM-DD/YYYY-MM-DD diff --git a/helm/raster/config/pycswWsgi.ini b/helm/raster/config/pycswWsgi.ini deleted file mode 100644 index 4c9d53e5..00000000 --- a/helm/raster/config/pycswWsgi.ini +++ /dev/null @@ -1,38 +0,0 @@ -[uwsgi] -; based on https://github.com/kartoza/docker-mapproxy/blob/master/build_data/uwsgi.ini -chdir = /home/pycsw/pycsw -wsgi-file = cors.py -pidfile = /tmp/pycsw.pid -socket = :{{ .Values.pycswPort }} -processes = {{ .Values.env.uwsgi.processes }} ; Maximum number of workers allowed -cheaper = 2 ; Minimum number of workers allowed -enable-threads = true -threads = {{ .Values.env.uwsgi.threads }} -master = true -disable-logging = true -vacuum = true -die-on-term = true ; Shutdown when receiving SIGTERM (default is respawn) -need-app = true ; This parameter prevents uWSGI from starting if it is unable to find or load your application module -max-requests = 1000 ; Restart workers after this many requests -reload-on-rss = 2048 ; Restart workers after this much resident memory -buffer-size = 14336 ; 14K, Set the internal buffer size for uwsgi packet -worker-reload-mercy = 60 ; How long to wait before forcefully killing workers -wsgi-disable-file-wrapper = true -harakiri = 60 -py-callos-afterfork = true ; allow workers to trap signals -cheaper-algo = busyness -cheaper-initial = 2 ; Workers created at startup -cheaper-overload = 1 ; Length of a cycle in seconds -cheaper-step = 2 ; How many workers to spawn at a time -cheaper-busyness-multiplier = 30 ; How many cycles to wait before killing workers -cheaper-busyness-min = 20 ; Below this threshold, kill workers (if stable for multiplier cycles) -cheaper-busyness-max = 70 ; Above this threshold, spawn new workers -cheaper-busyness-backlog-alert = 2 ; Spawn emergency workers if more than this many requests are waiting in the queue -cheaper-busyness-backlog-step = 2 ; How many emergency workers to create if there are too many requests in the queue -chmod-socket = 664 -uid = 1000 -gid = 0 -http-socket = :8080 -stats = :{{ .Values.env.uwsgi.statsServer.stats }} -stats-http = {{ .Values.env.uwsgi.statsServer.enabled }} -stats-min = {{ .Values.env.uwsgi.statsServer.statsMinify }} diff --git a/helm/raster/templates/_helpers.tpl b/helm/raster/templates/_helpers.tpl deleted file mode 100644 index 4613eb62..00000000 --- a/helm/raster/templates/_helpers.tpl +++ /dev/null @@ -1,173 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "pycsw.name" -}} -{{- default .Chart.Name | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "pycsw.fullname" -}} -{{- $name := default .Chart.Name }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "pycsw.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "pycsw.labels" -}} -helm.sh/chart: {{ include "pycsw.chart" . }} -{{ include "pycsw.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{ include "mclabels.labels" . }} -{{- end }} - -{{/* -Returns the tag of the chart. -*/}} -{{- define "pycsw.tag" -}} -{{- default (printf "v%s" .Chart.AppVersion) .Values.image.tag }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "pycsw.selectorLabels" -}} -app.kubernetes.io/name: {{ include "pycsw.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{ include "mclabels.selectorLabels" . }} -{{- end }} - -{{/* -Returns the environment from global if exists or from the chart's values, defaults to development -*/}} -{{- define "pycsw.environment" -}} -{{- if .Values.global.environment }} - {{- .Values.global.environment -}} -{{- else -}} - {{- .Values.environment | default "development" -}} -{{- end -}} -{{- end -}} - -{{/* -Returns the pycsw server url based on the provided values, default localhost -*/}} -{{- define "pycsw.serverURL" -}} - {{- if not .Values.nginx.route.host }} - {{- printf "http://localhost:8000" -}} - {{- else -}} - {{- $protocol := ternary "https" "http" .Values.nginx.route.tls.enabled -}} - {{- printf "%s://%s" $protocol .Values.nginx.route.host -}} - {{- if .Values.nginx.route.path -}} - {{- printf "%s" .Values.nginx.route.path -}} - {{- end -}} - {{- end -}} -{{- end -}} - -{{/* -Returns the cloud provider name from global if exists or from the chart's values, defaults to minikube -*/}} -{{- define "pycsw.cloudProviderFlavor" -}} -{{- if .Values.global.cloudProvider.flavor }} - {{- .Values.global.cloudProvider.flavor -}} -{{- else if .Values.cloudProvider -}} - {{- .Values.cloudProvider.flavor | default "minikube" -}} -{{- else -}} - {{ "minikube" }} -{{- end -}} -{{- end -}} - -{{/* -Returns the cloud provider docker registry url from global if exists or from the chart's values -*/}} -{{- define "pycsw.cloudProviderDockerRegistryUrl" -}} -{{- if .Values.global.cloudProvider.dockerRegistryUrl }} - {{- printf "%s/" .Values.global.cloudProvider.dockerRegistryUrl -}} -{{- else if .Values.cloudProvider.dockerRegistryUrl -}} - {{- printf "%s/" .Values.cloudProvider.dockerRegistryUrl -}} -{{- else -}} -{{- end -}} -{{- end -}} - -{{/* -Returns the cloud provider image pull secret name from global if exists or from the chart's values -*/}} -{{- define "pycsw.cloudProviderImagePullSecretName" -}} -{{- if .Values.global.cloudProvider.imagePullSecretName }} - {{- .Values.global.cloudProvider.imagePullSecretName -}} -{{- else if .Values.cloudProvider.imagePullSecretName -}} - {{- .Values.cloudProvider.imagePullSecretName -}} -{{- end -}} -{{- end -}} - -{{/* -Returns the tracing url from global if exists or from the chart's values -*/}} -{{- define "pycsw.tracingUrl" -}} -{{- if .Values.global.tracing.url }} - {{- .Values.global.tracing.url -}} -{{- else if .Values.cloudProvider -}} - {{- .Values.env.tracing.url -}} -{{- end -}} -{{- end -}} - -{{/* -Returns the tracing url from global if exists or from the chart's values -*/}} -{{- define "pycsw.metricsUrl" -}} -{{- if .Values.global.metrics.url }} - {{- .Values.global.metrics.url -}} -{{- else -}} - {{- .Values.env.metrics.url -}} -{{- end -}} -{{- end -}} - -{{- define "pycsw-pg-connection-string" -}} -{{- $db := (include "common.db.merged" .) | fromYaml }} -{{- "postgresql://${DB_USER}" -}} -{{- if .Values.env.db.requirePassword -}} -{{- ":${DB_PASSWORD}" -}} -{{- end -}} -{{- "@${DB_HOST}:${DB_PORT}/${DB_NAME}" -}} -{{- if $db.sslEnabled -}} -{{- "?sslmode=require" -}} -{{- if $db.secrets.caFileKey -}} -{{- "&sslrootcert=" -}}/.postgresql/ca.pem -{{- end -}} -{{- if $db.secrets.certFileKey -}} -{{- "&sslcert=" -}}/.postgresql/cert.pem -{{- end -}} -{{- if $db.secrets.keyFileKey -}} -{{- "&sslkey=" -}}/.postgresql/key.pem -{{- end -}} -{{- end -}} -{{- end -}} - -{{- define "pycsw.cors.allowedHeaders" -}} -{{- $authentication := (include "common.authentication.merged" .) | fromYaml }} -{{- $headerList := list -}} -{{- if ne .Values.env.cors.allowedHeaders "" -}} -{{- range $k, $v := (split "," .Values.env.cors.allowedHeaders) -}} -{{- $headerList = append $headerList $v -}} -{{- end -}} -{{- $headerList = uniq $headerList -}} -{{- quote (join "," $headerList) -}} -{{- end -}} -{{- end -}} diff --git a/helm/raster/templates/_resources.tpl b/helm/raster/templates/_resources.tpl deleted file mode 100644 index bf7a281f..00000000 --- a/helm/raster/templates/_resources.tpl +++ /dev/null @@ -1,42 +0,0 @@ -{{/* -Create service name as used by the service name label. -*/}} -{{- define "service.fullname" -}} -{{- printf "%s-%s-%s" .Release.Name .Chart.Name "service" }} -{{- end }} - -{{/* -Create configmap name as used by the service name label. -*/}} -{{- define "configmap.fullname" -}} -{{- printf "%s-%s-%s" .Release.Name .Chart.Name "configmap" | indent 1 }} -{{- end }} - -{{/* -Create pycsw nginx configmap name as used by the service name label. -*/}} -{{- define "nginx-configmap.fullname" -}} -{{- printf "%s-%s-%s" .Release.Name .Chart.Name "nginx-configmap" | indent 1 }} -{{- end }} - -{{/* -Create deployment name as used by the service name label. -*/}} -{{- define "deployment.fullname" -}} -{{- printf "%s-%s-%s" .Release.Name .Chart.Name "deployment" | indent 1 }} -{{- end }} - - -{{/* -Create route name as used by the service name label. -*/}} -{{- define "route.fullname" -}} -{{- printf "%s-%s-%s" .Release.Name .Chart.Name "route" | indent 1 }} -{{- end }} - -{{/* -Create ingress name as used by the service name label. -*/}} -{{- define "ingress.fullname" -}} -{{- printf "%s-%s-%s" .Release.Name .Chart.Name "ingress" | indent 1 }} -{{- end }} diff --git a/helm/raster/templates/_tplValues.tpl b/helm/raster/templates/_tplValues.tpl deleted file mode 100644 index 36a81f4a..00000000 --- a/helm/raster/templates/_tplValues.tpl +++ /dev/null @@ -1,54 +0,0 @@ -{{/* -Copyright VMware, Inc. -SPDX-License-Identifier: APACHE-2.0 -*/}} - -{{/* vim: set filetype=mustache: */}} -{{/* -Renders a value that contains template perhaps with scope if the scope is present. -Usage: -{{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $ ) }} -{{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $ "scope" $app ) }} -*/}} -{{- define "common.tplvalues.render" -}} -{{- $value := typeIs "string" .value | ternary .value (.value | toYaml) }} -{{- if contains "{{" (toJson .value) }} - {{- if .scope }} - {{- tpl (cat "{{- with $.RelativeScope -}}" $value "{{- end }}") (merge (dict "RelativeScope" .scope) .context) }} - {{- else }} - {{- tpl $value .context }} - {{- end }} -{{- else }} - {{- $value }} -{{- end }} -{{- end -}} - -{{/* -Merge a list of values that contains template after rendering them. -Merge precedence is consistent with http://masterminds.github.io/sprig/dicts.html#merge-mustmerge -Usage: -{{ include "common.tplvalues.merge" ( dict "values" (list .Values.path.to.the.Value1 .Values.path.to.the.Value2) "context" $ ) }} -*/}} -{{- define "common.tplvalues.merge" -}} -{{- $dst := dict -}} -{{- range .values -}} -{{- $dst = include "common.tplvalues.render" (dict "value" . "context" $.context "scope" $.scope) | fromYaml | merge $dst -}} -{{- end -}} -{{ $dst | toYaml }} -{{- end -}} - -{{/* -End of usage example -*/}} - -{{/* -Custom definitions -*/}} - -{{- define "common.db.merged" -}} -{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.db .Values.global.db ) "context" . ) }} -{{- end -}} - -{{- define "common.authentication.merged" -}} -{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.authentication .Values.global.authentication ) "context" . ) }} -{{- end -}} diff --git a/helm/raster/templates/configmap.yaml b/helm/raster/templates/configmap.yaml deleted file mode 100644 index fa8dcc2b..00000000 --- a/helm/raster/templates/configmap.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- $chartName := include "pycsw.name" . -}} -{{- $configmapName := include "configmap.fullname" . }} -{{- $tracingUrl := include "pycsw.tracingUrl" . -}} -{{- $metricsUrl := include "pycsw.metricsUrl" . -}} -{{- $db := (include "common.db.merged" .) | fromYaml }} -{{- if .Values.enabled -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ $configmapName }} -data: - {{ if .Values.env.tracing.enabled }} - TELEMETRY_TRACING_ENABLED: 'true' - TELEMETRY_TRACING_URL: {{ $tracingUrl }} - {{ end }} - {{ if .Values.env.metrics.enabled }} - TELEMETRY_METRICS_ENABLED: 'true' - TELEMETRY_METRICS_URL: {{ $metricsUrl }} - {{ end }} - pycsw.cfg: {{ tpl (.Files.Get "config/pycsw.cfg") . | quote }} - mappings.py: {{ .Files.Get "config/mappings.py" | quote }} - uwsgi.ini: {{ tpl (.Files.Get "config/pycswWsgi.ini") . | quote }} - CORS_ENABLED: {{ .Values.env.cors.enabled | quote }} - CORS_ALLOWED_HEADERS: {{ template "pycsw.cors.allowedHeaders" . }} - CORS_ALLOWED_ORIGIN: {{ .Values.env.cors.allowedOrigin | quote }} - LOG_FORMAT: {{ .Values.env.logFormat | quote }} - DB_HOST: {{ $db.host }} - DB_PORT: {{ $db.port | quote }} - DB_NAME: {{ $db.name }} - POSTGRES_ENABLE_SSL_AUTH: {{ $db.sslEnabled | quote }} - DB_SCHEMA: {{ quote .Values.env.db.schema }} - PGAPPNAME: {{ $chartName }} - COORDINATE_PRECISION: {{ quote .Values.env.bboxPrecisionDigits }} - AUTH_ENABLED: {{ .Values.nginx.authorization.enabled | quote }} #maybe deprecated or used in other networks -{{- end }} diff --git a/helm/raster/templates/deployment.yaml b/helm/raster/templates/deployment.yaml deleted file mode 100644 index d15690e3..00000000 --- a/helm/raster/templates/deployment.yaml +++ /dev/null @@ -1,214 +0,0 @@ -{{- $releaseName := .Release.Name -}} -{{- $chartName := include "pycsw.name" . -}} -{{- $configmapName := include "configmap.fullname" . }} -{{- $deploymentName := include "deployment.fullname" . }} -{{- $cloudProviderFlavor := include "pycsw.cloudProviderFlavor" . -}} -{{- $cloudProviderDockerRegistryUrl := include "pycsw.cloudProviderDockerRegistryUrl" . -}} -{{- $cloudProviderImagePullSecretName := include "pycsw.cloudProviderImagePullSecretName" . -}} -{{- $db := (include "common.db.merged" .) | fromYaml }} -{{ $sslSecretName := ternary .Values.authentication.ssl.externalSecretName (printf "%s%s" .Release.Name "-open-ssl") .Values.authentication.ssl.useExternal }} -{{ $postgresSecretName := ternary $db.secrets.externalSecretName (printf "%s%s" .Release.Name "-postgres-secret") $db.secrets.useExternal }} -{{- $imageTag := include "pycsw.tag" . -}} -{{- $serverURL := include "pycsw.serverURL" . -}} - -{{- if .Values.enabled -}} - -{{- if .Values.authentication.ssl.enabled }} -{{- if and .Values.authentication.ssl.useExternal (not .Values.authentication.ssl.externalSecretName) }} -{{- fail "When using external ssl secret the value for .Values.authentication.ssl.externalSecretName should be set" }} -{{- end }} -{{- end }} - -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ $deploymentName }} - labels: - app: {{ $chartName }} - component: {{ $chartName }} - environment: {{ include "pycsw.environment" . }} - release: {{ $releaseName }} - {{- include "pycsw.labels" . | nindent 4 }} - annotations: - collectord.io/index: {{ quote .Values.splunkIndex }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app: {{ $chartName }} - release: {{ $releaseName }} - run: {{ $releaseName }}-{{ $chartName }} - {{- include "pycsw.selectorLabels" . | nindent 6 }} - template: - metadata: - labels: - app: {{ $chartName }} - release: {{ $releaseName }} - run: {{ $releaseName }}-{{ $chartName }} - {{- include "pycsw.selectorLabels" . | nindent 8 }} - annotations: - {{- if .Values.resetOnConfigChange }} - checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - {{- end }} - {{- if .Values.podAnnotations }} - {{- toYaml .Values.podAnnotations | nindent 8 }} - {{- end }} - {{ include "mclabels.annotations" . | nindent 8 }} - - spec: - {{- if $cloudProviderImagePullSecretName }} - imagePullSecrets: - - name: {{ $cloudProviderImagePullSecretName | quote }} - {{- end }} - containers: - - name: {{ $releaseName }} - {{- with .Values.image }} - image: {{ $cloudProviderDockerRegistryUrl }}{{ .repository }}:{{ $imageTag }} - {{- end }} - volumeMounts: - {{- if .Values.global.ca.secretName }} - - mountPath: {{ printf "%s/%s" .Values.global.ca.path .Values.global.ca.key | quote }} - name: root-ca - subPath: {{ quote .Values.caKey }} - {{- end }} - {{- if .Values.global.ca.secretName }} - - name: root-ca - mountPath: "/usr/local/share/ca-certificates" - {{- end }} - {{- if .Values.authentication.ssl.enabled }} - - name: open-ssl - mountPath: "/etc/ssl/openssl.cnf" - subPath: "openssl.cnf" - {{- end }} - - name: pyscw-config - mountPath: /etc/pycsw/pycsw.cfg - subPath: pycsw.cfg - - name: pyscw-mappings - mountPath: /etc/pycsw/mappings.py - subPath: mappings.py - - mountPath: "/pycsw/uwsgi.ini" - name: uwsgi-config - subPath: uwsgi.ini - {{- if $db.sslEnabled }} - {{- if $db.secrets.caFileKey }} - - name: ca-file - mountPath: /certs/ca.crt - subPath: ca.pem - {{- end }} - {{- if $db.secrets.keyFileKey }} - - name: key-file - mountPath: /certs/key.pem - subPath: key.pem - {{- end }} - {{- if $db.secrets.certFileKey }} - - name: cert-file - mountPath: /certs/cert.pem - subPath: cert.pem - {{- end }} - {{- end }} - env: - {{- if .Values.global.ca.secretName }} - - name: REQUESTS_CA_BUNDLE - value: {{ printf "%s/%s" .Values.caPath .Values.caKey | quote }} - - name: NODE_EXTRA_CA_CERTS - value: {{ printf "%s/%s" .Values.caPath .Values.caKey | quote }} - {{- end }} - - name: PYCSW_SERVER_URL - value: {{ $serverURL }} - - name: PYCSW_MAPPINGS_FILEPATH - value: /etc/pycsw/mappings.py - - name: DB_USER - valueFrom: - secretKeyRef: - name: {{ $postgresSecretName }} - key: username - {{- if .Values.env.db.requirePassword }} - - name: DB_PASSWORD - valueFrom: - secretKeyRef: - name: {{ $postgresSecretName }} - key: password - {{- end }} - - name: POSTGRES_CERTS_MOUNT_PATH - value: /certs - - name: POSTGRES_CERT_FILE_NAME - value: cert.pem - - name: POSTGRES_KEY_FILE_NAME - value: key.pem - envFrom: - - configMapRef: - name: {{ $configmapName }} - ports: - - name: http - containerPort: {{ .Values.pycswPort }} - protocol: TCP - readinessProbe: - httpGet: - path: /csw?service=CSW&request=GetCapabilities&version=3.0.0 - port: 8080 - initialDelaySeconds: 30 - timeoutSeconds: 5 - {{- if .Values.resources.enabled }} - resources: - {{- toYaml .Values.resources.value | nindent 12 }} - {{- end }} - ################################################## uwsgi exporter deployment############################################## - {{- if .Values.env.metrics.enabled }} - {{- template "pycsw-chart.uwsgi-exporter-container" (merge (dict "releaseName" .releaseName "chartName" .chartName "cloudProviderDockerRegistryUrl" $cloudProviderDockerRegistryUrl "resources" .Values.uwsgiExporter.resources) .) }} - {{- end }} - volumes: - {{- if .Values.global.ca.secretName }} - - name: root-ca - secret: - secretName: {{ .Values.global.ca.secretName }} - {{- end }} - {{- if .Values.authentication.ssl.enabled }} - - name: open-ssl - secret: - secretName: {{ $sslSecretName }} - {{- end }} - - name: pyscw-config - configMap: - name: {{ $configmapName }} - items: - - key: "pycsw.cfg" - path: "pycsw.cfg" - - name: pyscw-mappings - configMap: - name: {{ $configmapName }} - items: - - key: "mappings.py" - path: "mappings.py" - - name: uwsgi-config - configMap: - name: {{ $configmapName }} - items: - - key: "uwsgi.ini" - path: "uwsgi.ini" - {{- if $db.sslEnabled }} - {{- if $db.secrets.caFileKey }} - - name: ca-file - secret: - secretName: {{ $postgresSecretName }} - items: - - key: {{ $db.secrets.caFileKey }} - path: ca.pem - {{- end }} - {{- if $db.secrets.keyFileKey }} - - name: key-file - secret: - secretName: {{ $postgresSecretName }} - items: - - key: {{ $db.secrets.keyFileKey }} - path: key.pem - {{- end }} - {{- if $db.secrets.certFileKey }} - - name: cert-file - secret: - secretName: {{ $postgresSecretName }} - items: - - key: {{ $db.secrets.certFileKey }} - path: cert.pem - {{- end }} - {{- end }} -{{- end -}} diff --git a/helm/raster/templates/nginx/nginx-configmap.yaml b/helm/raster/templates/nginx/nginx-configmap.yaml deleted file mode 100644 index 524e03aa..00000000 --- a/helm/raster/templates/nginx/nginx-configmap.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if .Values.nginx.enabled -}} -{{- $chartName := include "pycsw.name" . -}} -{{- $releaseName := .Release.Name -}} -{{- $nginxConfigmapName := include "nginx-configmap.fullname" . }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ $nginxConfigmapName }} - labels: - app: {{ $releaseName }}-{{ $chartName }} - component: nginx-configmap - environment: {{ .Values.environment }} - release: {{ $releaseName }} -data: - pycsw-location.conf: {{ tpl (.Files.Get "config/pycsw-location.conf") . | quote }} - pycsw-server.conf: {{ tpl (.Files.Get "config/pycsw-server.conf") . | quote }} - log_format.conf: {{ tpl (.Files.Get "config/log_format.conf") . | quote }} -{{- end }} diff --git a/helm/raster/templates/service.yaml b/helm/raster/templates/service.yaml deleted file mode 100644 index c531377c..00000000 --- a/helm/raster/templates/service.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- $releaseName := .Release.Name -}} -{{- $chartName := include "pycsw.name" . -}} -{{- $cloudProviderFlavor := include "pycsw.cloudProviderFlavor" . -}} -{{- $serviceName := include "service.fullname" . -}} -{{- if .Values.enabled -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ $serviceName }} - labels: - app: {{ $chartName }} - component: {{ $chartName }} - environment: {{ include "pycsw.environment" . }} - release: {{ $releaseName }} - {{- include "pycsw.labels" . | nindent 4 }} -spec: - {{- if eq $cloudProviderFlavor "minikube" }} - type: NodePort - {{- end }} - ports: - - port: {{ .Values.servicePort }} - targetPort: {{ .Values.pycswPort }} - protocol: TCP - {{- if eq $cloudProviderFlavor "minikube" }} - nodePort: {{ .Values.nodePort }} - {{- end }} - selector: - app: {{ $chartName }} - release: {{ $releaseName }} - run: {{ $releaseName }}-{{ $chartName }} - {{- include "pycsw.selectorLabels" . | nindent 4 }} -{{- end }} diff --git a/helm/raster/templates/uwsgi-exporter/uwsgi-exporter-container.yaml b/helm/raster/templates/uwsgi-exporter/uwsgi-exporter-container.yaml deleted file mode 100644 index 300d463a..00000000 --- a/helm/raster/templates/uwsgi-exporter/uwsgi-exporter-container.yaml +++ /dev/null @@ -1,33 +0,0 @@ -{{- define "pycsw-chart.uwsgi-exporter-container" }} - - name: uwsgi-exporter - image: {{ .cloudProviderDockerRegistryUrl }}{{ .Values.uwsgiExporter.image.repository }}:{{ .Values.uwsgiExporter.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - args: - - "--stats.uri=http://localhost:{{ .Values.env.uwsgi.statsServer.stats }}" - - "--log.level={{ .Values.uwsgiExporter.env.logLevel }}" - {{- if .resources.enabled }} - resources: - {{- toYaml .resources.value | nindent 12 }} - {{- end }} - livenessProbe: - httpGet: - path: "/-/healthy" - port: "uwsgimetrics" - initialDelaySeconds: 2 - periodSeconds: 10 - timeoutSeconds: 5 - failureThreshold: 3 - successThreshold: 1 - readinessProbe: - httpGet: - path: "/metrics" - port: "uwsgimetrics" - initialDelaySeconds: 2 - periodSeconds: 10 - timeoutSeconds: 5 - failureThreshold: 3 - successThreshold: 1 - ports: - - name: "uwsgimetrics" - containerPort: {{ .Values.uwsgiExporter.port }} -{{- end }} diff --git a/helm/raster/values.yaml b/helm/raster/values.yaml deleted file mode 100644 index 9ce20c5b..00000000 --- a/helm/raster/values.yaml +++ /dev/null @@ -1,247 +0,0 @@ -global: - cloudProvider: - dockerRegistryUrl: "" - imagePullSecretName: "" - flavor: openshift - tracing: {} - metrics: {} - environment: "" - opalaEnabled: false - ca: - secretName: "" - path: "/usr/local/share/ca-certificates" - key: "ca.crt" - db: - host: "" - name: "" - port: 5432 - sslEnabled: false - rejectUnauthorized: false - secrets: - useExternal: true - externalSecretName: "raster-dev-postgres-secret" - caFileKey: "" - certFileKey: "" - keyFileKey: "" - -mclabels: - #environment: development - component: backend - partOf: serving - owner: raster - gisDomain: raster - prometheus: - enabled: true - port: 9117 - logScraping: true - -enabled: true -environment: development -replicaCount: 5 -initialDelaySeconds: 60 -resetOnConfigChange: true -splunkIndex: "" -imagePullPolicy: Always - -cloudProvider: - dockerRegistryUrl: "" - imagePullSecretName: "" - flavor: openshift - -authentication: - ssl: - enabled: false - useExternal: false - externalSecretName: "" -db: - host: "" - name: "" - port: 5432 - sslEnabled: false - rejectUnauthorized: false - secrets: - useExternal: false - externalSecretName: "" - caFileKey: "" - certFileKey: "" - keyFileKey: "" - -image: - repository: pycsw - tag: "latest" - -internalServicePort: 80 -pycswPort: 8000 -nodePort: 30018 -servicePort: 8080 - -# add pod annotations -# example: -# podAnnotations: -# annotation1: annotation-value-1 -# annotation2: annotation-value-2 -podAnnotations: {} - -filterProductStatus: false - -env: - loglevel: WARNING - maxrecords: null - bboxPrecisionDigits: 10 - logfile: "" - profiles: mc_raster - logFormat: >- - %(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s" %({x-forwarded-for}i)s %(L)s - uwsgi: - processes: 6 - threads: 10 - statsServer: - enabled: true - stats: 1717 - statsMinify: true - cors: - enabled: true - allowedOrigin: "*" - allowedHeaders: "x-api-key" - db: - schema: RasterCatalogManager - requirePassword: true - tracing: - enabled: false - url: http://localhost:55681/v1/trace - metrics: - prometheus: - scrape: true - port: 9117 - enabled: true - url: http://localhost:55681/v1/metrics - -resources: - enabled: true - value: - limits: - cpu: 2 - memory: 1200Mi - requests: - cpu: 2 - memory: 1200Mi - -nginx: - enabled: true - fullnameOverride: "" - nameOverride: "pycsw-nginx" - replicaCount: 2 - image: - repository: common/nginx - nginx: - extensions: - server: - enabled: true - fileName: pycsw-server.conf - location: - enabled: true - fileName: pycsw-location.conf - port: 8080 - internalServicePort: 80 - targetPort: 8080 - nodePort: 30003 - clientMaxBodySize: 5000 - - opentelemetry: - serviceName: pycsw-nginx - exporterHost: infra-otel.infra-services - exporterPort: 4317 - samplerMethod: "AlwaysOff" - ratio: 10 - - backend: - enabled: false - - prometheusExporter: - enabled: true - image: - repository: common/nginx/nginx-prometheus-exporter - tag: latest - pullPolicy: IfNotPresent - resources: - enabled: true - value: - limits: - cpu: 100m - memory: 128Mi - requests: - cpu: 100m - memory: 128Mi - - authorization: - enabled: true - domain: "raster" - url: http://opa-dev-opa-service.infra-services/v1/data/http/authz/decision - token: - queryName: token - - extraVolumes: - - name: nginx-config - configMap: - name: "{{ .Release.Name }}-pycsw-nginx-configmap" - - extraVolumeMounts: - - name: nginx-config - mountPath: "/etc/nginx/conf.d/extensions/pycsw-location.conf" - subPath: pycsw-location.conf - - name: nginx-config - mountPath: "/etc/nginx/conf.d/extensions/pycsw-server.conf" - subPath: pycsw-server.conf - - resources: - enabled: true - value: - limits: - cpu: 100m - memory: 128Mi - requests: - cpu: 100m - memory: 128Mi - - route: - enabled: true - routesMapping: - - path: /api/raster/v1 - host: - timeout: - enabled: false # defaults to 30s by openshift - duration: 60s # supported units (us, ms, s, m, h, d) - tls: - enabled: true - useCerts: false - certificate: "" - key: "" - caCertificate: "" - - ingress: - enabled: false - ingressClassName: "" - ingressMapping: - - host: "localhost" - path: /api/raster/v1 - pathType: Prefix - tls: - enabled: true - useExternal: "" - -uwsgiExporter: - image: - repository: "timonwong/uwsgi-exporter" - tag: "latest" - env: - logLevel: info # one of [debug, info, warn, error] - port: 9117 - resources: - enabled: true - value: - limits: - cpu: 100m - memory: 128Mi - requests: - cpu: 100m - memory: 128Mi diff --git a/helm/pycsw/templates/_helpers.tpl b/helm/templates/_helpers.tpl similarity index 100% rename from helm/pycsw/templates/_helpers.tpl rename to helm/templates/_helpers.tpl diff --git a/helm/pycsw/templates/_resources.tpl b/helm/templates/_resources.tpl similarity index 100% rename from helm/pycsw/templates/_resources.tpl rename to helm/templates/_resources.tpl diff --git a/helm/dem/templates/_tplValues.tpl b/helm/templates/_tplValues.tpl similarity index 100% rename from helm/dem/templates/_tplValues.tpl rename to helm/templates/_tplValues.tpl diff --git a/helm/pycsw/templates/configmap.yaml b/helm/templates/configmap.yaml similarity index 100% rename from helm/pycsw/templates/configmap.yaml rename to helm/templates/configmap.yaml diff --git a/helm/pycsw/templates/deployment.yaml b/helm/templates/deployment.yaml similarity index 100% rename from helm/pycsw/templates/deployment.yaml rename to helm/templates/deployment.yaml diff --git a/helm/pycsw/templates/nginx/nginx-configmap.yaml b/helm/templates/nginx/nginx-configmap.yaml similarity index 100% rename from helm/pycsw/templates/nginx/nginx-configmap.yaml rename to helm/templates/nginx/nginx-configmap.yaml diff --git a/helm/pycsw/templates/service.yaml b/helm/templates/service.yaml similarity index 100% rename from helm/pycsw/templates/service.yaml rename to helm/templates/service.yaml diff --git a/helm/dem/templates/uwsgi-exporter/uwsgi-exporter-container.yaml b/helm/templates/uwsgi-exporter/uwsgi-exporter-container.yaml similarity index 100% rename from helm/dem/templates/uwsgi-exporter/uwsgi-exporter-container.yaml rename to helm/templates/uwsgi-exporter/uwsgi-exporter-container.yaml diff --git a/helm/pycsw/values.yaml b/helm/values.yaml similarity index 100% rename from helm/pycsw/values.yaml rename to helm/values.yaml diff --git a/release-please-config.json b/release-please-config.json index 207662f6..fa852c80 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -7,42 +7,12 @@ "extra-files": [ { "type": "yaml", - "path": "helm/3d/Chart.yaml", + "path": "helm/Chart.yaml", "jsonpath": "$.version" }, { "type": "yaml", - "path": "helm/3d/Chart.yaml", - "jsonpath": "$.appVersion" - }, - { - "type": "yaml", - "path": "helm/dem/Chart.yaml", - "jsonpath": "$.version" - }, - { - "type": "yaml", - "path": "helm/dem/Chart.yaml", - "jsonpath": "$.appVersion" - }, - { - "type": "yaml", - "path": "helm/raster/Chart.yaml", - "jsonpath": "$.version" - }, - { - "type": "yaml", - "path": "helm/raster/Chart.yaml", - "jsonpath": "$.appVersion" - }, - { - "type": "yaml", - "path": "helm/pycsw/Chart.yaml", - "jsonpath": "$.version" - }, - { - "type": "yaml", - "path": "helm/pycsw/Chart.yaml", + "path": "helm/Chart.yaml", "jsonpath": "$.appVersion" } ]