- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
您好,我目前正在尝试通过 gitlab CI 作业部署 postgresql-ha(更具体地说是 bitnami/postgresql-ha)helm chart。
在本地,当运行 helm install postgresql ./postgresql-ha
时,我能够在我的远程 Kubernetes 集群上成功创建图表,没有任何错误。
./postgresql-ha
是未修改的 bitnami/postgresql-ha
。
当我尝试在 Gitlab 的 CI 中运行相同的命令,并正确设置 helm
和 kubectl
时,我收到此错误:
Release "postgresql" does not exist. Installing it now.
Error: template: postgresql-ha/templates/NOTES.txt:60:4: executing "postgresql-ha/templates/NOTES.txt" at <include "postgresql-ha.validateValues" .>: error calling include: template: postgresql-ha/templates/_helpers.tpl:682:51: executing "postgresql-ha.validateValues" at <fail>: error calling fail:
VALUES VALIDATION:
postgresql-ha: Nodes hostnames
PostgreSQL nodes hostnames exceeds the characters limit for Pgpool: 128.
Consider using a shorter release name or namespace.
第一行验证 kubectl/helm 配置。
##########
# Stages #
##########
stages:
- deploy charts
########
# Jobs #
########
deploy_postgresql-ha:
image: dtzar/helm-kubectl:3.0.0
stage: deploy charts
environment:
name: production
script:
- helm upgrade --install postgresql ./postgresql-ha
Kubernetes 集群是通过 Gitlab 的 Kubernetes 集成工具创建的,因此已经根据 this Gitlab Documentation page 进行了设置。 .
在此先感谢您的帮助!
最佳答案
似乎 pgpool 上有一个错误:
由于缓冲区较小,使用长主机名进行 ping 探测失败pgpool 调用“ping -q -c3”并解析结果以确定主机是启动还是关闭。不幸的是,它使用相当小的缓冲区来读取输出,并且 ping 命令的最后一行可能会被截断。这意味着 pgpool 假定主机已关闭。
Bitnami 升级了代码,现在不再允许使用长主机名。 Nodehostname由以下几个部分组成,所以你可以调整:
$nodeHostname := printf "%s-00.%s.%s.svc.%s:1234" $postgresqlFullname $postgresqlHeadlessServiceName $releaseNamespace $clusterDomain }}
https://github.com/bitnami/charts/blob/master/bitnami/postgresql-ha/templates/_helpers.tpl
关于postgresql - 在 Gitlab CI 中部署 helm chart 时如何修复节点主机名太长,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59092737/
我是一名优秀的程序员,十分优秀!