首先对使用 helm 有点新意...
所以我正在努力获得这个的掌舵部署:https : //github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack
在我的 kubernetes 集群中按照我想要的方式工作。我喜欢它到目前为止所做的事情,但我怎样才能让它刮掉一个自定义端点?我见过这个:https : //github.com/prometheus-community/helm-charts/tree/main/charts/prometheus
在标题为“通过注释抓取 Pod 指标”的部分下。我在 kubernetes 的 pod 部署(然后是节点端口服务)中添加了以下注释:
annotations = {
"prometheus.io/scrape" = "true"
"prometheus.io/path" = "/appMetrics/prometheusMetrics"
"prometheus.io/port" = "443"
}
Run Code Online (Sandbox Code Playgroud)
但是,当我查看targets普罗米修斯的页面时,我在那里看不到它。我也没有在配置文件中看到它。所以这让我觉得这个掌舵图表没有部署相同的prometheus图表。
所以现在的问题是,如何使用 helm chart 设置自定义抓取端点kube-prometheus-stack。从我的阅读来看,这是我应该*使用的,对吗?
我被卡住了,真的可以在这个问题上使用一些帮助。我正在使用 PHP 和 Imagick 生成一个运行良好的缩略图。但是,我注意到 CMYK PDF 总是以灰度生成。因此,我通过获取 CMYK PDF 并使用 Adobe Acrobat Pro 手动将其转换为 RGB 来对此进行测试。然后我通过以下代码重新运行它并生成了一个彩色图像。我知道
$image->transformImageColorSpace(1);
or
$image->setImageColorSpace(1);
Run Code Online (Sandbox Code Playgroud)
然而这行不通。将 pdf 转换为彩色 PNG 图像的正确方法是什么?我查看了以下链接但没有运气:
http://php.net/manual/en/imagick.setimagecolorspace.php
使用 PHP 和 ImageMagick 将 PDF 转换为 JPEG
对此的任何帮助都会很棒。
这是代码:
$filePath = fileSaveUserUpload("path/to/file", ""); //path changed here...
$_SESSION['FILEPATH'] = $filePath;
//-------------first makes a thumbnail of first page in image/pdf
$extension_pos = strrpos($filePath, '.'); // find position (number) of the last dot, so where the extension starts
$image = new Imagick();
$image->readImage($filePath."[0]"); //reads …Run Code Online (Sandbox Code Playgroud) 我一生都无法让它发挥作用。我需要AWS_PROFILE设置环境变量才能使 terragrunt 正常运行。如果我运行:
export AWS_PROFILE=myprofile; terragrunt plan
Run Code Online (Sandbox Code Playgroud)
这会起作用,但这不是我想要的只是运行:
terragrunt plan
Run Code Online (Sandbox Code Playgroud)
并让其自动选择我应该使用的正确的 aws 配置文件。这是我所拥有的:
generate "provider" {
path = "provider.tf"
if_exists = "overwrite_terragrunt"
contents = <<EOF
provider "aws" {
region = "${local.region}"
profile = "${trimspace(run_cmd("bash", "${get_parent_terragrunt_dir()}/../../set_profile.sh",local.profile))}"
}
EOF
}
remote_state {
backend = "s3"
generate = {
path = "backend.tf"
if_exists = "overwrite"
}
config = {
...
...
region = local.region
profile = local.profile
...
...
}
}
Run Code Online (Sandbox Code Playgroud)
它总是向我抛出错误:
Error finding AWS credentials (did you set the AWS_ACCESS_KEY_ID …Run Code Online (Sandbox Code Playgroud) cmyk ×1
ghostscript ×1
imagick ×1
kubernetes ×1
php ×1
prometheus ×1
terraform ×1
terragrunt ×1