{"id":18981892,"url":"https://github.com/nodeshift/helm","last_synced_at":"2025-07-17T06:36:42.470Z","repository":{"id":40519883,"uuid":"141716952","full_name":"nodeshift/helm","owner":"nodeshift","description":"Sample Helm Chart templates for packaging your Node.js application for deployment to Kubernetes","archived":false,"fork":false,"pushed_at":"2021-03-15T19:52:15.000Z","size":13,"stargazers_count":81,"open_issues_count":2,"forks_count":65,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-02-21T09:23:30.640Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nodeshift.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-20T13:42:57.000Z","updated_at":"2024-08-19T19:37:31.000Z","dependencies_parsed_at":"2022-07-26T20:46:54.755Z","dependency_job_id":null,"html_url":"https://github.com/nodeshift/helm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nodeshift/helm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodeshift%2Fhelm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodeshift%2Fhelm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodeshift%2Fhelm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodeshift%2Fhelm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nodeshift","download_url":"https://codeload.github.com/nodeshift/helm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodeshift%2Fhelm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265573724,"owners_count":23790498,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T16:11:37.463Z","updated_at":"2025-07-17T06:36:42.446Z","avatar_url":"https://github.com/nodeshift.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Helm Chart Templates for Node.js in Kubernetes\n\n\u003ca href='http://CloudNativeJS.io/'\u003e\u003cimg src='https://img.shields.io/badge/homepage-CloudNativeJS-blue.svg'\u003e\u003c/a\u003e\n\nThis project provides template Helm Charts for deploying a Node.js web application into any Kubernetes based cloud.\n\nThe templates require your application to built into a Docker image. The [Docker Templates](http://github.com/CloudNativeJS/docker) project provides assistance in creating an image for your application.\n\nThis project provides the following files:\n\n| File                                              | Description                                                           |\n|---------------------------------------------------|-----------------------------------------------------------------------|  \n| `/chart/nodeserver/Chart.yaml`                    | The definition file for your application                           | \n| `/chart/nodeserver/values.yaml`                   | Configurable values that are inserted into the following template files      | \n| `/chart/nodeserver/templates/basedeployment.yaml` | Template to configure your application deployment.                 |\n| `/chart/nodeserver/templates/deployment.yaml`     | Template to configure your application deployment.                 | \n| `/chart/nodeserver/templates/service.yaml`        | Template to configure your application deployment.                 | \n| `/chart/nodeserver/templates/hpa.yaml`            | Template to configure your application deployment.                 | \n| `/chart/nodeserver/templates/istio.yaml`          | Template to configure your application deployment.                 | \n| `/chart/nodeserver/templates/NOTES.txt`           | Helper to enable locating your application IP and PORT        | \n\nIn order to use these template files, copy the files from this project into your application directory. You should only need to edit the `Chart.yaml` and `values.yaml` files.\n\n## Prerequisites\n\nUsing the template Helm charts assumes the following pre-requisites are complete:  \n\n1. You have a Kubernetes cluster  \n  This could be one hosted by a cloud provider or running locally, for example using [Minikube](https://kubernetes.io/docs/setup/minikube/)\n  \n2. You have kubectl installed and configured for your cluster  \n  The [Kuberenetes command line](https://kubernetes.io/docs/tasks/tools/install-kubectl/) tool, `kubectl`, is used to view and control your Kubernetes cluster.\n\n3. You have the Helm command line and Tiller backend installed  \n   [Helm and Tiller](https://docs.helm.sh/using_helm/) provide the command line tool and backend service for deploying your application using the Helm chart.\n   These charts are compatible with Helm v2 and v3\n\n4. You have created and published a Docker image for your application  \nThe Docker Template project provides guidance on [building a run image](https://github.com/CloudNativeJS/docker#using-dockerfile-tools) for your application and [publishing it to the DockerHub registry](https://github.com/CloudNativeJS/docker#publishing-the-image).\n\n5. Your application has a \"health\" endpoint  \n  This allows Kubernetes to restart your application if it fails or becomes unresponsive. The [Health Connect](https://github.com/CloudNativeJS/cloud-health-connect) middleware can be used to add a health endpoint.\n\n## Adding the Chart to your Application\n\nIn order to add Helm Charts to your application, copy the `charts` directory from this project into your application's root directory.\n\nYou then need to make a single change before the charts are usable: to set the `image.repository` for your application.\n\n### Setting the `image.repository` parameter\n\nIn order to change the `image.repository` parameter, open the `charts/nodeserver/values.yaml` file and change the following entry:  \n\n```sh\nimage:\n  repository: \u003cnamespace\u003e/nodeserver\n```\nto set `\u003cnamespace\u003e` to your namespace on DockerHub where you published your application as `nodeserver`.\n\n## Configuring the Chart for your Application\n\nThe following table lists the configurable parameters of the template Helm chart and their default values.\n\n| Parameter                  | Description                                     | Default                                                    |\n| -----------------------    | ---------------------------------------------   | ---------------------------------------------------------- |\n| `image.repository`         | image repository                                | `\u003cnamespace\u003e/nodeserver`                                 |\n| `image.tag`                | Image tag                                       | `latest`                                                    |\n| `image.pullPolicy`         | Image pull policy                               | `Always`                                                   |\n| `livenessProbe`   | Configuration for any liveness probe provided |   YAML object of liveness probe. See [Liveness and Readiness Probes](#liveness-and-readiness-probes)                            |\n| `readinessProbe`         | Configuration provided for any liveness probe provided      | YAML object of readiness probe. See [Liveness and Readiness Probes](#liveness-and-readiness-probes)         |\n| `service.name`             | Kubernetes service name                                | `Node`                                                     |\n| `service.type`             | Kubernetes service type exposing port                  | `NodePort`                                                 |\n| `service.port`             | TCP Port for this service                       | 3000                                                       |\n| `resources.limits.memory`  | Memory resource limits                          | `128m`                                                     |\n| `resources.limits.cpu`     | CPU resource limits                             | `100m`                                                     |\n\n#### Liveness and Readiness Probes\n\nWith the default configuration, no liveness or readiness is enabled. This means that the container is considered healthy as long as its main process is running, otherwise it's considered a failure.\n\nOptionally, you add configurations for readiness and liveness probes by configuring `image.readinessProbe` and `image.livenessProbe` parameters, respectively. Example configuration is provided in the `values.yaml` file.\n\nThe `initialDelaySeconds` defines how long to wait before performing the first probe. Default value for readiness probe is 2 seconds and for liveness probe is 20 seconds. You should set appropriate values for your container, if necessary, to ensure that the readiness and liveness probes don’t interfere with each other. Otherwise, the liveness probe might continuously restart the pod and the pod will never be marked as ready.\n\nMore information about configuring liveness and readiness probes can be found [here](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/)\n\n\n## Using the Chart to deploy your Application to Kubernetes\n\nIn order to use the Helm chart to deploy and verify your application in Kubernetes, run the following commands:\n\n1. From the directory containing `Chart.yaml`, run:  \n\n  **Helm v2**\n  \n  ```sh\n  helm install --name nodeserver .\n  ```\n\n  **Helm v3**\n  \n  ```sh\n  helm install nodeserver .\n  ```\n\n  This deploys and runs your application in Kubernetes, and prints the following text to the console:  \n  \n  ```sh\n  Congratulations, you have deployed your Node.js Application to Kubernetes using Helm!\n\n  To verify your application is running, run the following two commands to set the SAMPLE_NODE_PORT and SAMPLE_NODE_IP environment variables to the location of your application:\n\n  export SAMPLE_NODE_PORT=$(kubectl get --namespace default -o jsonpath=\"{.spec.ports[0].nodePort}\" services nodeserver-service)\n  export SAMPLE_NODE_IP=$(kubectl get nodes --namespace default -o jsonpath=\"{.items[0].status.addresses[0].address}\")\n  \n  And then open your web browser to http://${SAMPLE_NODE_IP}:${SAMPLE_NODE_PORT} from the command line, eg:\n  \n  open http://${SAMPLE_NODE_IP}:${SAMPLE_NODE_PORT}\n  ```\n  \n2. Copy, paste and run the `export` lines printed to the console\n  eg:\n  \n  ```sh\n  export SAMPLE_NODE_PORT=$(kubectl get --namespace default -o jsonpath=\"{.spec.ports[0].nodePort}\" services nodeserver-service)\n  export SAMPLE_NODE_IP=$(kubectl get nodes --namespace default -o jsonpath=\"{.items[0].status.addresses[0].address}\")\n  ```\n  \n3. Open a browser to view your application:  \n  Open your browser to `http://${SAMPLE_NODE_IP}:${SAMPLE_NODE_PORT}` from the command line using:\n  \n  ```sh\n  open http://${SAMPLE_NODE_IP}:${SAMPLE_NODE_PORT}\n  ```\n\nYou application should now be visible in your browser.\n\n\n## Uninstalling your Application\nIf you installed your application with:  \n\n**Helm v2**\n\n```sh\nhelm install --name nodeserver .\n```\nthen you can:\n\n* Find the deployment using `helm list --all` and searching for an entry with the chart name \"nodeserver\".\n* Remove the application with `helm delete --purge nodeserver`.\n\n**Helm v3**\n\n```sh\nhelm install nodeserver .\n```\nthen you can:\n\n* Find the deployment using `helm list --all` and searching for an entry with the chart name \"nodeserver\".\n* Remove the application with `helm uninstall nodeserver`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodeshift%2Fhelm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodeshift%2Fhelm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodeshift%2Fhelm/lists"}