Skip to content
Draft
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
1 change: 1 addition & 0 deletions charts/aconext/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test-values.yaml
23 changes: 23 additions & 0 deletions charts/aconext/.helmignore
Original file line number Diff line number Diff line change
@@ -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/
12 changes: 12 additions & 0 deletions charts/aconext/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
dependencies:
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 18.1.13
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 24.0.0
- name: rabbitmq
repository: https://charts.bitnami.com/bitnami
version: 16.0.14
digest: sha256:a6dacb3ae4b421677920042468a45a83db2632a5dc4e2ff8fce26738c28ace94
generated: "2025-12-02T21:17:35.634297+02:00"
22 changes: 22 additions & 0 deletions charts/aconext/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: v2
name: aconext
description: A Helm chart for Acontext deployment on Kubernetes

type: application

version: 0.0.1
appVersion: "0.0.1"

dependencies:
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 18.1.13
condition: postgresql.enabled
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 24.0.0
condition: redis.enabled
- name: rabbitmq
repository: https://charts.bitnami.com/bitnami
version: 16.0.14
condition: rabbitmq.enabled
Binary file added charts/aconext/charts/postgresql-18.1.13.tgz
Binary file not shown.
Binary file added charts/aconext/charts/rabbitmq-16.0.14.tgz
Binary file not shown.
Binary file added charts/aconext/charts/redis-24.0.0.tgz
Binary file not shown.
62 changes: 62 additions & 0 deletions charts/aconext/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
1. Get the application URL by running these commands:
{{- if contains "NodePort" .Values.api.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "aconext.api.name" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo "API URL: http://$NODE_IP:$NODE_PORT"
{{- else if contains "LoadBalancer" .Values.api.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch its status by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "aconext.api.name" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "aconext.api.name" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo "API URL: http://$SERVICE_IP:{{ .Values.api.service.port }}"
{{- else if contains "ClusterIP" .Values.api.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "aconext.name" . }}-api,app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
{{- end }}

2. Check service status:
kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/instance={{ .Release.Name }}"
kubectl get svc --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/instance={{ .Release.Name }}"

3. View logs:
kubectl logs --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "aconext.name" . }}-api" --tail=100
kubectl logs --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "aconext.name" . }}-core" --tail=100

4. Service endpoints:
{{- if .Values.core.enabled }}
Core Service: {{ include "aconext.core.name" . }}:{{ .Values.core.service.port }}
{{- end }}
{{- if .Values.api.enabled }}
API Service: {{ include "aconext.api.name" . }}:{{ .Values.api.service.port }}
{{- end }}

5. Dependencies status:
{{- if .Values.postgresql.enabled }}
PostgreSQL: Enabled (internal)
{{- else }}
PostgreSQL: External ({{ .Values.external.postgresql.host }}:{{ .Values.external.postgresql.port }})
{{- end }}
{{- if .Values.redis.enabled }}
Redis: Enabled (internal)
{{- else }}
Redis: External ({{ .Values.external.redis.host }}:{{ .Values.external.redis.port }})
{{- end }}
{{- if .Values.rabbitmq.enabled }}
RabbitMQ: Enabled (internal)
{{- else }}
RabbitMQ: External ({{ .Values.external.rabbitmq.host }}:{{ .Values.external.rabbitmq.port }})
{{- end }}

{{- if and .Values.httpRoute.enabled .Values.httpRoute.gateway.name }}
{{- if .Values.httpRoute.hostnames }}
6. API Health Check:
{{- range .Values.httpRoute.hostnames }}
Health Check: http://{{ . }}/health
{{- end }}
{{- else }}
6. API Health Check:
Health Check: http://<GATEWAY_IP>/health
(Note: Configure httpRoute.hostnames to get the full URL)
{{- end }}
{{- end }}
207 changes: 207 additions & 0 deletions charts/aconext/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "aconext.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "aconext.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "aconext.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "aconext.labels" -}}
helm.sh/chart: {{ include "aconext.chart" . }}
{{ include "aconext.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "aconext.selectorLabels" -}}
app.kubernetes.io/name: {{ include "aconext.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the core service account to use
*/}}
{{- define "aconext.core.serviceAccountName" -}}
{{- if .Values.core.serviceAccount.create }}
{{- default (include "aconext.core.name" .) .Values.core.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.core.serviceAccount.name }}
{{- end }}
{{- end }}

{{/*
Create the name of the api service account to use
*/}}
{{- define "aconext.api.serviceAccountName" -}}
{{- if .Values.api.serviceAccount.create }}
{{- default (include "aconext.api.name" .) .Values.api.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.api.serviceAccount.name }}
{{- end }}
{{- end }}

{{/*
Core service name
*/}}
{{- define "aconext.core.name" -}}
{{- printf "%s-core" (include "aconext.fullname" .) | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
API service name
*/}}
{{- define "aconext.api.name" -}}
{{- printf "%s-api" (include "aconext.fullname" .) | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Core selector labels
*/}}
{{- define "aconext.core.selectorLabels" -}}
app.kubernetes.io/name: {{ include "aconext.name" . }}-core
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
API selector labels
*/}}
{{- define "aconext.api.selectorLabels" -}}
app.kubernetes.io/name: {{ include "aconext.name" . }}-api
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Get PostgreSQL host
*/}}
{{- define "aconext.postgresql.host" -}}
{{- if .Values.postgresql.enabled }}
{{- printf "%s-postgresql" .Release.Name }}
{{- else }}
{{- .Values.external.postgresql.host }}
{{- end }}
{{- end }}

{{/*
Get PostgreSQL port
*/}}
{{- define "aconext.postgresql.port" -}}
{{- if .Values.postgresql.enabled }}
{{- "5432" }}
{{- else }}
{{- .Values.external.postgresql.port | default "5432" | quote }}
{{- end }}
{{- end }}

{{/*
Get Redis host
*/}}
{{- define "aconext.redis.host" -}}
{{- if .Values.redis.enabled }}
{{- printf "%s-redis-master" .Release.Name }}
{{- else }}
{{- .Values.external.redis.host }}
{{- end }}
{{- end }}

{{/*
Get Redis port
*/}}
{{- define "aconext.redis.port" -}}
{{- if .Values.redis.enabled }}
{{- "6379" }}
{{- else }}
{{- .Values.external.redis.port | default "6379" | quote }}
{{- end }}
{{- end }}

{{/*
Get RabbitMQ host
*/}}
{{- define "aconext.rabbitmq.host" -}}
{{- if .Values.rabbitmq.enabled }}
{{- printf "%s-rabbitmq" .Release.Name }}
{{- else }}
{{- .Values.external.rabbitmq.host }}
{{- end }}
{{- end }}

{{/*
Get RabbitMQ port
*/}}
{{- define "aconext.rabbitmq.port" -}}
{{- if .Values.rabbitmq.enabled }}
{{- "5672" }}
{{- else }}
{{- .Values.external.rabbitmq.port | default "5672" | quote }}
{{- end }}
{{- end }}

{{/*
Get PostgreSQL database URL
*/}}
{{- define "aconext.postgresql.url" -}}
{{- $host := include "aconext.postgresql.host" . }}
{{- $port := include "aconext.postgresql.port" . }}
{{- $user := .Values.postgresql.auth.username | default .Values.external.postgresql.username }}
{{- $password := .Values.postgresql.auth.password | default .Values.external.postgresql.password }}
{{- $database := .Values.postgresql.auth.database | default .Values.external.postgresql.database }}
{{- printf "postgresql://%s:%s@%s:%s/%s" $user $password $host $port $database }}
{{- end }}

{{/*
Get Redis URL
*/}}
{{- define "aconext.redis.url" -}}
{{- $host := include "aconext.redis.host" . }}
{{- $port := include "aconext.redis.port" . }}
{{- $password := .Values.redis.auth.password | default .Values.external.redis.password }}
{{- if $password }}
{{- printf "redis://:%s@%s:%s" $password $host $port }}
{{- else }}
{{- printf "redis://%s:%s" $host $port }}
{{- end }}
{{- end }}

{{/*
Get RabbitMQ URL
*/}}
{{- define "aconext.rabbitmq.url" -}}
{{- $host := include "aconext.rabbitmq.host" . }}
{{- $port := include "aconext.rabbitmq.port" . }}
{{- $user := .Values.rabbitmq.auth.username | default .Values.external.rabbitmq.username }}
{{- $password := .Values.rabbitmq.auth.password | default .Values.external.rabbitmq.password }}
{{- $vhost := .Values.rabbitmq.auth.vhost | default .Values.external.rabbitmq.vhost | default "/" }}
{{- printf "amqp://%s:%s@%s:%s/%s" $user $password $host $port $vhost }}
{{- end }}
Loading