diff --git a/charts/fmi-nodeport/Chart.yaml b/charts/fmi-nodeport/Chart.yaml new file mode 100644 index 0000000..3f3829b --- /dev/null +++ b/charts/fmi-nodeport/Chart.yaml @@ -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: admin@weatherproof.fi + url: https://github.com/fmi-build-bot diff --git a/charts/fmi-nodeport/templates/nodeport.yaml b/charts/fmi-nodeport/templates/nodeport.yaml new file mode 100644 index 0000000..a32db4d --- /dev/null +++ b/charts/fmi-nodeport/templates/nodeport.yaml @@ -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 }} \ No newline at end of file diff --git a/charts/fmi-nodeport/values.yaml b/charts/fmi-nodeport/values.yaml new file mode 100644 index 0000000..d06571f --- /dev/null +++ b/charts/fmi-nodeport/values.yaml @@ -0,0 +1,3 @@ +# Intentionally empty default configuration +fmi-nodeports: + nodeports: diff --git a/charts/fmi-routes/.helmignore b/charts/fmi-routes/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/fmi-routes/.helmignore @@ -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/ diff --git a/charts/fmi-routes/Chart.yaml b/charts/fmi-routes/Chart.yaml new file mode 100644 index 0000000..242e1c2 --- /dev/null +++ b/charts/fmi-routes/Chart.yaml @@ -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: admin@weatherproof.fi + url: https://github.com/fmi-build-bot diff --git a/charts/fmi-routes/templates/route.yaml b/charts/fmi-routes/templates/route.yaml new file mode 100644 index 0000000..33e1cbb --- /dev/null +++ b/charts/fmi-routes/templates/route.yaml @@ -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 }} diff --git a/charts/fmi-routes/values.yaml b/charts/fmi-routes/values.yaml new file mode 100644 index 0000000..c6ad504 --- /dev/null +++ b/charts/fmi-routes/values.yaml @@ -0,0 +1,3 @@ +# Intentionally empty default configuration +fmi-routes: + routes: