diff --git a/charts/codimd/README.md b/charts/codimd/README.md index 27157ac..3739d7c 100644 --- a/charts/codimd/README.md +++ b/charts/codimd/README.md @@ -85,7 +85,8 @@ If you want use ingress, please set `service.type` to be `ClusterIP` | codimd.securityContext.runAsGroup | Group ID for the CodiMD container | `1500` | | codimd.securityContext.runAsUser | User ID for the CodiMD container | `1500` | | codimd.securityContext.fsGroup | Group ID for the CodiMD filesystem | `1500` | -| codimd.securityContext.runAsNonRoot | Run non root in CodiMD container | `trrue` | +| codimd.securityContext.runAsNonRoot | Run non root in CodiMD container | `true` | +| codimd.resources | Resource Requests and Limits for the CodiMD container | `nil` | | codimd.connection.domain | The domain name your service will be hosted. | `nil` | | codimd.connection.urlAddPort | Set to assign port for URL. (You don’t need this for ports 80 or 443. This only works when domain is set) | `false` | | codimd.connection.protocolUseSSL | Use SSL protocol for resources path (applied only when domain is set). | `false` | diff --git a/charts/codimd/templates/deployment.yaml b/charts/codimd/templates/deployment.yaml index 5e0fe69..e30c363 100644 --- a/charts/codimd/templates/deployment.yaml +++ b/charts/codimd/templates/deployment.yaml @@ -173,6 +173,8 @@ spec: periodSeconds: 5 successThreshold: 1 timeoutSeconds: 2 + resources: + {{- toYaml .Values.codimd.resources | nindent 12 }} restartPolicy: Always {{ if .Values.codimd.imageStorePersistentVolume.enabled }} volumes: diff --git a/charts/codimd/values.yaml b/charts/codimd/values.yaml index c2a3d90..149b4e1 100644 --- a/charts/codimd/values.yaml +++ b/charts/codimd/values.yaml @@ -114,7 +114,18 @@ codimd: runAsUser: 1500 fsGroup: 1500 runAsNonRoot: true - + ## + ## Resource limits and requests + ## ref: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + ## + # resources: + # limits: + # cpu: 500m + # memory: 512Mi + # requests: + # cpu: 100m + # memory: 128Mi + resources: {} ## ## connection setting ##