Skip to content

Commit

Permalink
[inventory] db_ready checks are performed using custom utilities image (
Browse files Browse the repository at this point in the history
  • Loading branch information
smartin-elisapolystar authored Aug 15, 2024
1 parent d6d443f commit 96cbd9d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
11 changes: 3 additions & 8 deletions charts/inventory/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: inventory
version: 6.0.0
version: 6.0.1
appVersion: "6.1.0"
description: A Helm chart for Kubernetes deployment of the Device Inventory
type: application
Expand All @@ -16,12 +16,7 @@ icon: https://avatars.githubusercontent.com/u/23452093?s=200&v=4
annotations:
artifacthub.io/changes: |
- kind: changed
description: Bump application version to 6.1.0
description: Inventory db_ready checks are performed using custom utilities image
links:
- name: GitHub PR
url: https://github.com/FRINXio/helm-charts/pull/389
- kind: added
description: Added performance monitoring configuration
links:
- name: GitHub PR
url: https://github.com/FRINXio/helm-charts/pull/389
url: https://github.com/FRINXio/helm-charts/pull/406
5 changes: 4 additions & 1 deletion charts/inventory/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A Helm chart for Kubernetes deployment of the Device Inventory

![Version: 6.0.0](https://img.shields.io/badge/Version-6.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 6.1.0](https://img.shields.io/badge/AppVersion-6.1.0-informational?style=flat-square)
![Version: 6.0.1](https://img.shields.io/badge/Version-6.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 6.1.0](https://img.shields.io/badge/AppVersion-6.1.0-informational?style=flat-square)

## Get Repo Info

Expand Down Expand Up @@ -41,6 +41,9 @@ helm uninstall [RELEASE_NAME]
|-----|------|---------|-------------|
| affinity | object | `{}` | [Affinity for pod assignment](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity) |
| autoscaling | object | `{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}` | [Autoscaling parameters](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) |
| utilitiesImage.repository | string | `"frinx/utilities-alpine"` | Image name |
| utilitiesImage.tag | string | `1.2` | Image tag |
| utilitiesImage.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
| dbPersistence.POSTGRES_DATABASE | string | `"inventory"` | Database name |
| dbPersistence.POSTGRES_DB_SCHEMA | string | `"public"` | Database schema |
| dbPersistence.POSTGRES_HOST | string | `nil` | Database hostname |
Expand Down
3 changes: 2 additions & 1 deletion charts/inventory/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ spec:
- name: check-db-ready
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: postgres:alpine
image: "{{ .Values.utilitiesImage.repository }}:{{ .Values.utilitiesImage.tag }}"
imagePullPolicy: "{{ .Values.utilitiesImage.pullPolicy }}"
env:
- name: "POSTGRES_HOST"
{{ if .Values.postgresql.enabled }}
Expand Down
3 changes: 2 additions & 1 deletion charts/inventory/templates/tests/test-connection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ metadata:
spec:
containers:
- name: wget
image: busybox
image: "{{ .Values.utilitiesImage.repository }}:{{ .Values.utilitiesImage.tag }}"
command: ["/bin/sh"]
args: ["-c", 'wget {{ include "inventory.fullname" . }}:{{ .Values.service.port }}/.well-known/apollo/server-health -P /tmp/']
imagePullPolicy: IfNotPresent
restartPolicy: Never
8 changes: 8 additions & 0 deletions charts/inventory/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@ deployment:
# -- Deployment annotations
annotations: {}

utilitiesImage:
# -- utilities image repository
repository: frinx/utilities-alpine
# -- Overrides the image tag.
tag: "1.2"
# -- Image pull policy
pullPolicy: IfNotPresent

dbPersistence:
# -- Database hostname
POSTGRES_HOST:
Expand Down

0 comments on commit 96cbd9d

Please sign in to comment.