This message was deleted.
# opal
s
This message was deleted.
o
Hi @Andrew Quinton, great question, let me check it with my team and get back to you 🙂
👍 1
r
Hey @Andrew Quinton, Depends on the deployment that you choose (server/client), you can look at the manifests templates. For example, in the server deployment look here - https://github.com/permitio/opal-helm-chart/blob/master/templates/deployment-server.yaml#L83 From line 83, you can see the environment variables are getting populated from specific values from the helm values. In this example you can set
OPAL_POLICY_REPO_URL
by simply add
policyRepoUrl
to your
values.yaml
Hope it makes sense 🙂
a
I'll take a look, thanks guys.
1
Ok, one query. I'm trying to set
OPAL_DATA_CONFIG_SOURCES
via the Helm chart using this portion of the values file:
Copy code
dataConfigSources:
    config:
      entries: []
But I seem to be falling foul of the input validation, can anyone point me in the right direction?
👀 1
Specifically I need to set the
external_source_url
Another query. Is there plans to have the chart pull
OPAL_AUTH_PRIVATE_KEY
from a secret? Currently it can be seen in the list of environment variables of the pod
r
Unfortunately the
dataConfigSources
parameter on
values.yaml
is strict by the schema and can’t get any `external_source_url`s as the enteries. We will fix it by ease the schema, we can do it by the eod. You can do it yourself if you prefer, can add this to the schema.
a
@Raz Co Appreciate that. In the meantime I'll see if I can add it to the schema myself for testing.
r
Hey @Andrew Quinton, Released a new version with better schema. take a look here - https://github.com/permitio/opal-helm-chart/releases/tag/0.0.11 Also, added an example for the values.yaml - https://github.com/permitio/opal-helm-chart/blob/9c0ccc29223661b710d3896f694534b9356692e1/values.yaml#L12
a
Ah, we've updated the schema validation in the same way. Unfortunately I'm getting this error:
Copy code
File "pydantic/main.py", line 342, in pydantic.main.BaseModel.__init__
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)
r
Are you setting both? How’s your values file look like
a
No, that's just with this in the values file:
Copy code
dataConfigSources:
    external_source_url: "<https://your-api.com/path/to/api/endpoint>"
r
With the new release or your own schema? It’s working well for me opal
a
Well, my own schema is identical to your own
Strange. I will say I've been getting some odd behavior. Even without any client values in my values file the chart always deploys a client pod...
I can see this in the pod environment:
Copy code
OPAL_DATA_CONFIG_SOURCES:           {"config":{"entries":[]},"external_source_url":"<http://my-api.namespace.svc/endpoint>"}
r
I’ll take a look again asap
a
Appreciate that, thank you.
r
@Andrew Quinton, as you can see, setting the
external_source_url
on values.yaml will produce the right Env var.
a
Bizarre. Must be something on my end... Terraform potentially? I've never seen behaviour like this before though.
Thank you @Raz Co
I've figured it out, issue on my end. I've also realised why the client pods are getting deployed irrespective of whether or not I set client values, it's because it's set in the default values file of the chart: https://github.com/permitio/opal-helm-chart/blob/master/values.yaml#L21 It's obviously getting picked up by the if statement in the deployment template. Could this potentially be removed?
r
Can you please open an issue with this ? We need to consider what should be the default values. Anyway, I’m happy you made it through:)
👍 1