小编Sta*_*zer的帖子

使用 ALB 重定向到外部资源的入口

我在集群上运行了一些服务,并且 ALB 工作正常。但是我有一个 CloudFront 发行版,由于一些内部因素,我想使用集群作为入口点。因此,我正在尝试添加一个入口,以根据默认规则或命名主机将请求重定向到 CloudFront 分配,两者都可以工作。

我尝试了两种不同的方法,但没有骰子:

创建外部名称和入口:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: test-ingress
  namespace: default
annotations:
  kubernetes.io/ingress.class: alb
  alb.ingress.kubernetes.io/scheme: "internet-facing"
  alb.ingress.kubernetes.io/listen-ports: '[{"HTTP":80,"HTTPS": 443}]'
  alb.ingress.kubernetes.io/certificate-arn: <my-cert-arn>
  alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect", "RedirectConfig": { 
  "Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_301"}}'
  alb.ingress.kubernetes.io/group.name: <my-group-name>
spec:
  rules:
    - host: test.my-host.net
      HTTP:
        paths:
          - backend:
              serviceName: test
              servicePort: use-annotation
            path: /
---
apiVersion: v1
kind: Service
metadata:
  name: test
spec:
  type: ExternalName
  externalName: test.my-host.net
Run Code Online (Sandbox Code Playgroud)

我还尝试使用 ALB Ingress v2 上的注释重定向创建入口,就像文档一样:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: …
Run Code Online (Sandbox Code Playgroud)

amazon-cloudfront kubernetes kubernetes-ingress amazon-eks

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

在 configmap 上注入 helm 值时出现问题

有人可以帮忙吗?我试图在配置映射上注入舵值,但它破坏了格式。如果我直接使用该值而不是 .Values,它可以正常工作。

我拥有的:

data:
  application.instanceLabelKey: argocd.argoproj.io/instance
  oidc.config: |
    name: Okta
    issuer: https://mycompany.okta.com
    clientID: {{ .Values.okta.clientID }}
    clientSecret: {{ .Values.okta.clientSecret }}
    requestedScopes: ["openid", "profile", "email", "groups"]
    requestedIDTokenClaims: {"groups": {"essential": true}}
Run Code Online (Sandbox Code Playgroud)

结果

data:
  application.instanceLabelKey: argocd.argoproj.io/instance
  oidc.config: "name: Okta\nissuer: https://mycompany.okta.com\nclientID: myClientId \nclientSecret:
    mySecret\nrequestedScopes: [\"openid\", \"profile\",
    \"email\", \"groups\"]\nrequestedIDTokenClaims: {\"groups\": {\"essential\": true}}\n"
Run Code Online (Sandbox Code Playgroud)

kubernetes kubernetes-helm argocd helm3

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

Terraform 输出被标记为敏感

我们为不同的领域创建了一些 terraform 堆栈,例如用于 vpc 的网络堆栈、用于 rds 内容的 rds 堆栈等。

\n

例如,rds 堆栈依赖于网络堆栈从输出中获取值:

\n

网络堆栈的输出:

\n
output "public_subnets" {\n  value = aws_subnet.public.*.id\n}\n\noutput "private_subnets" {\n  value = aws_subnet.private.*.id\n}\n\noutput "data_subnets" {\n  value = aws_subnet.data.*.id\n}\n\n... an so on\n
Run Code Online (Sandbox Code Playgroud)\n

rds 堆栈将点击输出

\n
data "tfe_outputs" "networking" {\n  organization = "my-tf-cloud-org"\n  workspace    = "network-production-eucentral1"\n}\n
Run Code Online (Sandbox Code Playgroud)\n

但是当我尝试使用输出时:

\n
\xe2\x94\x82\n\xe2\x94\x82   on main.tf line 20, in module "db":\n\xe2\x94\x82   20:   base_domain = data.tfe_outputs.dns.values.fqdn\n\xe2\x94\x82     \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\n\xe2\x94\x82     \xe2\x94\x82 data.tfe_outputs.dns.values has a sensitive value\n\xe2\x94\x82\n\xe2\x94\x82 This object does not have an attribute named "fqdn".\n\xe2\x95\xb5\n\xe2\x95\xb7\n\xe2\x94\x82 Error: …
Run Code Online (Sandbox Code Playgroud)

terraform terraform-enterprise terraform-cloud

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