argo服务器pod副本无法通过postgres实例进行身份验证,导致pod状态为"CrashLoopBack



我正在运行一个EKS集群,并通过bitnami helm图表在一个3节点集群(跨不同AZ运行的节点(上安装argo工作流。

当使用values.yml中的所有默认值运行时,一切都非常正常。但是,当我在values.yml中将server.replicaCount从1增加到3以增加argo服务器副本时,另外两个副本不断以CrashLoopBackOff状态崩溃。

对正在崩溃的pod运行kubectl logs,我可以看到它们无法通过postgres容器进行身份验证。以下是日志的输出:

time="2022-01-05T03:50:16.921Z" level=info msg="not enabling pprof debug endpoints"
time="2022-01-05T03:50:16.924Z" level=info authModes="[client]" baseHRef=/ managedNamespace= namespace=argo secure=false
time="2022-01-05T03:50:16.924Z" level=warning msg="You are running in insecure mode. Learn how to enable transport layer security: https://argoproj.github.io/argo-workflows/tls/"
time="2022-01-05T03:50:16.924Z" level=info msg="config map" name=argo-workflows-controller
time="2022-01-05T03:50:16.924Z" level=info msg="SSO disabled"
time="2022-01-05T03:50:16.956Z" level=info msg="Starting Argo Server" instanceID= version=v3.2.6
time="2022-01-05T03:50:16.956Z" level=info msg="Creating DB session"
time="2022-01-05T03:50:16.980Z" level=fatal msg="pq: password authentication failed for user "postgres""

你知道为什么复制品无法通过postgres容器进行身份验证吗?非副本容器没有这个问题,并且连接良好。我还尝试通过覆盖values.yml中的postgresql.postgresqlPassword值来手动设置密码,但我得到了相同的结果。对于k8s来说,这是一个很新的问题,所以不确定如何在这一点之后更好地解决这个问题。

我还意识到,当我输入这个时,副本控制器也经历了同样的行为。以下是发生故障的控制器的日志:

time="2022-01-05T21:59:00Z" level=info msg="index config" indexWorkflowSemaphoreKeys=true
time="2022-01-05T21:59:00Z" level=info msg="cron config" cronSyncPeriod=10s
time="2022-01-05T21:59:00.994Z" level=info msg="not enabling pprof debug endpoints"
time="2022-01-05T21:59:00.996Z" level=info msg="config map" name=argo-workflows-controller
time="2022-01-05T21:59:01.027Z" level=info msg="Get configmaps 200"
time="2022-01-05T21:59:01.038Z" level=info msg="Configuration:nartifactRepository: {}ncontainerRuntimeExecutor: k8sapinexecutor:n  name: ""n  resources: {}ninitialDelay: 0snmetricsConfig: {}nnodeEvents: {}npersistence:n  connectionPool:n    maxIdleConns: 100n  postgresql:n    database: bn_argo_workflowsn    host: argo-workflows-postgresqln    passwordSecret:n      key: postgresql-passwordn      name: argo-workflows-postgresqln    port: 5432n    tableName: argo_workflowsn    userNameSecret:n      key: usernamen      name: argo-workflows-controller-databasenpodSpecLogStrategy: {}ntelemetryConfig: {}n"
time="2022-01-05T21:59:01.038Z" level=info msg="Persistence configuration enabled"
time="2022-01-05T21:59:01.038Z" level=info msg="Creating DB session"
time="2022-01-05T21:59:01.044Z" level=info msg="Get secrets 200"
time="2022-01-05T21:59:01.049Z" level=info msg="Get secrets 200"
time="2022-01-05T21:59:01.054Z" level=fatal msg="Failed to update config: pq: password authentication failed for user "postgres""

我在GKE上复制了这个问题,我看不到用户"postgres"有任何错误。采取的步骤:

  • 从README到安装的步骤
  • 在本地创建值.yaml
  • $ helm upgrade my-release bitnami/argo-workflows -f values.yaml --set server.replicaCount=3
  • kubectl获取pod

我可以看到所有3个副本都在运行,没有任何错误:

$ kubectl get pods
NAME                                                   READY   STATUS    RESTARTS   AGE
my-release-argo-workflows-controller-f5d748797-pkv99   1/1     Running   0          23m
my-release-argo-workflows-server-669c54dddb-l5c9b      1/1     Running   0          23m
my-release-argo-workflows-server-669c54dddb-nqvn2      1/1     Running   0          2m16s
my-release-argo-workflows-server-669c54dddb-w6ftl      1/1     Running   0          2m16s
my-release-postgresql-0                                1/1     Running   0          31m

如果您仍然面临这个问题,请在GitHub的bitnami图表下打开新的issue请求,或在此处更新您的案例以复制更多详细信息。

最新更新