Giter VIP home page Giter VIP logo

Comments (2)

codeautopilot avatar codeautopilot commented on May 31, 2024 1

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:

  1. 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 }}
  1. 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?

Discord
Documentation
[email protected]

from charts.

maxvisser avatar maxvisser commented on May 31, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.