我的 Ansible AWX 本地设置遇到错误。psycopg.OperationalError: connection failed: password authentication failed for user "awx"
这之前是有效的,但是在我尝试调试另一个问题时重新创建 Pod 后,现在我的 ansible-awx-web Pod 中出现错误。
我在论坛上读到删除 PVC 并再次应用 AWX 清单可以解决问题,但对我来说情况并非如此。
Awx-Operator version 2.9.0
Kubernetes v1.28.2
awx.yaml(无秘密)
---
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
name: ansible-awx
namespace: awx
spec:
service_type: nodeport
postgres_storage_class: local-storage
没有在秘密文件中明确列出数据库用户/密码
kubectl 获取 pod -n awx
NAME READY STATUS RESTARTS AGE
ansible-awx-postgres-13-0 1/1 Running 0 14h
ansible-awx-task-cd6c58fc6-qh5j6 4/4 Running 0 18h
ansible-awx-web-86f59df-h9mtg 2/3 CrashLoopBackOff 89 (96s ago) 18h
awx-operator-controller-manager-5bcd47d577-598rp 2/2 Running 0 18h
带有秘密的 awx.yaml
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
name: ansible-awx
namespace: awx
spec:
service_type: nodeport
postgres_storage_class: local-storage
postgres_configuration_secret: awx-postgres-configuration
秘密.yaml
apiVersion: v1
kind: Secret
metadata:
name: awx-postgres-configuration
namespace: awx
stringData:
database: "awx"
username: "awx"
password: {{password}}
sslmode: prefer
type: unmanaged
type: Opaque
如果我运行 kubectl get pods -n awx ,我只能让 awx-operator pod 运行。我的秘密做错了什么?
NAME READY STATUS RESTARTS AGE
awx-operator-controller-manager-5bcd47d577-lscqf 2/2 Running 0 2m20s