Skip to content

Feat: add helm chart#1

Open
razbroc wants to merge 8 commits into
fix/on-redis-error-fallbackfrom
feat/add-helm-chart
Open

Feat: add helm chart#1
razbroc wants to merge 8 commits into
fix/on-redis-error-fallbackfrom
feat/add-helm-chart

Conversation

@razbroc

@razbroc razbroc commented Mar 10, 2026

Copy link
Copy Markdown
Collaborator

This pull request introduces a comprehensive Helm chart for deploying the MapProxy service, along with significant improvements to configuration, logging, and startup logic. The changes add Helm chart structure, templated configuration files for Nginx and uWSGI, and enhance the container entrypoint to better support Kubernetes deployments. The most important changes are grouped below:

Helm Chart Introduction and Structure

  • Added a new Helm chart for MapProxy, including Chart.yaml with dependencies on nginx and mclabels charts, enabling managed, configurable Kubernetes deployments.
  • Added .helmignore to exclude unnecessary files from chart packaging.
  • Introduced _helpers.tpl with reusable template helpers for naming, labels, environment, and cloud provider settings.

Configuration and Template Enhancements

  • Added templated Nginx and uWSGI configuration files (nginx.conf, mapProxyUwsgi.ini, default.conf, nginx.mapproxy.conf, nginx.mapproxy.wmts.conf) to support flexible, environment-driven deployments and advanced features like caching, JWT authentication, and metrics. [1] [2] [3] [4] [5]
  • Added logging configuration files (log.ini, log_format.conf) to enable structured, JSON-formatted logs with support for OpenTelemetry and customizable log levels. [1] [2]

Entrypoint and Startup Logic

  • Updated entrypoint.sh to create necessary directories, validate the presence of the Helm-provided uwsgi.ini, and launch uWSGI using the mounted config, improving error handling and compatibility with Kubernetes ConfigMaps.

Comment thread helm/charts/mclabels-1.0.1.tgz Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add .gitignore -> add .tgz files to gitignore

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kk

Comment thread helm/charts/nginx-1.3.0.tgz Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add to .tgz files to gitignore

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kk

TELEMETRY_TRACING_ENABLED: 'true'
TELEMETRY_TRACING_URL: {{ $tracing.url }}
{{ end }}
{{ if $metrics.enabled }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$metrics.enabled -> this scope should be irrelevant as mclabels should take care of those envs once they configured

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

Comment thread helm/templates/_helpers.tpl Outdated
{{- $headerList = uniq $headerList -}}
{{- quote (join "," $headerList) -}}
{{- end -}}
{{- end -}} No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EOF

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kk

Comment thread helm/templates/_helpers.tpl Outdated
{{- end -}}
{{- end -}}

{{- define "map-proxy.cors.allowedHeaders" -}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to "mapproxy" as all helpers convention

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kk

Comment thread helm/.helmignore Outdated
.vscode/
*.txt
*local.json
*local.yaml No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EOF

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kk

Comment thread Dockerfile Outdated
# Copy application code and entrypoint (single layer, correct ownership)
COPY --chown=mapproxy:mapproxy src/app.py /mapproxy/app.py
COPY --chown=mapproxy:mapproxy entrypoint.sh /mapproxy/entrypoint.sh
COPY --chown=mapproxy:mapproxy src/app.py /mapproxy/app.py

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert spaces

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kk

Comment thread Dockerfile Outdated
COPY --chown=mapproxy:mapproxy src/app.py /mapproxy/app.py
COPY --chown=mapproxy:mapproxy entrypoint.sh /mapproxy/entrypoint.sh
COPY --chown=mapproxy:mapproxy src/app.py /mapproxy/app.py
COPY --chown=mapproxy:mapproxy entrypoint.sh /mapproxy/entrypoint.sh

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert spaces

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kk

Comment thread entrypoint.sh

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this file? does not includes in mapproxy image?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we run this file as entrypoint in docker file see ENTRYPOINT ["/mapproxy/entrypoint.sh"]

@razbroc razbroc requested a review from CL-SHLOMIKONCHA April 23, 2026 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants