|
| 1 | +apiVersion: v1 |
| 2 | +kind: Pod |
| 3 | +metadata: |
| 4 | + labels: |
| 5 | + app: "gobeansproxy" |
| 6 | + createId: "{{ uuid }}" |
| 7 | + createdBy: pdectl |
| 8 | + createdByUser: wangqiang |
| 9 | + runByUser: '{{ .CliArgs.String "username" }}' |
| 10 | + runByPdectlVersion: "{{ .CliArgs.App.Version }}" |
| 11 | + runnerAddress: "{{ .RunnerAddress }}" |
| 12 | + createdTime: "{{ .CreatedTime }}" |
| 13 | + pdeVersion: "v0.1.4" |
| 14 | + useWebEditor: "false" |
| 15 | + webEditorPort: 0 |
| 16 | + webEditorType: "" |
| 17 | + name: "gobeansproxy" |
| 18 | + annotations: |
| 19 | + pdectl.douban.com/cfg/exec-cmd: '{{ .CliArgs.String "exec-default-cmd" }}' |
| 20 | +spec: |
| 21 | + containers: |
| 22 | + - name: "main" |
| 23 | + env: |
| 24 | + - name: HOSTNAME |
| 25 | + value: "gobeansproxy-main" |
| 26 | + - name: SCRIBE_HOST |
| 27 | + value: 10.0.2.2 |
| 28 | + image: "docker.douban/sa/pde-go-cli:latest-1.20-v2" |
| 29 | + ports: |
| 30 | + volumeMounts: |
| 31 | + # mount go path src to container go path |
| 32 | + - mountPath: /go/src/ |
| 33 | + name: go-path-src |
| 34 | + # mount code folder |
| 35 | + - mountPath: /home/project/ |
| 36 | + name: code |
| 37 | + - mountPath: /root/ |
| 38 | + name: userhome |
| 39 | + - mountPath: '/home/{{ .CliArgs.String "username" }}' |
| 40 | + name: userhome |
| 41 | + - mountPath: /fuse:rslave |
| 42 | + name: fuse |
| 43 | + - mountPath: /etc/douban/ |
| 44 | + name: etc-douban |
| 45 | + readOnly: true |
| 46 | + - mountPath: /etc/localtime |
| 47 | + name: etc-localtime |
| 48 | + readOnly: true |
| 49 | + - mountPath: /var/run/nscd/ |
| 50 | + name: var-run-nscd |
| 51 | + readOnly: true |
| 52 | + workingDir: /home/project |
| 53 | + # - name: mc |
| 54 | + # image: docker.douban/memcached:latest |
| 55 | + # workingDir: / |
| 56 | + {{- range (mkSlice 57980 57981 57982 57983) }} |
| 57 | + - name: beansdb-{{ . }} |
| 58 | + image: docker.douban/platform/gobeansdb:latest |
| 59 | + workingDir: /data/ |
| 60 | + volumeMounts: |
| 61 | + - mountPath: /data |
| 62 | + name: beansdb-{{ . }}-data-dir |
| 63 | + - mountPath: /gobeansdb/default_beansdb_cfg/ |
| 64 | + name: beansdb-{{ . }}-cfg-dir |
| 65 | + {{- end }} |
| 66 | + - name: cassandra |
| 67 | + image: docker.douban/dba/cassandra:4.1.2 |
| 68 | + workingDir: / |
| 69 | + volumeMounts: |
| 70 | + - mountPath: /var/lib/cassandra/ |
| 71 | + name: cassandra-data-dir |
| 72 | + # - mountPath: /tmp/cassandra/ |
| 73 | + # name: cassandra-cfg |
| 74 | + # command: |
| 75 | + # - "/bin/bash" |
| 76 | + # args: |
| 77 | + # - "-c" |
| 78 | + # - > |
| 79 | + # cp -rfv /tmp/cassandra/cassandra.yaml /etc/cassandra/ && |
| 80 | + # /usr/local/bin/docker-entrypoint.sh cassandra -f |
| 81 | + restartPolicy: Never |
| 82 | + volumes: |
| 83 | + - hostPath: |
| 84 | + path: '{{ expandEnvVar "$GOPATH/src" }}' |
| 85 | + type: Directory |
| 86 | + name: go-path-src |
| 87 | + {{- $env := . }} |
| 88 | + {{- range (mkSlice 57980 57981 57982 57983) }} |
| 89 | + - hostPath: |
| 90 | + path: '{{ $env.CliArgs.String "project-dir" }}/.doubanpde/data/beansdb-{{ . }}/' |
| 91 | + type: DirectoryOrCreate |
| 92 | + name: beansdb-{{ . }}-data-dir |
| 93 | + - hostPath: |
| 94 | + path: '{{ $env.CliArgs.String "project-dir" }}/.doubanpde/scripts/bdb/gobeansproxy/{{ . }}/conf/' |
| 95 | + type: Directory |
| 96 | + name: beansdb-{{ . }}-cfg-dir |
| 97 | + {{- end }} |
| 98 | + - hostPath: |
| 99 | + path: '{{ .CliArgs.String "project-dir" }}/.doubanpde/data/cassandra/' |
| 100 | + type: DirectoryOrCreate |
| 101 | + name: cassandra-data-dir |
| 102 | + - hostPath: |
| 103 | + path: '{{ .CliArgs.String "project-dir" }}/.doubanpde/scripts/cassandra/' |
| 104 | + name: cassandra-cfg |
| 105 | + - hostPath: |
| 106 | + path: '{{ .CliArgs.String "project-dir" }}' |
| 107 | + type: Directory |
| 108 | + name: code |
| 109 | + - hostPath: |
| 110 | + path: '{{ expandEnvVar "$HOME/" }}' |
| 111 | + type: Directory |
| 112 | + name: userhome |
| 113 | + - hostPath: |
| 114 | + path: /fuse |
| 115 | + type: Directory |
| 116 | + name: fuse |
| 117 | + - hostPath: |
| 118 | + path: /etc/douban/ |
| 119 | + name: etc-douban |
| 120 | + - hostPath: |
| 121 | + path: /etc/localtime |
| 122 | + name: etc-localtime |
| 123 | + - hostPath: |
| 124 | + path: /var/run/nscd/ |
| 125 | + name: var-run-nscd |
| 126 | + |
0 commit comments