美文网首页
Helper containers 辅助容器

Helper containers 辅助容器

作者: cdz620 | 来源:发表于2020-03-02 14:19 被阅读0次

git 代码同步容器

代码目录挂载不同的容器中,生产者容器负责git pull 代码,生产者容器负责消费代码

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: my-nginx
spec:
  template:
    metadata:
      labels:
        app: nginx
    spec:
      volumes:
      - name: www-data
        emptyDir: {}
      containers:
      - name: nginx
        image: nginx
        # This container reads from the www-data volume
        volumeMounts:
        - mountPath: /srv/www
          name: www-data
          readOnly: true
      - name: git-monitor
        image: myrepo/git-monitor
        env:
        - name: GIT_REPO
          value: http://github.com/some/repo.git
        # This container writes to the www-data volume
        volumeMounts:
        - mountPath: /data
          name: www-data

相关文章

网友评论

      本文标题:Helper containers 辅助容器

      本文链接:https://www.haomeiwen.com/subject/zytdchtx.html