Feature: Resource Limits for backstage container (#27)

This commit is contained in:
Joshua Jackson 2022-12-15 07:20:12 -08:00 committed by GitHub
parent bb73b4d4f2
commit be5b46d4c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 6 deletions

View File

@ -15,7 +15,7 @@ type: application
# 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.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.7.0
version: 0.8.0
dependencies:
- name: common

View File

@ -1,7 +1,7 @@
# Backstage Helm Chart
![Version: 0.7.0](https://img.shields.io/badge/Version-0.7.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 0.8.0](https://img.shields.io/badge/Version-0.8.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
A Helm chart for deploying a Backstage application
@ -102,6 +102,7 @@ The command removes all the Kubernetes components associated with the chart and
| backstage.image.repository | | string | `"backstage/backstage"` |
| backstage.image.tag | | string | `"latest"` |
| backstage.podSecurityContext | | object | `{}` |
| backstage.resources | resource requests/limits ref: https://kubernetes.io/docs/user-guide/compute-resources/ # E.g. # resources: # limits: # memory: 1Gi # cpu: 1000m # requests: # memory: 250Mi # cpu: 100m | object | `{}` |
| clusterDomain | | string | `"cluster.local"` |
| commonAnnotations | | object | `{}` |
| commonLabels | | object | `{}` |

View File

@ -27,7 +27,7 @@ spec:
spec:
{{- if .Values.serviceAccount.create }}
serviceAccountName: {{ .Values.serviceAccount.name }}
{{- end }}
{{- end }}
{{- if .Values.backstage.podSecurityContext }}
securityContext:
{{- include "common.tplvalues.render" ( dict "value" .Values.backstage.podSecurityContext "context" $) | nindent 8 }}
@ -38,7 +38,7 @@ spec:
- name: {{ .configMapRef }}
configMap:
name: {{ .configMapRef }}
{{- end }}
{{- end }}
{{- if .Values.backstage.extraVolumes }}
{{- toYaml .Values.backstage.extraVolumes | nindent 8 }}
{{- end }}
@ -70,6 +70,9 @@ spec:
{{- range .Values.backstage.args }}
- {{ . | quote }}
{{- end }}
{{- if .Values.backstage.resources }}
resources: {{- include "common.tplvalues.render" (dict "value" .Values.backstage.resources "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.backstage.extraAppConfig }}
{{- range .Values.backstage.extraAppConfig }}
- "--config"
@ -92,7 +95,7 @@ spec:
value: {{ include "backstage.postgresql.host" . }}
- name: POSTGRES_PORT
value: "5432"
- name: POSTGRES_USER
- name: POSTGRES_USER
value: {{ .Values.postgresql.auth.username }}
- name: POSTGRES_PASSWORD
valueFrom:
@ -112,7 +115,7 @@ spec:
{{- range .Values.backstage.extraAppConfig }}
- name: {{ .configMapRef }}
mountPath: "/app/{{ .filename }}"
subPath: {{ .filename }}
subPath: {{ .filename }}
{{- end }}
{{- if .Values.backstage.extraVolumeMounts }}
{{- toYaml .Values.backstage.extraVolumeMounts | nindent 12 }}

View File

@ -120,6 +120,17 @@ backstage:
extraEnvVarsSecrets:
extraVolumeMounts: []
extraVolumes: []
# -- resource requests/limits
# ref: https://kubernetes.io/docs/user-guide/compute-resources/
## E.g.
## resources:
## limits:
## memory: 1Gi
## cpu: 1000m
## requests:
## memory: 250Mi
## cpu: 100m
resources: {}
## @param backstage.podSecurityContext Security settings for a Pod.
## The security settings that you specify for a Pod apply to all Containers in the Pod.