-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
715 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
# maptiler-server-kubernetes | ||
Helm charts for MapTiler Server | ||
# MapTiler Server Helm Charts | ||
|
||
Helm charts for [MapTiler Server](https://www.maptiler.com/server/) - self-hosting OpenStreetMap world maps and maps made with MapTiler. | ||
|
||
MapTiler Server uses a different license: https://www.maptiler.com/terms/server-data/ | ||
Please [Contact sales](mailto:[email protected]) in case of larger deployments. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# 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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
apiVersion: v2 | ||
name: maptiler-server | ||
description: MapTiler Server - self-hosting OpenStreetMap world maps and maps made with MapTiler | ||
home: https://www.maptiler.com/server/ | ||
icon: https://www.gravatar.com/avatar/b53ef88ec5f7fc1e1423b620bc3c69e2?s=160 | ||
|
||
# A chart can be either an 'application' or a 'library' chart. | ||
# | ||
# Application charts are a collection of templates that can be packaged into versioned archives | ||
# to be deployed. | ||
# | ||
# Library charts provide useful utilities or functions for the chart developer. They're included as | ||
# a dependency of application charts to inject those utilities and functions into the rendering | ||
# pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
type: application | ||
|
||
# This is the chart version. This version number should be incremented each time you make changes | ||
# to the chart and its templates, including the app version. | ||
# Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
version: 1.0.0 | ||
|
||
# This is the version number of the application being deployed. This version number should be | ||
# incremented each time you make changes to the application. Versions are not expected to | ||
# follow Semantic Versioning. They should reflect the version the application is using. | ||
# It is recommended to use it with quotes. | ||
appVersion: "4.5.0" | ||
|
||
sources: | ||
- https://github.com/maptiler/maptiler-server-kubernetes | ||
|
||
annotations: | ||
artifacthub.io/links: | | ||
- name: Docker Image | ||
url: https://hub.docker.com/r/maptiler/server | ||
- name: Helm Chart | ||
url: https://labs.maptiler.com/maptiler-server-kubernetes/ | ||
artifacthub.io/changes: | | ||
- Initial release of the Helm Chart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
# MapTiler Server | ||
|
||
[MapTiler Server](https://www.maptiler.com/server/) - self-hosting OpenStreetMap world maps and maps made with MapTiler. | ||
|
||
## Requirements | ||
|
||
- Running Kubernetes cluster with at least 1 node. | ||
- Running [Ingress controller](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/). | ||
- (Optional) Persistent Volume type supporting [ReadWriteMany](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) access mode to be able to share tileset data and configuration in multi-instance deployments. | ||
|
||
## Usage | ||
|
||
[Helm](https://helm.sh) must be installed to use the chart. | ||
Please refer to Helm's [documentation](https://helm.sh/docs/) to get started. | ||
|
||
### Installing the Chart | ||
|
||
To install the chart with the release name `maptiler-server-app`: | ||
|
||
```console | ||
helm repo add maptiler https://labs.maptiler.com/maptiler-server-kubernetes/ | ||
helm install maptiler-server-app maptiler/maptiler-server | ||
``` | ||
|
||
The command deploys MapTiler Server on the Kubernetes cluster in the default configuration. The section lists the parameters that can be configured during installation. | ||
|
||
### Uninstalling the Chart | ||
|
||
To uninstall the `maptiler-server-app` deployment: | ||
|
||
```console | ||
helm uninstall maptiler-server-app | ||
``` | ||
|
||
The command removes all the Kubernetes components associated with the chart and deletes the release. | ||
|
||
## Configuration | ||
|
||
Below are the supported configuration options that can be overridden or customized in `values.yaml`: | ||
|
||
| Parameter | Description | Default | | ||
|-------------------------------------------|-----------------------------------------------|---------------------------------------------------------| | ||
| `replicaCount` | Number of pods | `1` | | ||
| `image.repository` | Image repository | `maptiler/server` | | ||
| `image.tag` | Overrides the image tag whose default is the chart appVersion. | `""` | | ||
| `image.pullPolicy` | Image pull policy | `IfNotPresent` | | ||
| `imagePullSecrets` | Image pull secrets (can be templated) | `[]` | | ||
| `nameOverride` | Overrides the default chart name | `""` | | ||
| `fullnameOverride` | Overrides the default chart full name | `""` | | ||
| `podAnnotations` | Pod annotations | `{}` | | ||
| `podLabels` | Pod labels | `{}` | | ||
| `podSecurityContext` | Pod securityContext | `{}` | | ||
| `securityContext` | Deployment securityContext | `{}` | | ||
| `service.type` | Kubernetes service type | `ClusterIP` | | ||
| `service.port` | Kubernetes port where service is exposed | `80` | | ||
| `ingress.enabled` | Enables Ingress | `false` | | ||
| `ingress.className` | Ingress Class Name. MAY be required for Kubernetes versions >= 1.18 | `""` | | ||
| `ingress.annotations` | Ingress annotations (values are templated) | `{}` | | ||
| `ingress.hosts` | Ingress hosts (can be templated) | `{ "hosts": [{ "host": "maps.company.com", "paths": [{ "path": "/", "pathType": "ImplementationSpecific"}] }] }` | | ||
| `ingress.tls` | Ingress TLS configuration | `[]` | | ||
| `resources` | CPU/Memory resource requests/limits | `{}` | | ||
| `livenessProbe` | Liveness Probe settings | `{ "httpGet": { "path": "/", "port": http } }` | | ||
| `readinessProbe` | Readiness Probe settings | `{ "httpGet": { "path": "/", "port": http } }` | | ||
| `autoscaling.enabled` | Enables Autoscaling | `false` | | ||
| `autoscaling.minReplicas` | Minimal number of pods | `1` | | ||
| `autoscaling.maxReplicas` | Maximal number of pods | `100` | | ||
| `autoscaling.targetCPUUtilizationPercentage` | Target CPU utilization percentage | `80` | | ||
| `autoscaling.targetMemoryUtilizationPercentage` | Target Memory utilization percentage | `nil` | | ||
| `storage.storageClassName` | Type of persistent volume claim | `manual` | | ||
| `storage.size` | Size of persistent volume claim | `20Gi` | | ||
| `storage.nfs` | Whether storage is NFS | `false` | | ||
| `volumes` | Additional volumes | `[]` | | ||
| `volumeMounts` | Additional volume mounts | `[]` | | ||
| `nodeSelector` | Node labels for pod assignment | `{}` | | ||
| `tolerations` | Toleration labels for pod assignment | `[]` | | ||
| `affinity` | Affinity settings for pod assignment | `{}` | | ||
| `maptilerServer.adminPassword` | Password for MapTiler Server Admin interface | `admin123` | | ||
| `maptilerServer.port` | MapTiler Server Port | `3650` | | ||
| `maptilerServer.licenseKey` | MapTiler Server License Key | `""` | | ||
| `maptilerServer.licenseServer` | MapTiler Server License Server URL | `""` | | ||
| `maptilerServer.rasterization` | Enables map rasterization | `true` | | ||
| `maptilerServer.withAdmin` | Enables Admin interface | `true` | | ||
| `maptilerServer.workDir` | MapTiler Server working directory with config and tilesets | `/data` | | ||
|
||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, | ||
|
||
```console | ||
helm install maptiler-server-app --set image.tag=4.4.0 maptiler/maptiler-server | ||
``` | ||
|
||
The above command sets the MapTiler Server image's tag to `4.4.0`. | ||
|
||
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, | ||
|
||
```console | ||
helm install maptiler-server-app -f values.yaml maptiler/maptiler-server | ||
``` | ||
|
||
## Examples | ||
|
||
You can find configuration examples in our [Documentation Portal](https://documentation.maptiler.com/hc/en-us/categories/22658073695889-Map-Server). | ||
|
||
## ChangeLog | ||
|
||
### 1.0.0 | ||
|
||
- Initial release of the Helm Chart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
1. Get the application URL by running these commands: | ||
{{- if .Values.ingress.enabled }} | ||
{{- range $host := .Values.ingress.hosts }} | ||
{{- range .paths }} | ||
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} | ||
{{- end }} | ||
{{- end }} | ||
{{- else if contains "NodePort" .Values.service.type }} | ||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "maptiler-server.fullname" . }}) | ||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") | ||
echo http://$NODE_IP:$NODE_PORT | ||
{{- else if contains "LoadBalancer" .Values.service.type }} | ||
NOTE: It may take a few minutes for the LoadBalancer IP to be available. | ||
You can watch its status by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "maptiler-server.fullname" . }}' | ||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "maptiler-server.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") | ||
echo http://$SERVICE_IP:{{ .Values.service.port }} | ||
{{- else if contains "ClusterIP" .Values.service.type }} | ||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "maptiler-server.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") | ||
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") | ||
echo "Visit http://127.0.0.1:8080 to use your application" | ||
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "maptiler-server.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | 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 "maptiler-server.fullname" -}} | ||
{{- if .Values.fullnameOverride }} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- $name := default .Chart.Name .Values.nameOverride }} | ||
{{- if contains $name .Release.Name }} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "maptiler-server.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "maptiler-server.labels" -}} | ||
helm.sh/chart: {{ include "maptiler-server.chart" . }} | ||
{{ include "maptiler-server.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "maptiler-server.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "maptiler-server.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: v1 | ||
data: | ||
MAPTILER_SERVER_ADMIN_PASSWORD: {{ .Values.maptilerServer.adminPassword | quote }} | ||
{{- if .Values.maptilerServer.licenseKey }} | ||
MAPTILER_SERVER_LICENSE: {{ .Values.maptilerServer.licenseKey | quote }} | ||
{{- end }} | ||
{{- if .Values.maptilerServer.licenseServer }} | ||
MAPTILER_SERVER_LICENSE_SERVER: {{ .Values.maptilerServer.licenseServer | quote }} | ||
{{- end }} | ||
MAPTILER_SERVER_PORT: {{ .Values.maptilerServer.port | quote }} | ||
MAPTILER_SERVER_RASTERIZATION: {{ .Values.maptilerServer.rasterization | quote }} | ||
MAPTILER_SERVER_WORK_DIR: {{ .Values.maptilerServer.workDir | quote }} | ||
MAPTILER_SERVER_WITH_ADMIN: "false" | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "maptiler-server.fullname" . }} | ||
labels: | ||
{{- include "maptiler-server.labels" . | nindent 4 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{{- if .Values.maptilerServer.withAdmin }} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "maptiler-server.fullname" . }}-admin | ||
labels: | ||
{{- include "maptiler-server.labels" . | nindent 4 }} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
{{- include "maptiler-server.selectorLabels" . | nindent 6 }} | ||
instance: admin | ||
template: | ||
metadata: | ||
{{- with .Values.podAnnotations }} | ||
annotations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
labels: | ||
{{- include "maptiler-server.labels" . | nindent 8 }} | ||
{{- with .Values.podLabels }} | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
instance: admin | ||
spec: | ||
{{- with .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
securityContext: | ||
{{- toYaml .Values.podSecurityContext | nindent 8 }} | ||
containers: | ||
- name: {{ .Chart.Name }} | ||
securityContext: | ||
{{- toYaml .Values.securityContext | nindent 12 }} | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
args: [ | ||
"--adminPassword=$(MAPTILER_SERVER_ADMIN_PASSWORD)", | ||
"--port=$(MAPTILER_SERVER_PORT)", | ||
"--rasterization=$(MAPTILER_SERVER_RASTERIZATION)", | ||
"--withAdmin=$(MAPTILER_SERVER_WITH_ADMIN)", | ||
"--workDir=$(MAPTILER_SERVER_WORK_DIR)" | ||
] | ||
ports: | ||
- name: http | ||
containerPort: {{ .Values.maptilerServer.port }} | ||
protocol: TCP | ||
envFrom: | ||
- configMapRef: | ||
name: {{ include "maptiler-server.fullname" . }} | ||
env: | ||
- name: MAPTILER_SERVER_WITH_ADMIN | ||
value: "true" | ||
livenessProbe: | ||
{{- toYaml .Values.livenessProbe | nindent 12 }} | ||
readinessProbe: | ||
{{- toYaml .Values.readinessProbe | nindent 12 }} | ||
resources: | ||
{{- toYaml .Values.resources | nindent 12 }} | ||
{{- with .Values.volumeMounts }} | ||
volumeMounts: | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
{{- with .Values.volumes }} | ||
volumes: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- end }} |
Oops, something went wrong.