Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add /support-cron-scheduler path in API gateway #4934

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions cmd/security-proxy-setup/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,18 @@ server {
auth_request_set \$auth_status \$upstream_status;
}

set \$upstream_support_cron_scheduler edgex-support-cron-scheduler;
location /support-cron-scheduler {
`cat "${corssnippet}"`
rewrite /support-cron-scheduler/(.*) /\$1 break;
resolver 127.0.0.11 valid=30s;
proxy_pass http://\$upstream_support_cron_scheduler:59863;
proxy_redirect off;
proxy_set_header Host \$host;
auth_request /auth;
auth_request_set \$auth_status \$upstream_status;
}

set \$upstream_app_rules_engine edgex-app-rules-engine;
location /app-rules-engine {
`cat "${corssnippet}"`
Expand Down
2 changes: 1 addition & 1 deletion cmd/support-cron-scheduler/res/db/sql/00-utils.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
-- SPDX-License-Identifier: Apache-2.0

-- schema for support_scheduler related tables
CREATE SCHEMA IF NOT EXISTS support_scheduler;
CREATE SCHEMA IF NOT EXISTS support_cron_scheduler;
4 changes: 2 additions & 2 deletions cmd/support-cron-scheduler/res/db/sql/01-tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
-- SPDX-License-Identifier: Apache-2.0

-- support_scheduler.job is used to store the schedule job information
CREATE TABLE IF NOT EXISTS support_scheduler.job (
CREATE TABLE IF NOT EXISTS support_cron_scheduler.job (
id UUID PRIMARY KEY,
content JSONB NOT NULL
);

-- support_scheduler.record is used to store the schedule action record
CREATE TABLE IF NOT EXISTS support_scheduler.record (
CREATE TABLE IF NOT EXISTS support_cron_scheduler.record (
id UUID PRIMARY KEY,
action_id UUID NOT NULL,
job_name TEXT NOT NULL,
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/infrastructure/postgres/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const (
coreKeeperSchema = "core_keeper"
coreMetaDataSchema = "core_metadata"
supportNotificationsSchema = "support_notifications"
supportSchedulerSchema = "support_scheduler"
supportSchedulerSchema = "support_cron_scheduler"
)

// constants relate to the postgres db table names
Expand Down
Loading