Skip to content

Commit

Permalink
refactor: add resources, rename files and remove unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
this-is-tobi committed Sep 19, 2023
1 parent f9f685f commit 103172e
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 21 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/dso-automatic-sync.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Sync DSO gitlab repository

on: workflow_dispatch
on:
workflow_dispatch:
push:
branches:
- feature/adapt-infra-for-dso-env

jobs:
sync:
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion infra/kube/helm/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ metadata:
name: {{ include "basegun.name" . }}-config
data:
WORKSPACE: {{ .Values.backend.config.workspace }}
PATH_IMGS: {{ .Values.backend.config.path_imgs }}
PATH_LOGS: /tmp/log/basegun/
---
apiVersion: v1
Expand Down
3 changes: 2 additions & 1 deletion infra/kube/helm/templates/deployment-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ spec:
{{- toYaml .Values.backend.securityContext | nindent 12 }}
image: "{{ .Values.backend.image.repository }}:{{ .Values.backend.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.backend.image.pullPolicy }}
resources: {{- toYaml .Values.backend.resources | nindent 12 }}
envFrom:
- configMapRef:
name: {{ include "basegun.name" . }}-config
Expand Down Expand Up @@ -60,7 +61,7 @@ spec:
image: "{{ .Values.backend.logs.repository }}:{{ .Values.backend.logs.tag }}"
command: ["/bin/bash"]
args: ["-c", "filebeat -e -c /tmp/filebeat/filebeat.yml --strict.perms=false"]
resources: {}
resources: {{- toYaml .Values.backend.logs.resources | nindent 12 }}
env:
- name: X_OVH_TOKEN
valueFrom:
Expand Down
1 change: 1 addition & 0 deletions infra/kube/helm/templates/deployment-frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ spec:
{{- toYaml .Values.frontend.securityContext | nindent 12 }}
image: "{{ .Values.frontend.image.repository }}:{{ .Values.frontend.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.frontend.image.pullPolicy }}
resources: {{- toYaml .Values.frontend.resources | nindent 12 }}
ports:
- name: http
containerPort: {{ .Values.frontend.service.containerPort }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ backend:
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
config:
# Where images are stored locally
path_imgs: /app/images
# Used for showing current workspace in app
workspace: preprod
secret:
Expand Down
37 changes: 21 additions & 16 deletions infra/kube/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ backend:
repository: elastic/filebeat
tag: 6.5.4
pullPolicy: IfNotPresent
resources:
limits:
cpu: 250m
memory: 512Mi
requests:
cpu: 100m
memory: 256Mi
service:
type: ClusterIP
port: 5000
Expand All @@ -61,8 +68,6 @@ backend:
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
config:
# Where images are stored locally
path_imgs: /app/images
# Used for showing current workspace in app
workspace: preprod
secret:
Expand All @@ -75,17 +80,17 @@ backend:
# X_OVH_TOKEN: "test"
# API_OVH_TOKEN: "test"
secretName: "basegun-secret"
resources: {}
resources:
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
limits:
cpu: 250m
memory: 1Gi
requests:
cpu: 100m
memory: 512Mi
nodeSelector: {}
tolerations: []
affinity: {}
Expand Down Expand Up @@ -114,17 +119,17 @@ frontend:
type: ClusterIP
port: 8080
containerPort: 8080
resources: {}
resources:
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
limits:
cpu: 200m
memory: 256Mi
requests:
cpu: 50m
memory: 64Mi
nodeSelector: {}
tolerations: []
affinity: {}

0 comments on commit 103172e

Please sign in to comment.