douluanji8752 2019-08-14 06:19
浏览 86

在头盔安装之前将go二进制文件移动到吊舱的惯用方式是什么?

I use CircleCI to build a go binary that I want to run in a pod installed by Helm charts. I want to move the binary from CircleCI to the remote cluster so it's available when the pod starts. I know it's possible with volumes, like ConfigMap or Secrets but I'm not sure what the best way to do this.

I once made it work with a private docker registry and a kubernetes Secrets for the credentials of the registry but I don't like this option. I don't want to have to build and push a new docker image on every binary change.

version: 2.1
jobs:
  build_and_deploy:
    docker:
      - image: circleci/golang:1.12.7
    steps:
      - checkout
      - run: go get -v -t -d ./...
      - run: go build cmd/main.go
      - run: ...
      - run: helm install

workflows:
  version: 2
  build:
    jobs:
      - build_and_deploy:

The expected result should be a new binary available on the cluster every time the job runs.

  • 写回答

2条回答 默认 最新

  • drxm5014 2019-08-14 12:21
    关注

    Your CI/CD should simply build a Docker container with that binary. Then you should push it to the private repository. Cluster should download the binary.

    评论

报告相同问题?

悬赏问题

  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用
  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启