Skip to content

Commit

Permalink
Wip
Browse files Browse the repository at this point in the history
  • Loading branch information
dorneanu committed Nov 26, 2024
1 parent 890de63 commit 4e8fbf7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 16 deletions.
5 changes: 2 additions & 3 deletions charts/heureka/docker/maintenance/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@

services:
maintenance:
build:
context: .
dockerfile: Dockerfile
build: .
image: db-maintenance:latest
container_name: heureka_maintenance
environment:
DB_HOST: host.docker.internal
Expand Down
8 changes: 3 additions & 5 deletions charts/heureka/docker/maintenance/scripts/maintenance.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE IssueMatchEvidence;
TRUNCATE TABLE ComponentVersionIssue;
TRUNCATE TABLE IssueRepositoryService;
TRUNCATE TABLE ActivityHasIssue;
TRUNCATE TABLE ActivityHasService;
TRUNCATE TABLE IssueMatchChange;
TRUNCATE TABLE SupportGroupService;
TRUNCATE TABLE SupportGroupUser;
Expand All @@ -27,16 +25,16 @@ TRUNCATE TABLE Owner;
TRUNCATE TABLE IssueMatch;
TRUNCATE TABLE Evidence;
TRUNCATE TABLE ComponentInstance;
TRUNCATE TABLE IssueVariant;
-- TRUNCATE TABLE IssueVariant;
TRUNCATE TABLE ComponentVersion;
TRUNCATE TABLE Activity;

-- Truncate main entity tables
TRUNCATE TABLE Component;
TRUNCATE TABLE Service;
TRUNCATE TABLE SupportGroup;
TRUNCATE TABLE Issue;
TRUNCATE TABLE IssueRepository;
-- TRUNCATE TABLE Issue;
-- TRUNCATE TABLE IssueRepository;

-- Re-enable foreign key checks
SET FOREIGN_KEY_CHECKS = 1;
Expand Down
7 changes: 0 additions & 7 deletions charts/heureka/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@ spec:
containers:
- name: db-maintenance
image: {{ .Values.dbMaintenance.image.repository }}:{{ .Values.dbMaintenance.image.tag }}
# resources:
# limits:
# memory: "128Mi"
# cpu: "100m"
# requests:
# memory: "64Mi"
# cpu: "50m"
env:
- name: DB_HOST
value: {{ .Values.mariadb.fullnameOverride | default (printf "%s-mariadb" (include "heureka.fullname" .)) }}
Expand Down
2 changes: 1 addition & 1 deletion charts/heureka/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ dbMaintenance:
image:
# Just for testing purposes
repository: db-maintenance
tag: "local"
tag: "latest"
pullPolicy: "never"
scripts:
- name: cleanup
Expand Down

0 comments on commit 4e8fbf7

Please sign in to comment.