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

feat: add alternate schema route #572

Open
wants to merge 2 commits into
base: 0.18.0
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions cmd/buz/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ func (a *App) initializeSchemaCacheRoutes() {
if a.config.Registry.Http.Enabled {
log.Info().Msg("🟢 initializing schema registry routes")
a.switchableRouterGroup.GET(registry.SCHEMAS_ROUTE+"*"+registry.SCHEMA_PARAM, registry.GetSchemaHandler(r))
if a.config.SchemaRoute != "" {
a.switchableRouterGroup.GET(a.config.SchemaRoute+"*"+registry.SCHEMA_PARAM, registry.GetSchemaHandler(r))
}
}
}

Expand Down
1 change: 1 addition & 0 deletions deploy/terraform/aws/lambda/config.yml.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ app:
trackerDomain: ${trackerDomain}
enableConfigRoute: false
serverless: true
schemaRoute: /schemas/

middleware:
timeout:
Expand Down
3 changes: 2 additions & 1 deletion deploy/terraform/gcp/cloud_run/config.yml.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ app:
trackerDomain: ${trackerDomain}
enableConfigRoute: false
serverless: false
schemaRoute: /schemas/

middleware:
timeout:
Expand Down Expand Up @@ -96,4 +97,4 @@ squawkBox:
enabled: true

tele:
enabled: true
enabled: true
1 change: 1 addition & 0 deletions pkg/config/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ type App struct {
TrackerDomain string `json:"trackerDomain"`
EnableConfigRoute bool `json:"enableConfigRoute"`
Serverless bool `json:"serverless"`
SchemaRoute string `json:"schemaRoute"`
}
5 changes: 5 additions & 0 deletions schemas/io.silverton/buz/internal/config/app/v1.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@
"type": "boolean",
"default": false,
"description": "Whether or not to run buz in serverless mode"
},
"schemaRoute": {
"type": "string",
"default": "/schemas/",
"description": "Alternate route for the schemas"
}
},
"additionalProperties": false,
Expand Down