Comments (3)
If we come up with a basic structure then it will be easy to convert the config json to a template. I'm looking currently at this folder
https://github.com/frain-dev/convoy/tree/main/config/testdata/Config
to be able to assemble the config as per config map mapping from deployment file here
volumeMounts:
- name: convoy-config
mountPath: /config
command: ["/cmd"]
args: ["server", "--config", "/config/convoy.json", "-w", "false"]
in values.yaml it would be easy to create config section and then keep yaml version of this config directly in values, then have some basic setup and let people know that this yaml is then converted in helmchart to actual json file which is relatively easy to do. that would be an awesome addition to helm chart and would make it work out of the box.
in ConfigMap (convoy-config) template you can use function (have not tested)
{{ $.Values.config | fromYaml | toJson }}
and then your sample configuration could in values.yaml
file could look like
config:
database:
dsn: postgres://inside-config-file
queue:
type: redis
redis:
dsn: redis://localhost:8379
server:
http:
port: 8080
group:
strategy:
type: default
default:
intervalSeconds: 125
retryLimit: 15
signature:
hash: SHA256
header: x-test-signature
disable_endpoint: true
replay_attacks: true
auth:
require_auth: true
native:
enabled: true
file:
basic:
- username: admin
password: qwerty
role:
type: super_user
group: ''
from helm-charts.
Hey @styk-tv
We still run v0.8 on our cloud so we have not gotten around to merging it to main yet.
I like the suggestion you made, I've never done it like that though. I'll take a look at this.
from helm-charts.
Hey @styk-tv
I was able to get this to work using this setup
configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: convoy-config
labels:
app.kubernetes.io/name: {{ include "convoy.name" . }}
helm.sh/chart: {{ include "convoy.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
data:
convoy.json: {{ toJson .Values.config | quote }}
values.yaml
config:
{
"host": "http://localhost:5005",
"database":
{
"type": "postgres",
"dsn": "postgres://postgres:postgres@localhost/convoy",
},
"cache": { "type": "redis", "redis": { "dsn": "redis://localhost:6379" } },
"queue": { "type": "redis", "redis": { "dsn": "redis://localhost:6379" } },
"smtp":
{
"provider": "sendgrid",
"url": "smtp.sendgrid.net",
"port": 2525,
"username": "username",
"password": "password",
"from": "[email protected]",
},
"server": { "http": { "port": 5005, "worker_port": 5006 } },
"disable_endpoint": false,
"auth": { "native": { "enabled": true }, "jwt": { "enabled": true } },
}
Still testing it out, I'll let you know when I have pushed the changes
from helm-charts.
Related Issues (8)
- [BUG] Redeploying the helm charts re-enables sign up HOT 1
- Error from server (NotFound): jobs.batch "convoy-migrate" not found HOT 4
- Installation Failure HOT 2
- All Deployments Fail to Start Up Due to Perceived Migration Pending
- Remove Superfluous values in Child Charts
- Refactor convoy/values.yaml to Consume postgresql In Lieu of config.database.dsn
- Stream, Worker, and Server Child Charts Have Identical Cmd Args That Deviate From docker-compose.yml
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from helm-charts.