Skip to content

Commit

Permalink
feat: make shogun charts subcharts of shogun-cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
simonseyock committed Feb 21, 2024
1 parent cf9a17b commit 26e050e
Show file tree
Hide file tree
Showing 34 changed files with 310 additions and 177 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ kubectl create secret generic keycloakcred --from-literal=username=admin --from-
cd charts/shogun-cloud
helm dependency build
helm install shogun-cloud ./ --values ./values.yaml


kubectl port-forward service/shogun-cloud-keycloak 1234:https
kubectl port-forward service/shogun-cloud-shogun-boot 1235:http
kubectl port-forward service/shogun-cloud-shogun-client 1236:http
Expand Down
40 changes: 0 additions & 40 deletions charts/shogun-admin/templates/ingress.yaml

This file was deleted.

40 changes: 0 additions & 40 deletions charts/shogun-boot/templates/ingress.yaml

This file was deleted.

40 changes: 0 additions & 40 deletions charts/shogun-client/templates/ingress.yaml

This file was deleted.

18 changes: 10 additions & 8 deletions charts/shogun-cloud/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,24 @@ 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.9
version: 1.0.0
dependencies:
- name: postgis
version: "1.2.2"
repository: "file://../postgis"
repository: "https://terrestris.github.io/helm-charts"
condition: postgis.enabled
- name: keycloak
version: "18.4.0"
repository: "https://charts.bitnami.com/bitnami"
condition: keycloak.enabled
- name: shogun-boot
version: "1.0.0"
repository: "file://../shogun-boot"
version: "*"
condition: shogun-boot.enabled
- name: shogun-admin
version: "1.0.0"
repository: "file://../shogun-admin"
version: "*"
condition: shogun-admin.enabled
- name: shogun-client
version: "1.0.0"
repository: "file://../shogun-client"
version: "*"
condition: shogun-client.enabled

# TODO: Add geoserver
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v2
appVersion: 11.4.0
description: Helm chart for SHOGun-Admin-Client
name: shogun-admin
version: 1.0.0
version: 1.0.1
File renamed without changes.
File renamed without changes.
61 changes: 61 additions & 0 deletions charts/shogun-cloud/charts/shogun-admin/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "shogun-admin.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
{{- end }}
{{- end }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "shogun-admin.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
pathType: {{ .pathType }}
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@ service:
port: 80

ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: nginx
kubernetes.io/tls-acme: "true"
cert-manager.io/cluster-issuer: vault-issuer
enabled: false
className: ""
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: shogun-admin.example.com
paths: [ "/" ]
tls:
- secretName: shogun-admin-tls
hosts:
- shogun-admin.example.com
- host: shogun.local
paths:
- path: /shogun-admin/
pathType: ImplementationSpecific
tls: []
# - secretName: shogun-tls
# hosts:
# - shogun.local

resources:
limits:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v2
appVersion: 18.0.0
description: Helm chart for SHOGun-Boot
name: shogun-boot
version: 1.0.0
version: 1.0.1
File renamed without changes.
File renamed without changes.
File renamed without changes.
61 changes: 61 additions & 0 deletions charts/shogun-cloud/charts/shogun-boot/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "shogun-boot.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
{{- end }}
{{- end }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "shogun-boot.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
pathType: {{ .pathType }}
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,21 @@ service:
port: 9010

ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: nginx
kubernetes.io/tls-acme: "true"
cert-manager.io/cluster-issuer: vault-issuer
nginx.ingress.kubernetes.io/enable-cors: "true"
enabled: false
className: ""
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
# nginx.ingress.kubernetes.io/enable-cors: "true"
hosts:
- host: shogun-boot.example.com
paths: [ "/" ]
tls:
- secretName: shogun-boot-tls
hosts:
- shogun-boot.example.com
- host: shogun.local
paths:
- path: /shogun-boot/
pathType: ImplementationSpecific
tls: []
# - secretName: shogun-tls
# hosts:
# - shogun.local

resources:
limits:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v2
appVersion: 6.9.0
description: Helm chart for SHOGun-GIS-Client
name: shogun-client
version: 1.0.0
version: 1.0.1
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 26e050e

Please sign in to comment.