首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用terraform安装Gitlab时出现DNS-1035错误

使用terraform安装Gitlab时出现DNS-1035错误
EN

Stack Overflow用户
提问于 2020-11-18 17:33:34
回答 1查看 422关注 0票数 0

使用terraform安装gitlab时出错

服务"test-gitlab.postgres.database.azure.com-headless“无效: metadata.name:无效值:"test-gitlab.postgres.database.azure.com-headless":a DNS-1035标签必须由小写字母数字字符或'-‘组成,以字母数字字符开头,以字母数字字符结尾(例如'my-name’或'abc-123',用于验证的正则表达式是‘abc?’)

我试图使用terraform安装带有舵图4.4.4版的Gitlab,当我尝试使用持久postgres数据库安装时,我得到了postgres主机名的这个错误,下面是我的values.yaml文件。如果我不使用持久的postgres,它是有效的。错误说明标签必须使用小写字符,但我只使用小写,不知道为什么会抛出错误。同样在错误中,"-headless“被添加到postgres主机名,这不是我从任何地方添加的,它也从构建到构建。

配置

代码语言:javascript
复制
global:
  edition: ce
  psql:
    password:
      secret: gitlabsecret
      key: gitlab-password
    host: test-gitlab.postgres.database.azure.com
    port: 5432
    username: postgres@test-gitlab
    database: postgres

使用版本

AKS

  • Kubernetes:
  • 图表: 4.4.4
  • Cloud:
  • 1.10
  • Helm: 1.3.2

错误日志

代码语言:javascript
复制
2020-11-18T16:55:18.313Z [DEBUG] plugin.terraform-provider-helm_v1.3.2_x4: 2020/11/18 16:55:18 [DEBUG] [resourceReleaseExists: gitlab] Done
2020-11-18T16:55:18.313Z [DEBUG] plugin.terraform-provider-helm_v1.3.2_x4: 2020/11/18 16:55:18 [DEBUG] [resourceReleaseCreate: gitlab] Release was created but returned an error
2020/11/18 16:55:18 [DEBUG] helm_release.gitlab: apply errored, but we're indicating that via the Error pointer rather than returning it: Service "test-gitlab.postgres.database.azure.com-headless" is invalid: metadata.name: Invalid value: "test-gitlab.postgres.database.azure.com-headless": a DNS-1035 label must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character (e.g. 'my-name',  or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?')
2020/11/18 16:55:18 [TRACE] <root>: eval: *terraform.EvalMaybeTainted
2020/11/18 16:55:18 [ERROR] <root>: eval: *terraform.EvalApplyPost, err: Service "test-gitlab.postgres.database.azure.com-headless" is invalid: metadata.name: Invalid value: "test-gitlab.postgres.database.azure.com-headless": a DNS-1035 label must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character (e.g. 'my-name',  or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?')
2020/11/18 16:55:18 [ERROR] <root>: eval: *terraform.EvalSequence, err: Service "test-gitlab.postgres.database.azure.com-headless" is invalid: metadata.name: Invalid value: "test-gitlab.postgres.database.azure.com-headless": a DNS-1035 label must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character (e.g. 'my-name',  or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?')

Error: Service "test-gitlab.postgres.database.azure.com-headless" is invalid: metadata.name: Invalid value: "test-gitlab.postgres.database.azure.com-headless": a DNS-1035 label must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character (e.g. 'my-name',  or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?')
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-11-19 12:55:13

我通过在values.yaml中显式地将postgres安装设置为false来解决问题。

代码语言:javascript
复制
global:
  edition: ce
  psql:
    password:
      secret: gitlabsecret
      key: gitlab-password
    host: test-gitlab.postgres.database.azure.com
    port: 5432
    username: postgres@test-gitlab
    database: postgres
postgresql:
  install: false
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64898268

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档