Replies: 6 comments 11 replies
-
I don't think we should do this as this would mean there are hardcoded passwords, we should use trigger authentication instead (which should already be supported I think) |
Beta Was this translation helpful? Give feedback.
-
this is also not really a bug as |
Beta Was this translation helpful? Give feedback.
-
https://github.com/kedacore/keda-docs/blame/main/content/docs/2.9/scalers/postgresql.md#L81 |
Beta Was this translation helpful? Give feedback.
-
The docs that you are referring to is purely for TriggerAuthentication and not for trigger metadata. |
Beta Was this translation helpful? Give feedback.
-
HI Team , any solution for this issue I am facing the same issue when I provide postgres data base details |
Beta Was this translation helpful? Give feedback.
-
@Sathya-omnius @JorTurFer @tomkerkhove I have the same problem "**server error (FATAL: no pg_hba.conf entry for host "10.75.9.197**" I don't see anything wrong in this config, please let me know if there are any issues here. I tried both passwordFromEnv and TriggerAuthentication, and it does have the same error. Looks like the password is getting fetched. apiVersion: v1
kind: Secret
metadata:
name: test-db-secret
namespace: dev
type: Opaque
data:
PG_PASSWORD: "G3BuGGDdBdjZmcw=="
---
apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
name: keda-trigger-auth-postgres-secret
namespace: dev
spec:
secretTargetRef:
- parameter: password
name: test-db-secret
key: PG_PASSWORD
env:
- parameter: password
name: PG_PASSWORD
containerName: test-app
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: test-app
namespace: dev
spec:
replicas: 1
selector:
matchLabels:
app: test-app
template:
metadata:
labels:
app: test-app
spec:
containers:
- name: test-app
image: linuxacademycontent/store-products:1.0.0
ports:
- containerPort: 80
envFrom:
- secretRef:
name: test-db-secret
---
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: test-app
spec:
scaleTargetRef:
name: test-app
pollingInterval: 10
cooldownPeriod: 30
maxReplicaCount: 2
minReplicaCount: 0
triggers:
- type: postgresql
metadata:
userName: testuser
host: test_host
port: "5432"
dbName: test_db
sslmode: disable
query: "SELECT ceil(message_count) as message_count FROM instance"
targetQueryValue: "1"
authenticationRef:
name: keda-trigger-auth-postgres-secret
|
Beta Was this translation helpful? Give feedback.
-
Report
when i set scaledobject.spec.triggers.passowrd as connection password, it's not work ❌, the log shows "password" are not set;
when i set scaledobject.spec.triggers.passowrdFromEnv as connection password, it's worked fine ✅;
Expected Behavior
the scaledobject.spec.triggers.passowrd works as expect
Actual Behavior
see report
Steps to Reproduce the Problem
Logs from KEDA operator
KEDA Version
2.8.0
Kubernetes Version
1.23
Platform
Other
Scaler Details
postgresql
Anything else?
No response
Beta Was this translation helpful? Give feedback.
All reactions