I’ve seen some confusing examples, possibly repres...
# ask-community
w
I’ve seen some confusing examples, possibly representing different versions of Prefect over time. Is there a canonical example .prefect/config.toml? For example I saw
host = foo
in one video, and
[server] endpoint = baz
in another
k
Hey @Wilson Bilkovich, what is your use case? Connecting an agent to server?
w
I’ve got Agent and Server running via the Helm chart on a K8s cluster, and I want to configure developer laptops to point at them
Install was via:
Copy code
CHART_NS=prefect
CHART_NAME=prefect-server-initial
helm install \
--namespace ${CHART_NS} \
--set ui.apolloApiUrl=http://${CHART_NAME}-apollo:4200/graphql \
--set agent.enabled=true \
--set jobs.createTenant.enabled=true \
${CHART_NAME} \
prefecthq/prefect-server
I have:
Copy code
[server]
endpoint = "<http://prefect-server-initial-apollo:4200/graphql/>"
in my
~/.prefect/config.toml
and that seems to work, and it made me wish I could browse a reference page listing all the knobs
Also the docs say things like:
Copy code
To configure a secret locally (not using Prefect Cloud), you can set the value in your Prefect configuration file through either the ~/.prefect/config.toml file or an environment variable.
but it doesn’t show an example of setting a secret via the config file, which I’d like to do
k
Ah ok for the secrets it’s here
w
Yeah that’s actually the section I’m quoting; see that it only offers an example of using env variables, but just refers to the config file as an option?
Copy code
export PREFECT__CONTEXT__SECRETS__MYSECRET="MY SECRET VALUE"
I guess the structure of that suggests that in the config file it should be:
Copy code
[context]
  [secrets]
    mysecret = "my secret value"
but that’s just a guess
k
Whoops sorry dunno what happened but the version I was looking at had the config.toml example. dunno what happened when i refreshed but it’s
Copy code
[context.secrets]
  mysecret = "my secret value"
i think your syntax will work also
w
Ok cool
Weird, I wonder why your version looks different. Mine lacks that detail box.
k
I know I refresh and it’s not there. It’s been funky. The Configuration Options also points to the config.toml in github that gives you configurations (though secrets aren’t there)
w
Aha, this one in github is what I was looking for. Thanks!
Oh hmm, so you can set host + port, but if you set endpoint it overrides/ignores them? I am not sure I love that.
k
I think it’s really just the endpoint that matters yep.