使用 terraform 安装 Gitlab 时出现 DNS-1035 错误
Getting DNS-1035 error while installing Gitlab using terraform
使用 terraform 安装 gitlab 时出现错误
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?')
我正在尝试使用 terraform 安装带有 helm chart 版本 4.4.4 的 Gitlab,当我尝试使用持久性 postgres 数据库安装时,我收到 postgres 主机名的错误,下面是我的 values.yaml 文件。
如果我不使用持久性 postgres,它就可以工作。
错误说标签必须使用小写字符,但我只使用小写字母不知道为什么会抛出错误。同样在错误“-headless”被添加到我没有从任何地方添加的 postgres 主机名中,它也会随着构建而变化。
Configuration used
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
使用的版本
- 图表:4.4.4
- 云:AKS
- Kubernetes:1.10
- 头盔:1.3.2
错误日志
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])?')
我通过在 values.yaml 中将 postgres 安装显式设置为 false 解决了问题。
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
使用 terraform 安装 gitlab 时出现错误
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?')
我正在尝试使用 terraform 安装带有 helm chart 版本 4.4.4 的 Gitlab,当我尝试使用持久性 postgres 数据库安装时,我收到 postgres 主机名的错误,下面是我的 values.yaml 文件。 如果我不使用持久性 postgres,它就可以工作。 错误说标签必须使用小写字符,但我只使用小写字母不知道为什么会抛出错误。同样在错误“-headless”被添加到我没有从任何地方添加的 postgres 主机名中,它也会随着构建而变化。
Configuration used
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
使用的版本
- 图表:4.4.4
- 云:AKS
- Kubernetes:1.10
- 头盔:1.3.2
错误日志
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])?')
我通过在 values.yaml 中将 postgres 安装显式设置为 false 解决了问题。
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