Refactor and added scheduler container in k8s config

This commit is contained in:
PB
2025-10-31 11:53:04 +01:00
parent 37da42027b
commit dae298bd00
5 changed files with 21 additions and 11 deletions

1
CREDITS.md Normal file
View File

@@ -0,0 +1 @@
# Libraries or any other code used in this project:

View File

@@ -1,16 +1,12 @@
CREATE TABLE catalog.product CREATE TABLE catalog.product
( (
id integer NOT NULL GENERATED ALWAYS AS IDENTITY, id uuid NOT NULL DEFAULT uuid_generate_v4(),
pid uuid NOT NULL DEFAULT gen_random_uuid(),
"name" character varying NOT NULL, "name" character varying NOT NULL,
slug character varying NOT NULL,
price double precision NOT NULL, price double precision NOT NULL,
created_at timestamp without time zone NOT NULL DEFAULT now(), created_at timestamp without time zone NOT NULL DEFAULT now(),
updated_at timestamp without time zone, updated_at timestamp without time zone,
PRIMARY KEY (id) PRIMARY KEY (id)
); );
ALTER TABLE IF EXISTS catalog.product ALTER TABLE IF EXISTS catalog.product OWNER to egommerce;
OWNER to postgres;
COMMENT ON COLUMN catalog.product.pid
IS 'Unique product ID. EAN, UPC etc...';

View File

@@ -6,5 +6,5 @@ GRANT ALL PRIVILEGES ON DATABASE egommerce TO egommerce;
CREATE EXTENSION IF NOT EXISTS "pgcrypto"; CREATE EXTENSION IF NOT EXISTS "pgcrypto";
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
-- CREATE SCHEMA "identity" CREATE SCHEMA "identity" AUTHORIZATION egommerce;
-- AUTHORIZATION egommerce; CREATE SCHEMA catalog AUTHORIZATION egommerce;

View File

@@ -39,9 +39,9 @@ spec:
tls: tls:
- secretName: api-gateway-cert - secretName: api-gateway-cert
hosts: hosts:
- egommerce.io - egommerce.io # CHANGE TO PROD DOMAIN
rules: rules:
- host: egommerce.io - host: egommerce.io # CHANGE TO PROD DOMAIN
http: http:
paths: paths:
- path: /api/identity - path: /api/identity

View File

@@ -106,6 +106,19 @@ spec:
# args: # args:
# - --web.listen-address=:9090 # - --web.listen-address=:9090
# - --web.telemetry-path=/metrics # - --web.telemetry-path=/metrics
- name: identity-chronos # Scheduler Container
image: git.ego.freeddns.org/egommerce/identity-svc:dev
imagePullPolicy: Always
command: [
"/usr/local/bin/chronos"
]
resources:
limits:
cpu: 100m
memory: 512Mi
requests:
cpu: 50m
memory: 256Mi
volumes: volumes:
- name: catalog-cert - name: catalog-cert
hostPath: hostPath: