add resource specification to frontend and backend deployment containers

This commit is contained in:
MohamadTahir
2023-09-02 09:29:23 +03:00
parent 41774fa97c
commit 5704dfb35f
6 changed files with 42 additions and 19 deletions
+3
View File
@@ -0,0 +1,3 @@
# 0.3.3
### Changes since 0.3.2 [#933](https://github.com/Infisical/infisical/pull/933)
- added resource specs to both the frontend and backend
+1 -1
View File
@@ -7,7 +7,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes # This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version. # to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.3.2 version: 0.3.3
# This is the version number of the application being deployed. This version number should be # This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to # incremented each time you make changes to the application. Versions are not expected to
+18 -16
View File
@@ -61,22 +61,23 @@ kubectl get secrets -n <namespace> <secret-name> \
### Infisical frontend parameters ### Infisical frontend parameters
| Name | Description | Value | | Name | Description | Value |
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- |
| `frontend.enabled` | Enable frontend | `true` | | `frontend.enabled` | Enable frontend | `true` |
| `frontend.name` | Backend name | `frontend` | | `frontend.name` | Backend name | `frontend` |
| `frontend.fullnameOverride` | Backend fullnameOverride | `""` | | `frontend.fullnameOverride` | Backend fullnameOverride | `""` |
| `frontend.podAnnotations` | Backend pod annotations | `{}` | | `frontend.podAnnotations` | Backend pod annotations | `{}` |
| `frontend.deploymentAnnotations` | Backend deployment annotations | `{}` | | `frontend.deploymentAnnotations` | Backend deployment annotations | `{}` |
| `frontend.replicaCount` | Backend replica count | `2` | | `frontend.replicaCount` | Backend replica count | `2` |
| `frontend.image.repository` | Backend image repository | `infisical/frontend` | | `frontend.image.repository` | Backend image repository | `infisical/frontend` |
| `frontend.image.tag` | Backend image tag | `latest` | | `frontend.image.tag` | Backend image tag | `latest` |
| `frontend.image.pullPolicy` | Backend image pullPolicy | `IfNotPresent` | | `frontend.image.pullPolicy` | Backend image pullPolicy | `IfNotPresent` |
| `frontend.kubeSecretRef` | Backend secret resource reference name (containing required [frontend configuration variables](https://infisical.com/docs/self-hosting/configuration/envars)) | `""` | | `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.annotations` | Backend service annotations | `{}` |
| `frontend.service.type` | Backend service type | `ClusterIP` | | `frontend.service.type` | Backend service type | `ClusterIP` |
| `frontend.service.nodePort` | Backend service nodePort (used if above type is `NodePort`) | `""` | | `frontend.service.nodePort` | Backend service nodePort (used if above type is `NodePort`) | `""` |
| `frontendEnvironmentVariables.SITE_URL` | Absolute URL including the protocol (e.g. https://app.infisical.com) | `infisical.local` | | `frontend.resources` | Frontend container resource spesification, check the offical [kubernetes documentations](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) | `` |
| `frontendEnvironmentVariables.SITE_URL` | Absolute URL including the protocol (e.g. https://app.infisical.com) | `infisical.local` |
### Infisical backend parameters ### Infisical backend parameters
@@ -91,6 +92,7 @@ kubectl get secrets -n <namespace> <secret-name> \
| `backend.image.repository` | Backend image repository | `infisical/backend` | | `backend.image.repository` | Backend image repository | `infisical/backend` |
| `backend.image.tag` | Backend image tag | `latest` | | `backend.image.tag` | Backend image tag | `latest` |
| `backend.image.pullPolicy` | Backend image pullPolicy | `IfNotPresent` | | `backend.image.pullPolicy` | Backend image pullPolicy | `IfNotPresent` |
| `backend.resources` | Backend container resource spesification, check the offical [kubernetes documentations](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) | `` |
| `backend.kubeSecretRef` | Backend secret resource reference name (containing required [backend configuration variables](https://infisical.com/docs/self-hosting/configuration/envars)) | `""` | | `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.annotations` | Backend service annotations | `{}` |
| `backend.service.type` | Backend service type | `ClusterIP` | | `backend.service.type` | Backend service type | `ClusterIP` |
@@ -40,7 +40,9 @@ spec:
envFrom: envFrom:
- secretRef: - secretRef:
name: {{ $backend.kubeSecretRef | default (include "infisical.backend.fullname" .) }} name: {{ $backend.kubeSecretRef | default (include "infisical.backend.fullname" .) }}
{{- if $backend.resources }}
resources: {{- toYaml $backend.resources | nindent 12 }}
{{- end }}
--- ---
apiVersion: v1 apiVersion: v1
@@ -40,7 +40,9 @@ spec:
name: {{ $frontend.kubeSecretRef | default (include "infisical.frontend.fullname" .) }} name: {{ $frontend.kubeSecretRef | default (include "infisical.frontend.fullname" .) }}
ports: ports:
- containerPort: 3000 - containerPort: 3000
{{- if $frontend.resources }}
resources: {{- toYaml $frontend.resources | nindent 12 }}
{{- end }}
--- ---
apiVersion: v1 apiVersion: v1
+14
View File
@@ -43,6 +43,13 @@ frontend:
## @param frontend.image.pullPolicy Backend image pullPolicy ## @param frontend.image.pullPolicy Backend image pullPolicy
## ##
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
## container resource specifications [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)) ## @param frontend.kubeSecretRef Backend secret resource reference name (containing required [frontend configuration variables](https://infisical.com/docs/self-hosting/configuration/envars))
## ##
kubeSecretRef: "" kubeSecretRef: ""
@@ -102,6 +109,13 @@ backend:
## @param backend.image.pullPolicy Backend image pullPolicy ## @param backend.image.pullPolicy Backend image pullPolicy
## ##
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
## container resource specifications [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)) ## @param backend.kubeSecretRef Backend secret resource reference name (containing required [backend configuration variables](https://infisical.com/docs/self-hosting/configuration/envars))
## ##
kubeSecretRef: "" kubeSecretRef: ""