Skip to content

Commit

Permalink
feat: shogun-admin helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
simonseyock committed Jan 31, 2024
1 parent 200b6af commit 1f8c90d
Show file tree
Hide file tree
Showing 9 changed files with 712 additions and 0 deletions.
22 changes: 22 additions & 0 deletions charts/shogun-admin/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 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
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
5 changes: 5 additions & 0 deletions charts/shogun-admin/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
appVersion: 11.4.0
description: Helm chart for SHOGun-Admin-Client
name: shogun-admin
version: 1.0.0
22 changes: 22 additions & 0 deletions charts/shogun-admin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Helm chart for SHOGun-Admin-Client

Helm chart that uses the `docker-public.terrestris.de/terrestris/shogun-admin` docker image for Kubernetes cluster deployments. The SHOGun-Admin-Client version can be defined in the `Chart.yaml` file by setting `appVersion`.

## Parameter overview

The following table gives an overview about the application specific parameters that might be adjusted in (a custom) `values.yaml` for a given environment:

| Key | Description | Default |
|-----|-------------|-------------------------------------|
| `keycloak.host` | The (external) host of the Keycloak server. | `keycloak.example.com` |
| `keycloak.realm` | The Keycloak realm the application should check all authorizations against. This realm needs to contain the given `keycloak.clientId`, all users and their respective role associations. | `shogun` |
| `keycloak.clientId` | The ID of the client inside the given realm. The client is usually specific for this application and holds the required roles (currently `admin`). Since actual user login takes place the client is usually of access-type `public`. | `shogun-admin` |
| `keycloak.authorizedAdminRole` | The role which has access to the shogun admin. | `admin` |
| `shogun.appPrefix` | The base path of the SHOGun-Backend (on `shogun.base`). Typically this doesn't need to be updated. | `""` |
| `shogun.base` | The (external) base URL of the SHOGun-Backend. | `https://shogun-boot.example.com` |
| `client.base` | The (external) base URL of the SHOGun-GIS-Client. | `https://shogun-client.example.com` |
| `geoserver.url` | The (external) base URL of the [GeoServer](https://github.com/geoserver/geoserver). | `https://geoserver.example.com` |

## Secrets overview

There are no secrets available.
52 changes: 52 additions & 0 deletions charts/shogun-admin/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "shogun-admin.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 "shogun-admin.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 "shogun-admin.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Common labels
*/}}
{{- define "shogun-admin.labels" -}}
helm.sh/chart: {{ include "shogun-admin.chart" . }}
{{ include "shogun-admin.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "shogun-admin.selectorLabels" -}}
app.kubernetes.io/name: {{ include "shogun-admin.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
Loading

0 comments on commit 1f8c90d

Please sign in to comment.