-
Notifications
You must be signed in to change notification settings - Fork 2
set up a cluster for local deployement of the server for testing #104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
59ab67c
reserting the deployement configurations
Ogenbertrand af1171c
update to latest comments
Ogenbertrand ac59fa8
address current comments
Ogenbertrand 87d7905
fix comments from @forkimenjeckayang
Ogenbertrand 95162f2
delete feedback file
Ogenbertrand File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| dependencies: | ||
| - name: postgresql | ||
| repository: https://charts.bitnami.com/bitnami | ||
| version: 16.7.6 | ||
| - name: redis | ||
| repository: https://charts.bitnami.com/bitnami | ||
| version: 21.2.13 | ||
| digest: sha256:807062888205fe9e5a86ea27761e6fa4704bd394b02fffd09250240ab1396f26 | ||
| generated: "2025-10-06T10:06:27.901755709+01:00" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| apiVersion: v2 | ||
| name: status-list-server-local | ||
| description: Local testing Helm chart for Status List Server | ||
| type: application | ||
| version: 0.1.0 | ||
| appVersion: "1.0.0" | ||
|
|
||
| dependencies: | ||
| - name: postgresql | ||
| version: "16.7.6" | ||
| repository: "https://charts.bitnami.com/bitnami" | ||
| - name: redis | ||
| version: "21.2.13" | ||
| repository: "https://charts.bitnami.com/bitnami" |
51 changes: 51 additions & 0 deletions
51
helm/status-list-server-chart-local/templates/_helpers.tpl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| {{/* | ||
| Expand the name of the chart. | ||
| */}} | ||
| {{- define "status-list-server-local.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 "status-list-server-local.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 "status-list-server-local.chart" -}} | ||
| {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Common labels | ||
| */}} | ||
| {{- define "status-list-server-local.labels" -}} | ||
| helm.sh/chart: {{ include "status-list-server-local.chart" . }} | ||
| {{ include "status-list-server-local.selectorLabels" . }} | ||
| {{- if .Chart.AppVersion }} | ||
| app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
| {{- end }} | ||
| app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Selector labels | ||
| */}} | ||
| {{- define "status-list-server-local.selectorLabels" -}} | ||
| app.kubernetes.io/name: {{ include "status-list-server-local.name" . }} | ||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||
| {{- end }} |
70 changes: 70 additions & 0 deletions
70
helm/status-list-server-chart-local/templates/deployment.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: {{ include "status-list-server-local.fullname" . }} | ||
| labels: | ||
| {{- include "status-list-server-local.labels" . | nindent 4 }} | ||
| spec: | ||
| replicas: {{ .Values.statuslist.replicaCount }} | ||
| selector: | ||
| matchLabels: | ||
| {{- include "status-list-server-local.selectorLabels" . | nindent 6 }} | ||
| template: | ||
| metadata: | ||
| labels: | ||
| {{- include "status-list-server-local.selectorLabels" . | nindent 8 }} | ||
| spec: | ||
| initContainers: | ||
| - name: wait-for-postgres | ||
| image: busybox | ||
| command: | ||
| - "sh" | ||
| - "-c" | ||
| - | | ||
| echo "Waiting for PostgreSQL..." | ||
| until nc -z {{ .Release.Name }}-postgresql.{{ .Release.Namespace }}.svc.cluster.local 5432; do | ||
| echo "PostgreSQL not ready. Retrying in 2s..."; | ||
| sleep 2; | ||
| done | ||
| echo "PostgreSQL is up." | ||
|
|
||
| - name: wait-for-redis | ||
| image: busybox | ||
| command: | ||
| - "sh" | ||
| - "-c" | ||
| - | | ||
| echo "Waiting for Redis..." | ||
| until nc -z {{ .Release.Name }}-redis-master.{{ .Release.Namespace }}.svc.cluster.local 6379; do | ||
| echo "Redis not ready. Retrying in 2s..."; | ||
| sleep 2; | ||
| done | ||
| echo "Redis is up." | ||
|
|
||
| containers: | ||
| - name: status-list-server | ||
| image: "{{ .Values.statuslist.image.repository }}:{{ .Values.statuslist.image.tag }}" | ||
| imagePullPolicy: {{ .Values.statuslist.image.pullPolicy }} | ||
| ports: | ||
| - name: http | ||
| containerPort: {{ .Values.statuslist.service.targetPort }} | ||
| protocol: TCP | ||
| env: | ||
| {{- range $key, $value := .Values.statuslist.env }} | ||
| - name: {{ $key }} | ||
| value: {{ $value | quote }} | ||
| {{- end }} | ||
| resources: | ||
| {{- toYaml .Values.statuslist.resources | nindent 10 }} | ||
| livenessProbe: | ||
| httpGet: | ||
| path: /health | ||
| port: http | ||
| initialDelaySeconds: 30 | ||
| periodSeconds: 10 | ||
| readinessProbe: | ||
| httpGet: | ||
| path: /health | ||
| port: http | ||
| initialDelaySeconds: 5 | ||
| periodSeconds: 5 |
15 changes: 15 additions & 0 deletions
15
helm/status-list-server-chart-local/templates/service.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: {{ include "status-list-server-local.fullname" . }} | ||
| labels: | ||
| {{- include "status-list-server-local.labels" . | nindent 4 }} | ||
| spec: | ||
| type: {{ .Values.statuslist.service.type }} | ||
| ports: | ||
| - port: {{ .Values.statuslist.service.port }} | ||
| targetPort: {{ .Values.statuslist.service.targetPort }} | ||
| protocol: TCP | ||
| name: http | ||
| selector: | ||
| {{- include "status-list-server-local.selectorLabels" . | nindent 4 }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| global: | ||
| storageClass: "standard" | ||
| security: | ||
| allowInsecureImages: true | ||
|
|
||
| statuslist: | ||
Ogenbertrand marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| replicaCount: 1 | ||
| image: | ||
| repository: ghcr.io/adorsys/status-list-server | ||
| pullPolicy: IfNotPresent | ||
| tag: "latest" | ||
| service: | ||
| type: ClusterIP | ||
| port: 8081 | ||
| targetPort: 8000 | ||
| ingress: | ||
| enabled: false # Disable ingress for local testing | ||
| env: | ||
| RUST_LOG: "info" | ||
| POSTGRES_USER: "postgres" | ||
| POSTGRES_PASSWORD: "postgres" | ||
| APP_ENV: "development" | ||
| APP_SERVER__HOST: "0.0.0.0" | ||
| APP_SERVER__PORT: "8000" | ||
| APP_SERVER__DOMAIN: "localhost" | ||
| APP_SERVER__CERT__EMAIL: "[email protected]" | ||
| APP_SERVER__CERT__ORGANIZATION: "Test Organization" | ||
| APP_SERVER__CERT__ACME_DIRECTORY_URL: "https://pebble:14000/dir" | ||
| APP_SERVER__CERT__EKU: "1,3,6,1,5,5,7,3,30" | ||
| APP_REDIS__REQUIRE_CLIENT_AUTH: "false" | ||
| APP_CACHE__TTL: "300" | ||
| APP_CACHE__MAX_CAPACITY: "100" | ||
| APP_DATABASE__URL: "postgres://postgres:postgres@status-list-test-postgresql.statuslist.svc.cluster.local:5432/status-list" | ||
| APP_REDIS__URI: "redis://status-list-test-redis-master.statuslist.svc.cluster.local:6379" | ||
| resources: | ||
| requests: | ||
| memory: "256Mi" | ||
| cpu: "250m" | ||
| limits: | ||
| memory: "512Mi" | ||
| cpu: "500m" | ||
|
|
||
| postgresql: | ||
| enabled: true | ||
| image: | ||
| registry: docker.io | ||
| repository: bitnamilegacy/postgresql | ||
| tag: 17.4.0-debian-12-r2 | ||
| auth: | ||
| username: "postgres" | ||
| database: "status-list" | ||
| password: "postgres" | ||
| primary: | ||
| persistence: | ||
| enabled: true | ||
| size: 5Gi | ||
| service: | ||
| type: ClusterIP | ||
|
|
||
| redis: | ||
| enabled: true | ||
| image: | ||
| registry: docker.io | ||
| repository: bitnamilegacy/redis | ||
| tag: 7.4.1-debian-12-r0 | ||
| auth: | ||
| enabled: true | ||
| # Disable TLS for local testing | ||
| tls: | ||
| enabled: false | ||
| master: | ||
| persistence: | ||
| enabled: true | ||
| size: 2Gi | ||
| replica: | ||
| replicaCount: 0 | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.