Skip to content

Commit

Permalink
Merge pull request #28 from fmidev/fmi-public-helm-charts-migration
Browse files Browse the repository at this point in the history
[SOL-16523] Migrate fmi-nodeport and fmi-routes to common repo.
  • Loading branch information
marko-jalavisto-fmi authored Oct 4, 2023
2 parents 720f66e + 6701d63 commit 7cb197b
Show file tree
Hide file tree
Showing 7 changed files with 109 additions and 0 deletions.
13 changes: 13 additions & 0 deletions charts/fmi-nodeport/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v2
name: fmi-nodeport
description: Helm chart for defining api nodeport
type: application
version: 0.0.2
keywords:
- fmi
- nodeport
home: https://github.com/fmidev/fmi-public-helm-charts
maintainers:
- name: fmi-build-bot
email: [email protected]
url: https://github.com/fmi-build-bot
22 changes: 22 additions & 0 deletions charts/fmi-nodeport/templates/nodeport.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{- if .Values.nodeports }}
{{- range $name, $nodeport := .Values.nodeports }}
{{- if $nodeport.enabled }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ $name }}-nodeport
namespace: {{ $.Release.Namespace }}
spec:
ports:
- name: {{ $name }}-service-port
nodePort: {{ $nodeport.apiPort }}
port: {{ $nodeport.servicePort }}
protocol: TCP
targetPort: {{ $nodeport.targetPodPort }}
selector:
app.kubernetes.io/instance: {{ $.Release.Namespace }}
type: NodePort
{{- end }}
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/fmi-nodeport/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Intentionally empty default configuration
fmi-nodeports:
nodeports:
23 changes: 23 additions & 0 deletions charts/fmi-routes/.helmignore
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/
13 changes: 13 additions & 0 deletions charts/fmi-routes/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v2
name: fmi-routes
description: Helm chart for defining multiple routes
type: application
version: 0.0.8
keywords:
- fmi
- route
home: https://github.com/fmidev/fmi-public-helm-charts
maintainers:
- name: fmi-build-bot
email: [email protected]
url: https://github.com/fmi-build-bot
32 changes: 32 additions & 0 deletions charts/fmi-routes/templates/route.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{{- if .Values.routes }}
{{- range $name, $route := .Values.routes }}
{{- if $route.enabled }}
---
apiVersion: route.openshift.io/v1
kind: Route
metadata:
name: {{ $name }}
namespace: {{ $.Release.Namespace }}
labels:
type: {{ $route.type }}
{{- if $route.annotations }}
annotations:
{{ toYaml $route.annotations | indent 4 }}
{{- end }}
spec:
host: {{ $route.host }}
port:
targetPort: {{ $route.targetPort }}
to:
kind: Service
name: {{ $route.targetService }}
weight: 100
wildcardPolicy: None
{{- if $route.tls }}
tls:
termination: {{ $route.tls.termination }}
insecureEdgeTerminationPolicy: {{ $route.tls.insecureEdgeTerminationPolicy }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/fmi-routes/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Intentionally empty default configuration
fmi-routes:
routes:

0 comments on commit 7cb197b

Please sign in to comment.