base: шаблоны Kafka и MinIO в Vault читают и старый формат (auth.*, client.*, access_key, buckets, topics), и v2 (bootstrap_servers, endpoint, access_key_id, bucket); для старого формата вывод не меняется
This commit is contained in:
parent
9cb01669e3
commit
72ce0cbfca
@ -112,18 +112,18 @@ spec:
|
||||
vault.hashicorp.com/agent-inject-secret-contracts-s3: secrets/data/minio/apps/contracts
|
||||
vault.hashicorp.com/agent-inject-template-contracts-s3: |-
|
||||
{{- with secret "secrets/data/minio/apps/contracts" -}}
|
||||
CONTRACTS_S3_ENDPOINT={{ index .Data.data.client "endpoint" }}
|
||||
CONTRACTS_S3_REGION={{ index .Data.data.client "region" }}
|
||||
CONTRACTS_S3_ENDPOINT={{ with index .Data.data "client" }}{{ index . "endpoint" }}{{ else }}{{ index .Data.data "endpoint" }}{{ end }}
|
||||
CONTRACTS_S3_REGION={{ with index .Data.data "client" }}{{ index . "region" }}{{ else }}{{ index .Data.data "region" }}{{ end }}
|
||||
CONTRACTS_S3_BUCKET=contracts
|
||||
CONTRACTS_S3_ACCESS_KEY_ID={{ index .Data.data "access_key" }}
|
||||
CONTRACTS_S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_key" }}
|
||||
CONTRACTS_S3_ACCESS_KEY_ID={{ or (index .Data.data "access_key") (index .Data.data "access_key_id") }}
|
||||
CONTRACTS_S3_SECRET_ACCESS_KEY={{ or (index .Data.data "secret_key") (index .Data.data "secret_access_key") }}
|
||||
{{- end -}}
|
||||
vault.hashicorp.com/agent-inject-secret-contracts-kafka: secrets/data/kafka/apps/contracts
|
||||
vault.hashicorp.com/agent-inject-template-contracts-kafka: |-
|
||||
{{- with secret "secrets/data/kafka/apps/contracts" -}}
|
||||
CONTRACTS_KAFKA_BOOTSTRAP_SERVERS={{ index .Data.data.auth "bootstrap_servers" }}
|
||||
CONTRACTS_KAFKA_SECURITY_PROTOCOL={{ index .Data.data.auth "security_protocol" }}
|
||||
CONTRACTS_KAFKA_SASL_MECHANISM={{ index .Data.data.auth "sasl_mechanism" }}
|
||||
CONTRACTS_KAFKA_BOOTSTRAP_SERVERS={{ with index .Data.data "auth" }}{{ index . "bootstrap_servers" }}{{ else }}{{ index .Data.data "bootstrap_servers" }}{{ end }}
|
||||
CONTRACTS_KAFKA_SECURITY_PROTOCOL={{ with index .Data.data "auth" }}{{ index . "security_protocol" }}{{ else }}{{ index .Data.data "security_protocol" }}{{ end }}
|
||||
CONTRACTS_KAFKA_SASL_MECHANISM={{ with index .Data.data "auth" }}{{ index . "sasl_mechanism" }}{{ else }}{{ index .Data.data "sasl_mechanism" }}{{ end }}
|
||||
CONTRACTS_KAFKA_USERNAME={{ index .Data.data "username" }}
|
||||
CONTRACTS_KAFKA_PASSWORD={{ index .Data.data "password" }}
|
||||
{{- end -}}
|
||||
|
||||
@ -212,17 +212,17 @@ spec:
|
||||
vault.hashicorp.com/agent-inject-secret-iam-kafka: secrets/data/kafka/apps/iam
|
||||
vault.hashicorp.com/agent-inject-template-iam-kafka: |-
|
||||
{{- with secret "secrets/data/kafka/apps/iam" -}}
|
||||
KAFKA_SECURITY_PROTOCOL={{ index .Data.data.auth "security_protocol" }}
|
||||
KAFKA_SASL_MECHANISM={{ index .Data.data.auth "sasl_mechanism" }}
|
||||
KAFKA_BROKERS={{ index .Data.data.auth "bootstrap_servers" }}
|
||||
KAFKA_SECURITY_PROTOCOL={{ with index .Data.data "auth" }}{{ index . "security_protocol" }}{{ else }}{{ index .Data.data "security_protocol" }}{{ end }}
|
||||
KAFKA_SASL_MECHANISM={{ with index .Data.data "auth" }}{{ index . "sasl_mechanism" }}{{ else }}{{ index .Data.data "sasl_mechanism" }}{{ end }}
|
||||
KAFKA_BROKERS={{ with index .Data.data "auth" }}{{ index . "bootstrap_servers" }}{{ else }}{{ index .Data.data "bootstrap_servers" }}{{ end }}
|
||||
KAFKA_SASL_PLAIN_USERNAME={{ index .Data.data "username" }}
|
||||
KAFKA_SASL_PLAIN_PASSWORD={{ index .Data.data "password" }}
|
||||
{{- end -}}
|
||||
vault.hashicorp.com/agent-inject-secret-iam-s3: secrets/data/minio/apps/iam
|
||||
vault.hashicorp.com/agent-inject-template-iam-s3: |-
|
||||
{{- with secret "secrets/data/minio/apps/iam" -}}
|
||||
S3_ACCESS_KEY_ID={{ index .Data.data "access_key" }}
|
||||
S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_key" }}
|
||||
S3_ACCESS_KEY_ID={{ or (index .Data.data "access_key") (index .Data.data "access_key_id") }}
|
||||
S3_SECRET_ACCESS_KEY={{ or (index .Data.data "secret_key") (index .Data.data "secret_access_key") }}
|
||||
{{- end -}}
|
||||
|
||||
commitSha: ""
|
||||
|
||||
@ -224,7 +224,7 @@ spec:
|
||||
vault.hashicorp.com/agent-inject-secret-inspections-kafka: secrets/data/kafka/apps/inspections
|
||||
vault.hashicorp.com/agent-inject-template-inspections-kafka: |-
|
||||
{{- with secret "secrets/data/kafka/apps/inspections" -}}
|
||||
KAFKA_HOST={{ index .Data.data.auth "bootstrap_servers" }}
|
||||
KAFKA_HOST={{ with index .Data.data "auth" }}{{ index . "bootstrap_servers" }}{{ else }}{{ index .Data.data "bootstrap_servers" }}{{ end }}
|
||||
KAFKA_USERNAME={{ index .Data.data "username" }}
|
||||
KAFKA_PASSWORD={{ index .Data.data "password" }}
|
||||
{{- end -}}
|
||||
|
||||
@ -208,8 +208,8 @@ spec:
|
||||
vault.hashicorp.com/agent-inject-secret-issues-s3: secrets/data/minio/apps/issues
|
||||
vault.hashicorp.com/agent-inject-template-issues-s3: |-
|
||||
{{- with secret "secrets/data/minio/apps/issues" -}}
|
||||
YC_S3_ACCESS_KEY_ID={{ index .Data.data "access_key" }}
|
||||
YC_S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_key" }}
|
||||
YC_S3_ACCESS_KEY_ID={{ or (index .Data.data "access_key") (index .Data.data "access_key_id") }}
|
||||
YC_S3_SECRET_ACCESS_KEY={{ or (index .Data.data "secret_key") (index .Data.data "secret_access_key") }}
|
||||
YC_S3_BUCKET_NAME=rfi
|
||||
YC_S3_ENDPOINT_URL=https://minio.contour.infra.sarex.tech
|
||||
{{- end -}}
|
||||
|
||||
@ -193,8 +193,8 @@ spec:
|
||||
vault.hashicorp.com/agent-inject-secret-issues-s3: secrets/data/minio/apps/issues
|
||||
vault.hashicorp.com/agent-inject-template-issues-s3: |-
|
||||
{{- with secret "secrets/data/minio/apps/issues" -}}
|
||||
YC_S3_ACCESS_KEY_ID={{ index .Data.data "access_key" }}
|
||||
YC_S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_key" }}
|
||||
YC_S3_ACCESS_KEY_ID={{ or (index .Data.data "access_key") (index .Data.data "access_key_id") }}
|
||||
YC_S3_SECRET_ACCESS_KEY={{ or (index .Data.data "secret_key") (index .Data.data "secret_access_key") }}
|
||||
YC_S3_BUCKET_NAME=rfi
|
||||
YC_S3_ENDPOINT_URL=https://minio.contour.infra.sarex.tech
|
||||
{{- end -}}
|
||||
|
||||
@ -168,18 +168,18 @@ spec:
|
||||
vault.hashicorp.com/agent-inject-secret-mapper-s3: secrets/data/minio/apps/mapper
|
||||
vault.hashicorp.com/agent-inject-template-mapper-s3: |-
|
||||
{{- with secret "secrets/data/minio/apps/mapper" -}}
|
||||
MAPPER_S3_ENDPOINT={{ index .Data.data.client "endpoint" }}
|
||||
MAPPER_S3_REGION={{ index .Data.data.client "region" }}
|
||||
MAPPER_S3_ENDPOINT={{ with index .Data.data "client" }}{{ index . "endpoint" }}{{ else }}{{ index .Data.data "endpoint" }}{{ end }}
|
||||
MAPPER_S3_REGION={{ with index .Data.data "client" }}{{ index . "region" }}{{ else }}{{ index .Data.data "region" }}{{ end }}
|
||||
MAPPER_S3_BUCKET=mapper
|
||||
MAPPER_S3_ACCESS_KEY_ID={{ index .Data.data "access_key" }}
|
||||
MAPPER_S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_key" }}
|
||||
MAPPER_S3_ACCESS_KEY_ID={{ or (index .Data.data "access_key") (index .Data.data "access_key_id") }}
|
||||
MAPPER_S3_SECRET_ACCESS_KEY={{ or (index .Data.data "secret_key") (index .Data.data "secret_access_key") }}
|
||||
{{- end -}}
|
||||
vault.hashicorp.com/agent-inject-secret-mapper-kafka: secrets/data/kafka/apps/mapper
|
||||
vault.hashicorp.com/agent-inject-template-mapper-kafka: |-
|
||||
{{- with secret "secrets/data/kafka/apps/mapper" -}}
|
||||
MAPPER_KAFKA_BOOTSTRAP_SERVERS={{ index .Data.data.auth "bootstrap_servers" }}
|
||||
MAPPER_KAFKA_SECURITY_PROTOCOL={{ index .Data.data.auth "security_protocol" }}
|
||||
MAPPER_KAFKA_SASL_MECHANISM={{ index .Data.data.auth "sasl_mechanism" }}
|
||||
MAPPER_KAFKA_BOOTSTRAP_SERVERS={{ with index .Data.data "auth" }}{{ index . "bootstrap_servers" }}{{ else }}{{ index .Data.data "bootstrap_servers" }}{{ end }}
|
||||
MAPPER_KAFKA_SECURITY_PROTOCOL={{ with index .Data.data "auth" }}{{ index . "security_protocol" }}{{ else }}{{ index .Data.data "security_protocol" }}{{ end }}
|
||||
MAPPER_KAFKA_SASL_MECHANISM={{ with index .Data.data "auth" }}{{ index . "sasl_mechanism" }}{{ else }}{{ index .Data.data "sasl_mechanism" }}{{ end }}
|
||||
MAPPER_KAFKA_USERNAME={{ index .Data.data "username" }}
|
||||
MAPPER_KAFKA_PASSWORD={{ index .Data.data "password" }}
|
||||
{{- end -}}
|
||||
|
||||
@ -160,11 +160,10 @@ spec:
|
||||
vault.hashicorp.com/agent-inject-secret-message-hub-s3: secrets/data/minio/apps/message-hub
|
||||
vault.hashicorp.com/agent-inject-template-message-hub-s3: |-
|
||||
{{- with secret "secrets/data/minio/apps/message-hub" -}}
|
||||
S3_HOST={{ index .Data.data.client "endpoint" }}
|
||||
S3_LOGIN={{ index .Data.data "access_key" }}
|
||||
S3_PASSWORD={{ index .Data.data "secret_key" }}
|
||||
{{- $buckets := index .Data.data "buckets" }}
|
||||
S3_BUCKET={{- if gt (len $buckets) 0 -}}{{ index (index $buckets 0) "name" }}{{- else -}}rfi{{- end -}}
|
||||
S3_HOST={{ with index .Data.data "client" }}{{ index . "endpoint" }}{{ else }}{{ index .Data.data "endpoint" }}{{ end }}
|
||||
S3_LOGIN={{ or (index .Data.data "access_key") (index .Data.data "access_key_id") }}
|
||||
S3_PASSWORD={{ or (index .Data.data "secret_key") (index .Data.data "secret_access_key") }}
|
||||
S3_BUCKET={{- with index .Data.data "buckets" -}}{{ index (index . 0) "name" }}{{- else -}}{{ or (index .Data.data "bucket") "rfi" }}{{- end -}}
|
||||
{{- end -}}
|
||||
vault.hashicorp.com/agent-inject-secret-message-hub-kafka: secrets/data/kafka/apps/pm
|
||||
vault.hashicorp.com/agent-inject-template-message-hub-kafka: |-
|
||||
@ -173,8 +172,8 @@ spec:
|
||||
KAFKA_PASSWORD={{ index .Data.data "password" }}
|
||||
KAFKA_HOST=kafka-kafka-contour-controller-headless.kafka.svc.cluster.local
|
||||
KAFKA_PORT=9094
|
||||
KAFKA_SECURITY_PROTOCOL={{ index .Data.data.auth "security_protocol" }}
|
||||
KAFKA_SASL_MECHANISM={{ index .Data.data.auth "sasl_mechanism" }}
|
||||
KAFKA_SECURITY_PROTOCOL={{ with index .Data.data "auth" }}{{ index . "security_protocol" }}{{ else }}{{ index .Data.data "security_protocol" }}{{ end }}
|
||||
KAFKA_SASL_MECHANISM={{ with index .Data.data "auth" }}{{ index . "sasl_mechanism" }}{{ else }}{{ index .Data.data "sasl_mechanism" }}{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
commitSha: ""
|
||||
|
||||
@ -157,18 +157,18 @@ spec:
|
||||
vault.hashicorp.com/agent-inject-secret-notes-s3: secrets/data/minio/apps/notes
|
||||
vault.hashicorp.com/agent-inject-template-notes-s3: |-
|
||||
{{- with secret "secrets/data/minio/apps/notes" -}}
|
||||
NOTES_S3_ENDPOINT={{ index .Data.data.client "endpoint" }}
|
||||
NOTES_S3_REGION={{ index .Data.data.client "region" }}
|
||||
NOTES_S3_ENDPOINT={{ with index .Data.data "client" }}{{ index . "endpoint" }}{{ else }}{{ index .Data.data "endpoint" }}{{ end }}
|
||||
NOTES_S3_REGION={{ with index .Data.data "client" }}{{ index . "region" }}{{ else }}{{ index .Data.data "region" }}{{ end }}
|
||||
NOTES_S3_BUCKET=notes
|
||||
NOTES_S3_ACCESS_KEY_ID={{ index .Data.data "access_key" }}
|
||||
NOTES_S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_key" }}
|
||||
NOTES_S3_ACCESS_KEY_ID={{ or (index .Data.data "access_key") (index .Data.data "access_key_id") }}
|
||||
NOTES_S3_SECRET_ACCESS_KEY={{ or (index .Data.data "secret_key") (index .Data.data "secret_access_key") }}
|
||||
{{- end -}}
|
||||
vault.hashicorp.com/agent-inject-secret-notes-kafka: secrets/data/kafka/apps/notes
|
||||
vault.hashicorp.com/agent-inject-template-notes-kafka: |-
|
||||
{{- with secret "secrets/data/kafka/apps/notes" -}}
|
||||
NOTES_KAFKA_BOOTSTRAP_SERVERS={{ index .Data.data.auth "bootstrap_servers" }}
|
||||
NOTES_KAFKA_SECURITY_PROTOCOL={{ index .Data.data.auth "security_protocol" }}
|
||||
NOTES_KAFKA_SASL_MECHANISM={{ index .Data.data.auth "sasl_mechanism" }}
|
||||
NOTES_KAFKA_BOOTSTRAP_SERVERS={{ with index .Data.data "auth" }}{{ index . "bootstrap_servers" }}{{ else }}{{ index .Data.data "bootstrap_servers" }}{{ end }}
|
||||
NOTES_KAFKA_SECURITY_PROTOCOL={{ with index .Data.data "auth" }}{{ index . "security_protocol" }}{{ else }}{{ index .Data.data "security_protocol" }}{{ end }}
|
||||
NOTES_KAFKA_SASL_MECHANISM={{ with index .Data.data "auth" }}{{ index . "sasl_mechanism" }}{{ else }}{{ index .Data.data "sasl_mechanism" }}{{ end }}
|
||||
NOTES_KAFKA_USERNAME={{ index .Data.data "username" }}
|
||||
NOTES_KAFKA_PASSWORD={{ index .Data.data "password" }}
|
||||
{{- end -}}
|
||||
|
||||
@ -250,16 +250,16 @@ spec:
|
||||
vault.hashicorp.com/agent-inject-secret-premises-kafka: secrets/data/kafka/apps/premises
|
||||
vault.hashicorp.com/agent-inject-template-premises-kafka: |-
|
||||
{{- with secret "secrets/data/kafka/apps/premises" -}}
|
||||
KAFKA_HOST={{ if .Data.data.auth }}{{ index .Data.data.auth "bootstrap_servers" }}{{ else }}{{ index .Data.data "bootstrap_servers" }}{{ end }}
|
||||
KAFKA_HOST={{ if .Data.data.auth }}{{ with index .Data.data "auth" }}{{ index . "bootstrap_servers" }}{{ else }}{{ index .Data.data "bootstrap_servers" }}{{ end }}{{ else }}{{ index .Data.data "bootstrap_servers" }}{{ end }}
|
||||
KAFKA_USERNAME={{ index .Data.data "username" }}
|
||||
KAFKA_PASSWORD={{ index .Data.data "password" }}
|
||||
{{- end -}}
|
||||
vault.hashicorp.com/agent-inject-secret-premises-s3: secrets/data/minio/apps/premises
|
||||
vault.hashicorp.com/agent-inject-template-premises-s3: |-
|
||||
{{- with secret "secrets/data/minio/apps/premises" -}}
|
||||
S3_HOST={{ index .Data.data.client "endpoint" }}
|
||||
S3_ACCESS_KEY={{ index .Data.data "access_key" }}
|
||||
S3_SECRET_KEY={{ index .Data.data "secret_key" }}
|
||||
S3_HOST={{ with index .Data.data "client" }}{{ index . "endpoint" }}{{ else }}{{ index .Data.data "endpoint" }}{{ end }}
|
||||
S3_ACCESS_KEY={{ or (index .Data.data "access_key") (index .Data.data "access_key_id") }}
|
||||
S3_SECRET_KEY={{ or (index .Data.data "secret_key") (index .Data.data "secret_access_key") }}
|
||||
{{- end -}}
|
||||
vault.hashicorp.com/agent-inject-secret-premises-issues-db: secrets/data/apps/issues/postgres
|
||||
vault.hashicorp.com/agent-inject-template-premises-issues-db: |-
|
||||
|
||||
@ -127,10 +127,10 @@ spec:
|
||||
vault.hashicorp.com/agent-inject-secret-rfi-s3: secrets/data/minio/apps/rfi
|
||||
vault.hashicorp.com/agent-inject-template-rfi-s3: |-
|
||||
{{- with secret "secrets/data/minio/apps/rfi" -}}
|
||||
YC_S3_ENDPOINT_URL={{ index .Data.data.client "endpoint" }}
|
||||
YC_S3_ENDPOINT_URL={{ with index .Data.data "client" }}{{ index . "endpoint" }}{{ else }}{{ index .Data.data "endpoint" }}{{ end }}
|
||||
YC_S3_BUCKET_NAME=rfi
|
||||
YC_S3_ACCESS_KEY_ID={{ index .Data.data "access_key" }}
|
||||
YC_S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_key" }}
|
||||
YC_S3_ACCESS_KEY_ID={{ or (index .Data.data "access_key") (index .Data.data "access_key_id") }}
|
||||
YC_S3_SECRET_ACCESS_KEY={{ or (index .Data.data "secret_key") (index .Data.data "secret_access_key") }}
|
||||
{{- end -}}
|
||||
vault.hashicorp.com/agent-inject-secret-rfi-rabbitmq: secrets/data/rabbitmq/apps/rfi
|
||||
vault.hashicorp.com/agent-inject-template-rfi-rabbitmq: |-
|
||||
|
||||
@ -117,10 +117,10 @@ spec:
|
||||
vault.hashicorp.com/agent-inject-secret-rfi-s3: secrets/data/minio/apps/rfi
|
||||
vault.hashicorp.com/agent-inject-template-rfi-s3: |-
|
||||
{{- with secret "secrets/data/minio/apps/rfi" -}}
|
||||
YC_S3_ENDPOINT_URL={{ index .Data.data.client "endpoint" }}
|
||||
YC_S3_ENDPOINT_URL={{ with index .Data.data "client" }}{{ index . "endpoint" }}{{ else }}{{ index .Data.data "endpoint" }}{{ end }}
|
||||
YC_S3_BUCKET_NAME=rfi
|
||||
YC_S3_ACCESS_KEY_ID={{ index .Data.data "access_key" }}
|
||||
YC_S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_key" }}
|
||||
YC_S3_ACCESS_KEY_ID={{ or (index .Data.data "access_key") (index .Data.data "access_key_id") }}
|
||||
YC_S3_SECRET_ACCESS_KEY={{ or (index .Data.data "secret_key") (index .Data.data "secret_access_key") }}
|
||||
{{- end -}}
|
||||
vault.hashicorp.com/agent-inject-secret-rfi-rabbitmq: secrets/data/rabbitmq/apps/rfi
|
||||
vault.hashicorp.com/agent-inject-template-rfi-rabbitmq: |-
|
||||
|
||||
@ -193,9 +193,9 @@ spec:
|
||||
{{- with secret "secrets/data/kafka/apps/system-log" -}}
|
||||
KAFKA_USERNAME={{ index .Data.data "username" }}
|
||||
KAFKA_PASSWORD={{ index .Data.data "password" }}
|
||||
KAFKA_BROKERS={{ index .Data.data.auth "bootstrap_servers" }}
|
||||
{{ $topics := index .Data.data "topics" }}
|
||||
KAFKA_TOPIC={{ if gt (len $topics) 0 }}{{ index (index $topics 0) "name" }}{{ else }}system-log.events{{ end }}
|
||||
KAFKA_BROKERS={{ with index .Data.data "auth" }}{{ index . "bootstrap_servers" }}{{ else }}{{ index .Data.data "bootstrap_servers" }}{{ end }}
|
||||
{{ "" }}
|
||||
KAFKA_TOPIC={{ with index .Data.data "topics" }}{{ index (index . 0) "name" }}{{ else }}system-log.events{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
commitSha: ""
|
||||
|
||||
Loading…
Reference in New Issue
Block a user