项目作者: minio

项目描述 :
Direct MinIO Tunnel
高级语言: Go
项目地址: git://github.com/minio/dmt.git
创建时间: 2020-11-09T21:06:37Z
项目社区:https://github.com/minio/dmt

开源协议:GNU Affero General Public License v3.0

下载


Direct MinIO Tunnel

Usage dmt

  1. Usage of ./dmt:
  2. -ca-cert string
  3. CA certificates (default "/etc/dmt/ca.crt")
  4. -tls-dir string
  5. TLS certificate directories (default "/etc/dmt/tls")

Docker

For development and local testing you can build new docker image via make

  1. TAG=minio/dmt:dev make docker

Kubernetes

When deploying to kubernetes, dmt requires a configmap with the name dmt-config to exists in the same namespace dmt is running, you can create the configmap using the following commands:

  1. echo "{\"version\": \"1\", \"routes\": {}}" > routes.json
  2. kubectl create cm dmt-config --from-file=routes.json

Additionally, TLS for dmt server is mandatory, make sure certificate secrets exists in the same namespace dmt is running, ie

  1. kubectl create secret generic dmt-ca-cert --from-file=ca.crt
  1. kubectl create secret generic certificate-secrets-domain-1 --from-file=tls.crt --from-file=tls.key

Deploy dmt

  1. kubectl apply -f k8s/examples/dmt.yaml

Your application can start pushing k/v to the dmt-config configmap in JSON format and dmt will react to those changes via k8s informers.

routes.json example

  1. {
  2. "version": "1",
  3. "routes": {
  4. "0HHZW0BSUIK3TGCF": "backend-1:9000",
  5. "1OIGLFDMYMWIJCFV": "backend-2:9000",
  6. "2S2UPSUO4L4XMTU0": "backend-3:9000",
  7. "4103GYZD1OFNTL3Y": "backend-4:9000",
  8. "4QW2BNRBPGSUP24Z": "backend-5:9000"
  9. }
  10. }