Alan
03/20/2025, 9:57 PMTraceback (most recent call last):
File "/usr/local/bin/prefect", line 5, in <module>
from prefect.cli import app
File "/usr/local/lib/python3.11/site-packages/prefect/__init__.py", line 79, in <module>
prefect.logging.configuration.setup_logging()
File "/usr/local/lib/python3.11/site-packages/prefect/logging/configuration.py", line 75, in setup_logging
config = load_logging_config(
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/logging/configuration.py", line 40, in load_logging_config
{
File "/usr/local/lib/python3.11/site-packages/prefect/logging/configuration.py", line 43, in <dictcomp>
if setting.value() is not None
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/settings.py", line 177, in value
return self.value_from(get_current_settings(), bypass_callback=bypass_callback)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/settings.py", line 189, in value_from
value = settings.value_of(self, bypass_callback=bypass_callback)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/settings.py", line 1828, in value_of
value = setting.value_callback(self, value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/settings.py", line 448, in default_database_connection_url
return templater(settings, value)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/settings.py", line 348, in templater
return original_type(template.substitute(template_values))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/string.py", line 121, in substitute
return self.pattern.sub(convert, self.template)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/string.py", line 114, in convert
return str(mapping[named])
~~~~~~~^^^^^^^
KeyError: 'KRF'
The issue is odd, because I have a valid connection string defined for the database. I have inspected the connection-string and password and they are working, however, for some reason the server gives this error:
[ec2-user@ip-172-31-5-171 terraform_eks]$ kubectl get secrets
NAME TYPE DATA AGE
prefect-api-key Opaque 1 25h
sh.helm.release.v1.prefect-server.v1 <http://helm.sh/release.v1|helm.sh/release.v1> 1 82m
sh.helm.release.v1.prefect-server.v2 <http://helm.sh/release.v1|helm.sh/release.v1> 1 81m
sh.helm.release.v1.prefect-server.v3 <http://helm.sh/release.v1|helm.sh/release.v1> 1 72m
sh.helm.release.v1.prefect-worker-default.v1 <http://helm.sh/release.v1|helm.sh/release.v1> 1 82m
sh.helm.release.v1.prefect-worker-work-cpu-karpenter-nodepool-cpu-4x.v1 <http://helm.sh/release.v1|helm.sh/release.v1> 1 82m
sh.helm.release.v1.prefect-worker-work-gpu-karpenter-nodepool-gpu-2x.v1 <http://helm.sh/release.v1|helm.sh/release.v1> 1 82m
test-connection-string Opaque 2 25h
[ec2-user@ip-172-31-5-171 terraform_eks]$ kubectl describe secrets test-connection-string
Name: test-connection-string
Namespace: test-prefect
Labels: <none>
Annotations: <none>
Type: Opaque
Data
====
connection-string: 144 bytes
password: 40 bytes
[ec2-user@ip-172-31-5-171 terraform_eks]$
How can I remedy this?Edward Park
03/20/2025, 10:16 PMAlan
03/20/2025, 10:18 PM# Postgresql configuration
postgresql:
enabled: true
auth:
# -- determines whether an admin user is created within postgres
enablePostgresUser: false
# -- name for a custom database
database: server
# -- name for a custom user
username: prefect
## This is the password for `username` and will be set within the secret `{fullnameOverride}-postgresql` at the key `password`.
## This argument is only relevant when using the Postgres database included in the chart.
## For an external postgres connection, you must create and use `existingSecret` instead.
# -- password for the custom user. Ignored if `auth.existingSecret` with key `password` is provided
password: not-used
## This secret must contain two key-value pairs where the first key is `connection-string` and the value is the
## connection string containing your password (e.g. postgresql+asyncpg://{username}:{password}@{hostname}/{database}).
## The second key-value pair has the key `password` and the value is the {password} used in the connection string
# -- Name of existing secret to use for PostgreSQL credentials.
existingSecret: ${EXISTING_SECRET}
# -- PostgreSQL container port
containerPorts:
postgresql: 5432
# externalHostname defines the address to contact an externally
# managed postgres database instance at. This is not required if
# `internalPostgres` is `true`
externalHostname: ""
# -- enable use of bitnami/postgresql subchart
useSubChart: false
Edward Park
03/20/2025, 10:26 PMAlan
03/20/2025, 10:27 PMAlan
03/20/2025, 10:28 PMEdward Park
03/20/2025, 10:33 PMAlan
03/20/2025, 10:42 PMAlan
03/20/2025, 10:43 PMAlan
03/20/2025, 10:43 PMAlan
03/20/2025, 10:44 PMw<:?yZSqZ.....
Alan
03/20/2025, 10:44 PM