Skip to content

Commit

Permalink
Generic node helm chart (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
bryopsida committed Jan 12, 2024
1 parent 5a8e8c2 commit ca9f190
Show file tree
Hide file tree
Showing 18 changed files with 1,613 additions and 0 deletions.
25 changes: 25 additions & 0 deletions charts/node-app/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
node_modules
.npm
7 changes: 7 additions & 0 deletions charts/node-app/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v2
name: node-app
description: A generic helm chart for a node app, load code into pod with `kubectl cp <app code foder> <pod name>:/app`. will automatically load new changes
type: application
version: 0.1.0
maintainers:
- name: bryopsida
92 changes: 92 additions & 0 deletions charts/node-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# node-app

![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

A generic helm chart for a node app, load code into pod with `kubectl cp <app code foder> <pod name>:/app`. will automatically load new changes

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| bryopsida | | |

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| autoscaling.enabled | bool | `false` | |
| autoscaling.maxReplicas | int | `100` | |
| autoscaling.minReplicas | int | `1` | |
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| clusterDomain | string | `"cluster.local"` | |
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"Always"` | |
| image.repository | string | `"node"` | |
| image.tag | string | `"lts"` | |
| imagePullSecrets | list | `[]` | |
| initContainers[0].command[0] | string | `"node"` | |
| initContainers[0].command[1] | string | `"/seed/seed.mjs"` | |
| initContainers[0].image | string | `"node:lts"` | |
| initContainers[0].name | string | `"seed-container"` | |
| initContainers[0].volumeMounts[0].mountPath | string | `"/seed"` | |
| initContainers[0].volumeMounts[0].name | string | `"seed"` | |
| initContainers[0].volumeMounts[1].mountPath | string | `"/app"` | |
| initContainers[0].volumeMounts[1].name | string | `"app-code"` | |
| initContainers[0].volumeMounts[1].subPath | string | `"app-code"` | |
| initContainers[0].volumeMounts[2].mountPath | string | `"/home/node/.npm"` | |
| initContainers[0].volumeMounts[2].name | string | `"npm-cache"` | |
| initContainers[0].volumeMounts[2].subPath | string | `"npm-cache"` | |
| managedStorage[0].accessModes[0] | string | `"ReadWriteOnce"` | |
| managedStorage[0].name | string | `"app-code"` | |
| managedStorage[0].size | string | `"1Gi"` | |
| managedStorage[1].accessModes[0] | string | `"ReadWriteOnce"` | |
| managedStorage[1].name | string | `"npm-cache"` | |
| managedStorage[1].size | string | `"5Gi"` | |
| managedStorage[2].accessModes[0] | string | `"ReadWriteOnce"` | |
| managedStorage[2].name | string | `"node-modules"` | |
| managedStorage[2].size | string | `"5Gi"` | |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podLabels | object | `{}` | |
| podSecurityContext.fsGroup | int | `1001` | |
| podSecurityContext.runAsGroup | int | `1001` | |
| podSecurityContext.runAsUser | int | `1001` | |
| replicaCount | int | `1` | |
| resources | object | `{}` | |
| securityContext.runAsNonRoot | bool | `true` | |
| securityContext.runAsUser | int | `1001` | |
| service.port | int | `3000` | |
| service.type | string | `"ClusterIP"` | |
| serviceAccount.annotations | object | `{}` | |
| serviceAccount.automount | bool | `true` | |
| serviceAccount.create | bool | `true` | |
| serviceAccount.name | string | `""` | |
| tolerations | list | `[]` | |
| virtualService.enabled | bool | `false` | |
| virtualService.gateway | string | `"istio-ingress/default-gateway"` | |
| virtualService.hostname | string | `"node.example.com"` | |
| volumeMounts[0].mountPath | string | `"/app"` | |
| volumeMounts[0].name | string | `"app-code"` | |
| volumeMounts[0].subPath | string | `"app-code"` | |
| volumeMounts[1].mountPath | string | `"/app/.npm"` | |
| volumeMounts[1].name | string | `"npm-cache"` | |
| volumeMounts[1].subPath | string | `"npm-cache"` | |
| volumeMounts[2].mountPath | string | `"/.npm"` | |
| volumeMounts[2].name | string | `"npm-cache"` | |
| volumeMounts[2].subPath | string | `"npm-cache"` | |
| volumeMounts[3].mountPath | string | `"/app/node_modules"` | |
| volumeMounts[3].name | string | `"node-modules"` | |
| volumeMounts[3].subPath | string | `"node-modules"` | |
| volumes[0].configMap.name | string | `"seed-config"` | |
| volumes[0].name | string | `"seed"` | |
| volumes[1].name | string | `"app-code"` | |
| volumes[1].persistentVolumeClaim.claimName | string | `"app-code"` | |
| volumes[2].name | string | `"npm-cache"` | |
| volumes[2].persistentVolumeClaim.claimName | string | `"npm-cache"` | |
| volumes[3].name | string | `"node-modules"` | |
| volumes[3].persistentVolumeClaim.claimName | string | `"node-modules"` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.12.0](https://github.com/norwoodj/helm-docs/releases/v1.12.0)
2 changes: 2 additions & 0 deletions charts/node-app/seed/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.npm
2 changes: 2 additions & 0 deletions charts/node-app/seed/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.npm
11 changes: 11 additions & 0 deletions charts/node-app/seed/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const express = require('express')
const app = express()
const port = 3000

app.get('/', (req, res) => {
res.send('Hello World!')
})

app.listen(port, () => {
console.log(`Example app listening on port ${port}`)
})
Loading

0 comments on commit ca9f190

Please sign in to comment.