Comments (2)
The codebase is a web application that uses Soketi, a simple, fast and resilient open-source WebSockets server written in Typescript. It's built on top of uWebSockets.js, one of the most efficient WebSocket libraries. The application is deployed using Helm, a package manager for Kubernetes. The .env file is used to store environment variables that are used across the application. The user wants to know how to set the values for SOKETI_DEFAULT_APP_ID, SOKETI_DEFAULT_APP_KEY, and SOKETI_DEFAULT_APP_SECRET when installing with Helm.
Assistant's Solution
When installing with Helm, you can pass environment variables through the values.yaml file or directly through the command line.
Here's how you can do it:
- Using values.yaml file:
In your Helm chart, you should have a values.yaml file. You can specify your environment variables there. For example:
env:
SOKETI_DEFAULT_APP_ID: your_app_id
SOKETI_DEFAULT_APP_KEY: your_app_key
SOKETI_DEFAULT_APP_SECRET: your_app_secret
Then, in your deployment.yaml file (which should be in the templates folder of your Helm chart), you can use these values:
spec:
containers:
- name: your_container_name
image: your_image_name
env:
- name: SOKETI_DEFAULT_APP_ID
value: {{ .Values.env.SOKETI_DEFAULT_APP_ID }}
- name: SOKETI_DEFAULT_APP_KEY
value: {{ .Values.env.SOKETI_DEFAULT_APP_KEY }}
- name: SOKETI_DEFAULT_APP_SECRET
value: {{ .Values.env.SOKETI_DEFAULT_APP_SECRET }}
- Directly through the command line:
You can also pass the environment variables directly through the command line when installing the Helm chart:
helm install your_chart_name . --set env.SOKETI_DEFAULT_APP_ID=your_app_id,env.SOKETI_DEFAULT_APP_KEY=your_app_key,env.SOKETI_DEFAULT_APP_SECRET=your_app_secret
Remember to replace your_app_id
, your_app_key
, and your_app_secret
with your actual values.
Current plan usage: 10.92%
Have feedback or need help?
from charts.
The helm cli example did not work for me as the deployment does not contain any setting for the env variabled.
Did this instead; I added it from a secret which I already created for my laravel app in k8s:
values.yaml
app:
extraEnv:
- name: SOKETI_DEFAULT_APP_ID
valueFrom:
secretKeyRef:
name: app-env-secrets
key: PUSHER_APP_ID
- name: SOKETI_DEFAULT_APP_KEY
valueFrom:
secretKeyRef:
name: app-env-secrets
key: PUSHER_APP_KEY
- name: SOKETI_DEFAULT_APP_SECRET
valueFrom:
secretKeyRef:
name: app-env-secrets
key: PUSHER_APP_SECRET
from charts.
Related Issues (13)
- Update pWS chart version to 3.0 HOT 13
- Google Cloud deployment - crashing on bad port HOT 5
- Horizontal scaling support HOT 3
- Usage HOT 5
- ERR_SOCKET_BAD_PORT on new cluster HOT 1
- Environment variable in Network-Watcher of the Deployment for SERVER_PORT should not read from .Values.service.port HOT 2
- Add extraDeploy to charts
- Unable to deploy Soketi using Helm HOT 3
- Please add option to add priorityClassName to the helm chart
- Not able to access http://<IP>:9601/metrics in GKE cluster using k8 soketi helm. HOT 1
- Expose soketi service using Ingress HOT 2
- Add topologySpreadConstraints to helmchart
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 charts.