Skip to content

Commit

Permalink
Empty dataConfigSources by default + examples
Browse files Browse the repository at this point in the history
  • Loading branch information
roekatz committed May 4, 2023
1 parent 1155744 commit 25731f6
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,20 @@ server:
policyRepoMainBranch: null
pollingInterval: 30
dataConfigSources:
external_source_url: "https://your-api.com/path/to/api/endpoint"
# Option #1 - No data sources
config:
entries: []

# Option #2 - Dynamically get data sources
# external_source_url: "https://your-api.com/path/to/api/endpoint"

# Option #3 - Example static data sources (endpoint is empty by default)
# config:
# entries:
# - url: http://opal-server:7002/policy-data
# topics: ["policy_data"]
# dst_path: "/static"

broadcastUri: null
broadcastPgsql: true
uvicornWorkers: 4
Expand All @@ -26,4 +39,3 @@ client:
replicas: 1
extraEnv:
"CUSTOM_ENV_VAR": "VALUE"

1 comment on commit 25731f6

@theeheng
Copy link

@theeheng theeheng commented on 25731f6 Jun 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi there, we are trying to use terraform to deploy the opal server with the latest version on the helm chart and notice that you have committed this changes to the default values file recently which currently cause an issue when we set the value for external_source_url as follow:

server:
  dataConfigSources:
     external_source_url: "http://xxx-xxx-xx-xxx"

it will set the environment variable OPAL_DATA_CONFIG_SOURCES to {"config":{"entries":[]},"external_source_url":"http://xxx-xxx-xx-xxx"} and opal server is throwing the following error:

pydantic.error_wrappers.ValidationError: 1 validation error for ServerDataSourceConfig
__root__
  you must provide ONLY ONE of these fields: config, external_source_url (type=value_error)

I think thats why the default values file was initially set with external_source_url as the first options rather than having the config -> entries as the first options.

I'm wondering if you able to revert this code commit to the value file or update the server template file to fix this issue.

Please sign in to comment.