Skip to content

Commit

Permalink
changed apim initContainer to install only
Browse files Browse the repository at this point in the history
  • Loading branch information
Gazza7205 committed Nov 21, 2024
1 parent ff15465 commit cffd884
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
18 changes: 4 additions & 14 deletions charts/portal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ This Chart deploys the Layer7 API Developer Portal on a Kubernetes Cluster using
## 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.
- This is ***enabled by default***.
- This only gets added when you install the Chart.
- A Helm upgrade will ***NOT*** restart the apim deployment if you have already installed the Chart and are upgrading to this version.
- A Helm upgrade will restart the apim deployment if you installed from this version and upgrade the Chart.
- If you wish to disable this, set apim.preflightCheck.enabled to false
```
apim:
Expand Down Expand Up @@ -996,18 +999,6 @@ If the RabbitMQ cluster is stopped or removed out of order, there is a chance th
$ helm upgrade <release-name> --set-file <values-from-install> --set <values-from-install> -f <my-values.yaml> layer7/portal
```
### The APIM Container fails to start because RabbitMQ is unavailable
In Portal Chart version 2.3.11 an initContainer was added to the apim deployment to resolve a race condition with slower hardware. If RabbitMQ does not start correctly for one of the reasons above and you wish to use the Portal API without it, then the initContainer can be disabled which should allow apim to start.
- set apim.preflightCheck.enabled to false
```
apim:
...
preflightCheck:
enabled: false
...
```
### Helm UPGRADE FAILED: cannot patch "db-upgrade" and "rbac-upgrade"
If helm upgrade of the portal fails with error "Error: UPGRADE FAILED: cannot patch 'db-upgrade'", it is becasue of the limitation in kubernetes where a job can not be updated.
Expand All @@ -1022,7 +1013,6 @@ kubectl delete job db-upgrade -n <nameSpace>
kubectl delete job rbac-upgrade -n <nameSpace>
```
### MySQL container in unhealthy state
#### The chart was uninstalled and re-installed
Expand Down
2 changes: 1 addition & 1 deletion charts/portal/templates/apim/apim-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ spec:
- name: liquidbase-upgrade-rbac
image: "{{ .Values.global.portalRepository }}{{ .Values.image.upgradeVerify }}"
args: ["job", 'rbac-upgrade']
{{- if .Values.apim.preflightCheck.enabled }}
{{- if and (.Values.apim.preflightCheck.enabled) (.Release.IsInstall) }}
- name: apim-core-preflight-check
image: "{{ .Values.global.portalRepository }}{{ .Values.image.upgradeVerify }}"
command: ["/bin/sh","-c"]
Expand Down

0 comments on commit cffd884

Please sign in to comment.