小编use*_*360的帖子

terraform中是否有方法和/或条件运算符?

有没有办法在Terraform中使用这样的东西?

count ="$ {var.I_am_true}"&&"$ {var.I_am_false}"

terraform

15
推荐指数
4
解决办法
2万
查看次数

如何比较一个字符以检查它是否为空?

我尝试了下面的内容,但Eclipse为此抛出了一个错误.

while((s.charAt(j)== null)
Run Code Online (Sandbox Code Playgroud)

检查角色是否正确的正确方法是null什么?

java

7
推荐指数
3
解决办法
6万
查看次数

在terraform中使用count.index吗?

我正在尝试从模板生成一堆文件-我需要用count.index替换硬编码的1,不确定terraform允许使用什么格式。

resource "local_file" "foo" {
  count = "${length(var.files)}"

  content  = "${data.template_file.tenant_repo_multi.1.rendered}"
  #TODO: Replace 1 with count index.
  filename = "${element(var.files, count.index)}"
}


data "template_file" "tenant_repo_multi" {

  count = "${length(var.files)}"
  template = "${file("templates/${element(var.files, count.index)}")}"

}

variable "files" {
  type    = "list"
  default = ["filebeat-config_filebeat.yml",...]
}
Run Code Online (Sandbox Code Playgroud)

我在跑步

Terraform v0.11.7
+ provider.gitlab v1.0.0
+ provider.local v1.1.0
+ provider.template v1.0.0
Run Code Online (Sandbox Code Playgroud)

terraform terraform-template-file

6
推荐指数
1
解决办法
9246
查看次数

如何在gitlab中找到推送提交的真实用户?

有没有办法找出谁将特定提交推送到gitlab - 在提交日志中(我看到作者通过git客户端配置设置),我想要看看哪个gitlab用户的身份验证用于PUSH该代码?

PS:提出了多个git特定问题,并且在之前的问题中没有提供解决方案 - 想看看是否gitlab有一些特定的实现来解决这个问题?

gitlab

6
推荐指数
2
解决办法
371
查看次数

我在哪里可以找到 systemd 节点导出器指标列表?

我四处查看和搜索,找不到节点导出器公开的 systemd 指标列表?

systemd prometheus prometheus-node-exporter

5
推荐指数
2
解决办法
6956
查看次数

有没有办法强制删除 webhook 失败的 crd?

在这种情况下,kubedb操作符已经崩溃并且没有响应——但是我需要清理这些资源。

 k delete redis r1 redis-queue --namespace cts --force --grace-period=0
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
Error from server (InternalError): Internal error occurred: failed calling webhook "redis.validators.kubedb.com": the server is currently unable to handle the request
Error from server (InternalError): Internal error occurred: failed calling webhook "redis.validators.kubedb.com": the server is currently unable to handle the request

Run Code Online (Sandbox Code Playgroud)

kubernetes kubernetes-operator kubedb

5
推荐指数
1
解决办法
3055
查看次数

Django 应用程序部署不加载静态文件

我有一个 django 应用程序,它有 angular 和 bootstrap。这是我的设置的定义方式:

# Django settings for studentsite project.
import os

PROJECT_DIR = os.path.dirname(__file__)
DEBUG = True
TEMPLATE_DEBUG = DEBUG

ADMINS = (
    # ('Your Name', 'your_email@example.com'),
)

MANAGERS = ADMINS

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': 'texascompletesdb',                      # Or path to database file if using sqlite3.
        # The following settings are not used with sqlite3:
        'USER': 'postgres',
        'PASSWORD': 'password',
        'HOST': 'localhost',                      # Empty for localhost through domain …
Run Code Online (Sandbox Code Playgroud)

django django-deployment

3
推荐指数
1
解决办法
2532
查看次数

kubectl是当前内存/ CPU值最高的吗?

kubectl是当前内存/ CPU的最高值,还是某个时间段的平均值?

kubernetes kubectl

3
推荐指数
1
解决办法
618
查看次数