我正在尝试通过 terraform 设置舵和舵版本,按照terraform plan
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# helm_release.prometheus_vsi will be created
+ resource "helm_release" "prometheus_vsi" {
+ chart = "stable/prometheus"
+ disable_webhooks = false
+ force_update = false
+ id = (known after apply)
+ metadata = (known after apply)
+ name = "prometheus-vsi"
+ namespace = "prometheus"
+ recreate_pods = false
+ repository = "stable"
+ reuse = false
+ reuse_values = false
+ status = "DEPLOYED"
+ timeout = 300
+ values = [
+ <<~EOT
rbac:
create: true
enabled: false
EOT,
]
+ verify = false
+ version = "10.2.0"
+ wait = true
}
Plan: 1 to add, 0 to change, 0 to destroy.
但是当我运行时terraform apply
"恐慌输出"中提到的抛出错误。
地形版本
地形 v0.12.18 + provider.aws v2.43.0 + 提供者.helm v0.10.4 + provider.kubernetes v1.10.0 + 提供程序.本地 v1.4.0 + 提供者.null v2.1.2 + 提供者随机 v2.2.1 + 提供者模板 v2.1.2
您的 Terraform 版本已过时!最新版本 为 0.12.19。您可以通过从 https://www.terraform.io/downloads.html 下载进行更新
受影响的资源
- helm_release
地形配置文件
provider "helm" {
version = "~> 0.10"
install_tiller = true
service_account = local.helm_service_account_name
debug = true
kubernetes {
config_path = "${path.module}/kubeconfig_${module.eks.kubeconfig}"
}
}
data "helm_repository" "stable" {
name = "stable"
url = "https://kubernetes-charts.storage.googleapis.com"
}
resource "helm_release" "prometheus_vsi" {
name = "prometheus-vsi"
repository = data.helm_repository.stable.metadata[0].name
chart = "stable/prometheus"
namespace = local.prometheus_ns
version = "10.2.0"
values = [
"${file("${local.chart_root}/prometheus/prometheus-values.yaml")}"
]
}
调试输出
我启用了debug=true
但它没有产生舵机特定的日志
紧急输出
Error: error installing: the server could not find the requested resource (post deployments.apps)
on main.tf line 205, in resource "helm_release" "prometheus_vsi":
205: resource "helm_release" "prometheus_vsi" {
预期行为
根据terraform plan
它应该在 kubernetes 中创建helm_release
。
实际行为
地形应用抛出错误。
重现步骤
terraform apply
谢谢。
稳定存储库已弃用,所有图表均已于 2020 年 11 月删除。
试试图表:prometheus-community/kube-prometheus-stack
网址: https://prometheus-community.github.io/helm-charts