Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/portal/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "5.4.1"
description: CA API Developer Portal
name: portal
version: 2.3.22
version: 2.3.23
type: application
home: https://github.com/CAAPIM/apim-charts
maintainers:
Expand Down
3 changes: 3 additions & 0 deletions charts/portal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ This Chart deploys the Layer7 API Developer Portal on a Kubernetes Cluster using

## Release Notes

## 2.3.23 General Updates
- Create dynamic routes in Open-shift environment.

## 2.3.22 General Updates
- This new version of the chart supports API Portal 5.4.1
- Upgrade to 2.3.22 requires chart version 2.3.16 (per Portal compatibility requirements).
Expand Down
171 changes: 164 additions & 7 deletions charts/portal/templates/ingress/route.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,20 @@ kind: Route
metadata:
name: apim-route
labels:
router: default
app: {{ template "portal.name" . }}
chart: {{ template "portal.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- range $key, $val := .Values.global.additionalLabels }}
{{ $key }}: "{{ $val }}"
{{- end }}
{{- range $key, $val := .Values.ingress.additionalLabels }}
{{ $key }}: "{{ $val }}"
{{- end }}
annotations:
{{- range $key, $val := .Values.ingress.annotations }}
{{ $key }}: "{{ $val }}"
{{- end }}
spec:
host: {{ include "default-tenant-host" . | quote }}
port:
Expand All @@ -23,7 +36,20 @@ kind: Route
metadata:
name: pssg-enroll
labels:
router: default
app: {{ template "portal.name" . }}
chart: {{ template "portal.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- range $key, $val := .Values.global.additionalLabels }}
{{ $key }}: "{{ $val }}"
{{- end }}
{{- range $key, $val := .Values.ingress.additionalLabels }}
{{ $key }}: "{{ $val }}"
{{- end }}
annotations:
{{- range $key, $val := .Values.ingress.annotations }}
{{ $key }}: "{{ $val }}"
{{- end }}
spec:
host: {{ include "pssg-enroll-host" . | quote }}
port:
Expand All @@ -41,7 +67,20 @@ kind: Route
metadata:
name: pssg-sync
labels:
router: default
app: {{ template "portal.name" . }}
chart: {{ template "portal.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- range $key, $val := .Values.global.additionalLabels }}
{{ $key }}: "{{ $val }}"
{{- end }}
{{- range $key, $val := .Values.ingress.additionalLabels }}
{{ $key }}: "{{ $val }}"
{{- end }}
annotations:
{{- range $key, $val := .Values.ingress.annotations }}
{{ $key }}: "{{ $val }}"
{{- end }}
spec:
host: {{ include "pssg-sync-host" . | quote }}
port:
Expand All @@ -59,7 +98,20 @@ kind: Route
metadata:
name: apim-route-broker
labels:
router: default
app: {{ template "portal.name" . }}
chart: {{ template "portal.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- range $key, $val := .Values.global.additionalLabels }}
{{ $key }}: "{{ $val }}"
{{- end }}
{{- range $key, $val := .Values.ingress.additionalLabels }}
{{ $key }}: "{{ $val }}"
{{- end }}
annotations:
{{- range $key, $val := .Values.ingress.annotations }}
{{ $key }}: "{{ $val }}"
{{- end }}
spec:
host: {{ include "broker-host" . | quote }}
port:
Expand All @@ -77,7 +129,20 @@ kind: Route
metadata:
name: apim-route-sso
labels:
router: default
app: {{ template "portal.name" . }}
chart: {{ template "portal.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- range $key, $val := .Values.global.additionalLabels }}
{{ $key }}: "{{ $val }}"
{{- end }}
{{- range $key, $val := .Values.ingress.additionalLabels }}
{{ $key }}: "{{ $val }}"
{{- end }}
annotations:
{{- range $key, $val := .Values.ingress.annotations }}
{{ $key }}: "{{ $val }}"
{{- end }}
spec:
host: {{ include "pssg-sso-host" . | quote }}
port:
Expand All @@ -95,7 +160,20 @@ kind: Route
metadata:
name: apim-route-tssg
labels:
router: default
app: {{ template "portal.name" . }}
chart: {{ template "portal.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- range $key, $val := .Values.global.additionalLabels }}
{{ $key }}: "{{ $val }}"
{{- end }}
{{- range $key, $val := .Values.ingress.additionalLabels }}
{{ $key }}: "{{ $val }}"
{{- end }}
annotations:
{{- range $key, $val := .Values.ingress.annotations }}
{{ $key }}: "{{ $val }}"
{{- end }}
spec:
host: {{ include "tssg-public-host" . | quote }}
port:
Expand All @@ -113,7 +191,20 @@ kind: Route
metadata:
name: datalake-analytics
labels:
router: default
app: {{ template "portal.name" . }}
chart: {{ template "portal.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- range $key, $val := .Values.global.additionalLabels }}
{{ $key }}: "{{ $val }}"
{{- end }}
{{- range $key, $val := .Values.ingress.additionalLabels }}
{{ $key }}: "{{ $val }}"
{{- end }}
annotations:
{{- range $key, $val := .Values.ingress.annotations }}
{{ $key }}: "{{ $val }}"
{{- end }}
spec:
host: {{ include "analytics-host" . | quote }}
port:
Expand All @@ -125,4 +216,70 @@ spec:
name: apim
weight: 100
wildcardPolicy: None
{{- range .Values.ingress.customRoutes }}
---
apiVersion: route.openshift.io/v1
kind: Route
metadata:
name: {{ .subdomain }}-route
labels:
app: {{ template "portal.name" $ }}
chart: {{ template "portal.chart" $ }}
release: {{ $.Release.Name }}
heritage: {{ $.Release.Service }}
{{- range $key, $val := $.Values.global.additionalLabels }}
{{ $key }}: "{{ $val }}"
{{- end }}
{{- range $key, $val := $.Values.ingress.additionalLabels }}
{{ $key }}: "{{ $val }}"
{{- end }}
annotations:
{{- range $key, $val := $.Values.ingress.annotations }}
{{ $key }}: "{{ $val }}"
{{- end }}
spec:
host: "{{ .subdomain }}.{{ $.Values.portal.domain }}"
port:
targetPort: {{ .service.port }}
tls:
termination: passthrough
to:
kind: Service
name: {{ .service.name }}
weight: 100
wildcardPolicy: None
{{- end }}
{{- range .Values.ingress.tenantIds }}
---
apiVersion: route.openshift.io/v1
kind: Route
metadata:
name: {{ . }}-route
labels:
app: {{ template "portal.name" $ }}
chart: {{ template "portal.chart" $ }}
release: {{ $.Release.Name }}
heritage: {{ $.Release.Service }}
{{- range $key, $val := $.Values.global.additionalLabels }}
{{ $key }}: "{{ $val }}"
{{- end }}
{{- range $key, $val := $.Values.ingress.additionalLabels }}
{{ $key }}: "{{ $val }}"
{{- end }}
annotations:
{{- range $key, $val := $.Values.ingress.annotations }}
{{ $key }}: "{{ $val }}"
{{- end }}
spec:
host: "{{ . }}.{{ $.Values.portal.domain }}"
port:
targetPort: portal-https
tls:
termination: passthrough
to:
kind: Service
name: dispatcher
weight: 100
wildcardPolicy: None
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion examples/portal/openshift/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ $ helm install <release-name> --set-file "portal.registryCredentials=/path/to

7. [Create a new tenant](https://github.com/CAAPIM/apim-charts/tree/stable/utils)

8. Add new tenant route in Openshift.
8. Add new tenant route in Openshift. This step is required only if tenant is created by not specifying in values.ingress.tenantIds.

```
$ oc process -f new-tenant-route-template.yaml -p TENANT_NAME=<YOUR-TENANT-NAME> -p PORTAL_DOMAIN=<PORTAL-DOMAIN> | oc apply -f -
Expand Down