mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-01-27 10:18:39 +00:00
[bugfix] add-resource-quotas-for-pg-jobs-and-fix-install-generate (#1051)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added default resource specifications for PostgreSQL jobs to ensure consistent CPU and memory allocation. - **Chores** - Updated the chart version for the PostgreSQL application. - Refreshed version mapping to reflect the latest release. - Improved Node.js setup and package installation in the pre-commit workflow. - **Tests** - Increased memory allocation for QEMU virtual machines in end-to-end tests. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
7
.github/workflows/pre-commit.yml
vendored
7
.github/workflows/pre-commit.yml
vendored
@@ -30,12 +30,13 @@ jobs:
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install curl -y
|
||||
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
|
||||
sudo apt install nodejs -y
|
||||
git clone https://github.com/bitnami/readme-generator-for-helm
|
||||
sudo apt install npm -y
|
||||
|
||||
git clone --branch 2.7.0 --depth 1 https://github.com/bitnami/readme-generator-for-helm.git
|
||||
cd ./readme-generator-for-helm
|
||||
npm install
|
||||
npm install -g pkg
|
||||
npm install -g @yao-pkg/pkg
|
||||
pkg . -o /usr/local/bin/readme-generator
|
||||
|
||||
- name: Run pre-commit hooks
|
||||
|
||||
@@ -102,7 +102,7 @@ EOF
|
||||
|
||||
@test "Boot QEMU VMs" {
|
||||
for i in 1 2 3; do
|
||||
qemu-system-x86_64 -machine type=pc,accel=kvm -cpu host -smp 8 -m 16384 \
|
||||
qemu-system-x86_64 -machine type=pc,accel=kvm -cpu host -smp 8 -m 24576 \
|
||||
-device virtio-net,netdev=net0,mac=52:54:00:12:34:5${i} \
|
||||
-netdev tap,id=net0,ifname=cozy-srv${i},script=no,downscript=no \
|
||||
-drive file=srv${i}/system.img,if=virtio,format=raw \
|
||||
|
||||
@@ -16,7 +16,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.12.1
|
||||
version: 0.13.0
|
||||
|
||||
# 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
|
||||
|
||||
11
packages/apps/postgres/templates/_postgresjobs.tpl
Normal file
11
packages/apps/postgres/templates/_postgresjobs.tpl
Normal file
@@ -0,0 +1,11 @@
|
||||
{{/*
|
||||
Generate resource requirements based on ResourceQuota named as the namespace.
|
||||
*/}}
|
||||
{{- define "postgresjobs.defaultResources" }}
|
||||
cpu: "1"
|
||||
memory: 512Mi
|
||||
{{- end }}
|
||||
{{- define "postgresjobs.resources" }}
|
||||
resources:
|
||||
{{ include "cozy-lib.resources.sanitize" (list (include "postgresjobs.defaultResources" $ | fromYaml) $) | nindent 2 }}
|
||||
{{- end }}
|
||||
@@ -81,6 +81,7 @@ spec:
|
||||
privileged: false
|
||||
readOnlyRootFilesystem: true
|
||||
runAsNonRoot: true
|
||||
{{- include "postgresjobs.resources" . | nindent 12 }}
|
||||
volumes:
|
||||
- name: scripts
|
||||
secret:
|
||||
|
||||
@@ -50,6 +50,7 @@ spec:
|
||||
name: secret
|
||||
- mountPath: /scripts
|
||||
name: scripts
|
||||
{{- include "postgresjobs.resources" . | nindent 8 }}
|
||||
securityContext:
|
||||
fsGroup: 26
|
||||
runAsGroup: 26
|
||||
|
||||
@@ -110,7 +110,8 @@ postgres 0.10.0 721c12a7
|
||||
postgres 0.10.1 93bdf411
|
||||
postgres 0.11.0 f9f8bb2f
|
||||
postgres 0.12.0 6130f43d
|
||||
postgres 0.12.1 HEAD
|
||||
postgres 0.12.1 632224a3
|
||||
postgres 0.13.0 HEAD
|
||||
rabbitmq 0.1.0 263e47be
|
||||
rabbitmq 0.2.0 53f2365e
|
||||
rabbitmq 0.3.0 6c5cf5bf
|
||||
|
||||
Reference in New Issue
Block a user