Merge pull request #933 from MohamadTahir:add_resource_probs_to_deployments

Add resource specification to frontend and backend deployment containers
This commit is contained in:
Maidul Islam
2023-09-14 16:36:51 -04:00
committed by GitHub
4 changed files with 26 additions and 2 deletions

View File

@@ -72,6 +72,8 @@ kubectl get secrets -n <namespace> <secret-name> \
| `frontend.image.repository` | Backend image repository | `infisical/frontend` |
| `frontend.image.tag` | Backend image tag | `latest` |
| `frontend.image.pullPolicy` | Backend image pullPolicy | `IfNotPresent` |
| `frontend.resources.limits.memory` | container memory limit [check the offical kubernetes documentations](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) | `100Mi` |
| `frontend.resources.requests.cpu` | container CPU request [check the offical kubernetes documentations](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) | `10m` |
| `frontend.kubeSecretRef` | Backend secret resource reference name (containing required [frontend configuration variables](https://infisical.com/docs/self-hosting/configuration/envars)) | `""` |
| `frontend.service.annotations` | Backend service annotations | `{}` |
| `frontend.service.type` | Backend service type | `ClusterIP` |
@@ -91,6 +93,8 @@ kubectl get secrets -n <namespace> <secret-name> \
| `backend.image.repository` | Backend image repository | `infisical/backend` |
| `backend.image.tag` | Backend image tag | `latest` |
| `backend.image.pullPolicy` | Backend image pullPolicy | `IfNotPresent` |
| `backend.resources.limits.memory` | container memory limit [check the offical kubernetes documentations](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) | `200Mi` |
| `backend.resources.requests.cpu` | container CPU request [check the offical kubernetes documentations](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) | `150m` |
| `backend.kubeSecretRef` | Backend secret resource reference name (containing required [backend configuration variables](https://infisical.com/docs/self-hosting/configuration/envars)) | `""` |
| `backend.service.annotations` | Backend service annotations | `{}` |
| `backend.service.type` | Backend service type | `ClusterIP` |

View File

@@ -40,7 +40,9 @@ spec:
envFrom:
- secretRef:
name: {{ $backend.kubeSecretRef | default (include "infisical.backend.fullname" .) }}
{{- if $backend.resources }}
resources: {{- toYaml $backend.resources | nindent 12 }}
{{- end }}
---
apiVersion: v1

View File

@@ -40,7 +40,9 @@ spec:
name: {{ $frontend.kubeSecretRef | default (include "infisical.frontend.fullname" .) }}
ports:
- containerPort: 3000
{{- if $frontend.resources }}
resources: {{- toYaml $frontend.resources | nindent 12 }}
{{- end }}
---
apiVersion: v1

View File

@@ -43,6 +43,14 @@ frontend:
## @param frontend.image.pullPolicy Backend image pullPolicy
##
pullPolicy: IfNotPresent
## @param frontend.resources.limits.memory container memory limit [check the offical kubernetes documentations](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/)
## @param frontend.resources.requests.cpu container CPU request [check the offical kubernetes documentations](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/)
##
resources:
limits:
memory: 100Mi
requests:
cpu: 10m
## @param frontend.kubeSecretRef Backend secret resource reference name (containing required [frontend configuration variables](https://infisical.com/docs/self-hosting/configuration/envars))
##
kubeSecretRef: ""
@@ -102,6 +110,14 @@ backend:
## @param backend.image.pullPolicy Backend image pullPolicy
##
pullPolicy: IfNotPresent
## @param backend.resources.limits.memory container memory limit [check the offical kubernetes documentations](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/)
## @param backend.resources.requests.cpu container CPU request [check the offical kubernetes documentations](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/)
##
resources:
limits:
memory: 200Mi
requests:
cpu: 150m
## @param backend.kubeSecretRef Backend secret resource reference name (containing required [backend configuration variables](https://infisical.com/docs/self-hosting/configuration/envars))
##
kubeSecretRef: ""