Skip to content

Commit

Permalink
fix for DE620051
Browse files Browse the repository at this point in the history
  • Loading branch information
Gazza7205 committed Nov 11, 2024
1 parent 19ac936 commit cdd2cb0
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 2 deletions.
3 changes: 1 addition & 2 deletions charts/portal/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ apiVersion: v2
appVersion: "5.3.1"
description: CA API Developer Portal
name: portal
version: 2.3.10
version: 2.3.11
type: application
home: https://github.com/CAAPIM/apim-charts
maintainers:
- name: Gazza7205
sources:
- https://github.com/CAAPIM/apim-charts
engine: gotpl
dependencies:
- name: druid
version: ^1.0.0
Expand Down
17 changes: 17 additions & 0 deletions charts/portal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@ The Layer7 API Developer Portal (API Portal) is part of the Layer7 API Managemen

## Introduction
This Chart deploys the Layer7 API Developer Portal on a Kubernetes Cluster using the Helm Package Manager.

## Release Notes

## 2.3.11 General Updates
- Added a preflight check (initContainer) for the core apim/ingress deployment
- This resolves a race condition that occurs on slower hardware where apim/ingress starts before other dependent services are ready.
- This is ***enabled by default***. A Helm upgrade will restart the apim deployment.
- If you wish to disable this, set apim.preflightCheck.enabled to false
```
apim:
...
preflightCheck:
enabled: true
...
```
## 2.3.10 General Updates
- This new version of the chart supports API Portal 5.3.1
- Removed PSSG container
Expand Down Expand Up @@ -302,6 +318,7 @@ This section describes configurable parameters in **values.yaml**, there is also
| `analytics.affinity` | Affinity for pod assignment | `{} evaluated as a template` |
| `analytics.additionalLabels` | A list of custom key: value labels | `not set` |
| `apim.forceRedeploy` | Force redeployment during helm upgrade whether there is a change or not | `false` |
| `apim.preflightCheck.enabled` | Resolves a race condition that occurs on slower hardware where apim/ingress starts before other dependent services are ready |`true` |
| `apim.replicaCount` | Number of APIM nodes | `1` |
| `apim.image.pullPolicy` | APIM image pull policy | `IfNotPresent` |
| `apim.otkDb.name` | APIM OTK Database name | `otk_db` |
Expand Down
Binary file modified charts/portal/charts/druid-1.0.14.tgz
Binary file not shown.
11 changes: 11 additions & 0 deletions charts/portal/templates/apim/apim-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,17 @@ spec:
- name: liquidbase-upgrade-rbac
image: "{{ .Values.global.portalRepository }}{{ .Values.image.upgradeVerify }}"
args: ["job", 'rbac-upgrade']
{{- if .Values.apim.preflightCheck.enabled }}
- name: apim-core-preflight-check
image: "{{ .Values.global.portalRepository }}{{ .Values.image.upgradeVerify }}"
command: ["/bin/sh","-c"]
args:
- sleep 120;
if [[ "$(curl -w '%{http_code}' -s -o /dev/null rabbitmq:15672)" != "200" ]]; then echo "broker not ready" && exit 1;fi;
if [[ "$(curl -w '%{http_code}' -s -o /dev/null portal-data:8080/portal-data/portalHealth)" != "200" ]]; then echo "portal-data not ready" && exit 1;fi;
if [[ "$(curl -w '%{http_code}' -s -o /dev/null http://authenticator:9081/v1/echo;)" != "200" ]]; then echo "authenticator not ready" && exit 1;fi;
if [[ "$(curl -w '%{http_code}' -s -o /dev/null http://tenant-provisioner:9001/actuator/health)" != "200" ]]; then echo "tenant provisioning service not ready" && exit 1;fi;
{{- end }}
containers:
- name: apim
image: "{{ .Values.global.portalRepository }}{{ .Values.image.apim }}"
Expand Down
2 changes: 2 additions & 0 deletions charts/portal/values-production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ analytics:

apim:
forceRedeploy: false
preflightCheck:
enabled: true
replicaCount: 2
image:
pullPolicy: IfNotPresent
Expand Down
2 changes: 2 additions & 0 deletions charts/portal/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ analytics:

apim:
forceRedeploy: false
preflightCheck:
enabled: true
replicaCount: 1
image:
pullPolicy: IfNotPresent
Expand Down

0 comments on commit cdd2cb0

Please sign in to comment.