├── .nocalhost ├── base-services.yaml ├── config-perfect.yaml ├── config.helm.local.yaml ├── config.helm.yaml ├── config.kustomize.local.yaml ├── config.kustomize.yaml ├── config.manifest.git.yaml ├── config.manifest.local.yaml ├── config.yaml ├── env.dev └── perfect-services.yaml ├── README.md ├── charts └── bookinfo │ ├── Chart.yaml │ ├── README.md │ ├── config-example │ ├── annotations │ │ ├── authors.yaml │ │ ├── details.yaml │ │ ├── productpage.yaml │ │ ├── ratings.yaml │ │ └── reviews.yaml │ └── cm │ │ └── nocalhost-config.yaml │ ├── templates │ ├── _helpers.tpl │ ├── dep-job.yaml │ ├── microservice-authors.yaml │ ├── microservice-details.yaml │ ├── microservice-productpage.yaml │ ├── microservice-ratings.yaml │ ├── microservice-reviews.yaml │ └── nocalhost-app-config.yaml │ ├── values-with-annotations-config.yaml │ ├── values-with-cm-config.yaml │ ├── values.yaml │ └── values_example.yaml ├── kustomize └── base │ ├── authors.yaml │ ├── dep-job.yaml │ ├── detail.yaml │ ├── kustomization.yaml │ ├── pre-install-cm.yaml │ ├── pre-install │ ├── print-num-job-01.yaml │ └── print-num-job-02.yaml │ ├── productpage.yaml │ ├── ratings.yaml │ └── reviews.yaml └── manifest ├── annotation ├── authors.yaml ├── detail.yaml ├── productpage.yaml ├── ratings.yaml └── reviews.yaml └── templates ├── authors.yaml ├── bookinfo └── dep-job.yaml ├── detail.yaml ├── pre-install-cm.yaml ├── pre-install ├── print-num-job-01.yaml └── print-num-job-02.yaml ├── productpage └── productpage.yaml ├── ratings.yaml └── reviews.yaml /.nocalhost/base-services.yaml: -------------------------------------------------------------------------------- 1 | - name: productpage 2 | serviceType: deployment 3 | dependLabelSelector: 4 | jobs: 5 | - "dep-job" 6 | containers: 7 | - name: productpage 8 | install: 9 | portForward: 10 | - 39080:9080 11 | dev: 12 | gitUrl: https://e.coding.net/nocalhost/nocalhost/bookinfo-productpage.git 13 | image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/python:3.7.7-slim-productpage-with-pydevd 14 | shell: bash 15 | workDir: /home/nocalhost-dev 16 | command: 17 | run: 18 | - ./run.sh 19 | debug: 20 | - ./debug.sh 21 | debug: 22 | remoteDebugPort: 9009 23 | sync: 24 | type: send 25 | filePattern: 26 | - ./ 27 | ignoreFilePattern: 28 | - ".git" 29 | - ".github" 30 | - ".idea" 31 | portForward: 32 | - 39080:9080 33 | resources: 34 | limits: 35 | cpu: "2" 36 | memory: 2Gi 37 | requests: 38 | cpu: "0.5" 39 | memory: 512Mi 40 | - name: details 41 | serviceType: deployment 42 | containers: 43 | - dev: 44 | gitUrl: https://e.coding.net/nocalhost/nocalhost/bookinfo-details.git 45 | image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/ruby:2.7-buster 46 | shell: bash 47 | workDir: /home/nocalhost-dev 48 | sync: 49 | type: send 50 | filePattern: 51 | - ./ 52 | ignoreFilePattern: 53 | - ".git" 54 | - ".github" 55 | env: 56 | - name: DEBUG 57 | value: "true" 58 | resources: 59 | limits: 60 | cpu: "2" 61 | memory: 2Gi 62 | requests: 63 | cpu: "0.5" 64 | memory: 512Mi 65 | command: 66 | run: 67 | - ./run.sh 68 | debug: 69 | - ./debug.sh 70 | debug: 71 | remoteDebugPort: 9001 72 | env: 73 | - name: DEBUG 74 | value: "true" 75 | - name: ratings 76 | serviceType: deployment 77 | dependLabelSelector: 78 | pods: 79 | - "productpage" 80 | - "app.kubernetes.io/name=productpage" 81 | jobs: 82 | - "dep-job" 83 | containers: 84 | - dev: 85 | gitUrl: https://e.coding.net/nocalhost/nocalhost/bookinfo-ratings.git 86 | image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/node:12.18.1-slim 87 | shell: bash 88 | workDir: /home/nocalhost-dev 89 | command: 90 | build: [] 91 | run: 92 | - sh 93 | - ./run.sh 94 | debug: 95 | - sh 96 | - ./debug.sh 97 | hotReloadRun: [] 98 | hotReloadDebug: [] 99 | debug: 100 | remoteDebugPort: 9229 101 | sync: 102 | type: send 103 | filePattern: 104 | - ./ 105 | ignoreFilePattern: 106 | - ".git" 107 | - ".idea" 108 | - ".github" 109 | - "node_modules" 110 | env: 111 | - name: DEBUG 112 | value: "true" 113 | resources: 114 | limits: 115 | cpu: "2" 116 | memory: 2Gi 117 | requests: 118 | cpu: "0.5" 119 | memory: 512Mi 120 | - name: reviews 121 | serviceType: deployment 122 | dependLabelSelector: 123 | pods: 124 | - "productpage" 125 | containers: 126 | - dev: 127 | gitUrl: https://e.coding.net/nocalhost/nocalhost/bookinfo-reviews.git 128 | image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/java:latest 129 | shell: bash 130 | workDir: /home/nocalhost-dev 131 | command: 132 | build: [ "./gradlew", "build" ] 133 | run: [ "./gradlew", "bootRun" ] 134 | debug: [ "./gradlew", "bootRun", "--debug-jvm" ] 135 | debug: 136 | remoteDebugPort: 5005 137 | sync: 138 | type: send 139 | filePattern: 140 | - ./ 141 | ignoreFilePattern: 142 | - ".git" 143 | - ".github" 144 | - ".gradle" 145 | - "build" 146 | resources: 147 | limits: 148 | cpu: "2" 149 | memory: 2Gi 150 | requests: 151 | cpu: "0.5" 152 | memory: 512Mi 153 | - name: authors 154 | serviceType: deployment 155 | containers: 156 | - dev: 157 | gitUrl: https://e.coding.net/nocalhost/nocalhost/bookinfo-authors.git 158 | image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/golang:latest 159 | shell: bash 160 | workDir: /home/nocalhost-dev 161 | command: 162 | run: [ "./run.sh" ] 163 | debug: [ "./debug.sh" ] 164 | debug: 165 | remoteDebugPort: 9009 166 | hotReload: true 167 | sync: 168 | type: send 169 | filePattern: 170 | - ./ 171 | ignoreFilePattern: 172 | - ".git" 173 | - ".idea" 174 | - ".github" 175 | resources: 176 | limits: 177 | cpu: "2" 178 | memory: 2Gi 179 | requests: 180 | cpu: "0.5" 181 | memory: 512Mi 182 | -------------------------------------------------------------------------------- /.nocalhost/config-perfect.yaml: -------------------------------------------------------------------------------- 1 | configProperties: 2 | version: v2 3 | envFile: env.dev 4 | 5 | application: 6 | name: bookinfo 7 | manifestType: rawManifest 8 | resourcePath: ["manifest/templates"] 9 | ignoredPath: [] 10 | onPreInstall: 11 | - path: manifest/templates/pre-install/print-num-job-01.yaml 12 | weight: "1" 13 | - path: manifest/templates/pre-install/print-num-job-02.yaml 14 | weight: "-5" 15 | env: 16 | - name: DEBUG 17 | value: ${DEBUG:-false} 18 | - name: DOMAIN 19 | value: ${DOMAIN:-coding.net} 20 | services: 21 | ${_INCLUDE_:-./perfect-services.yaml | nindent 4} -------------------------------------------------------------------------------- /.nocalhost/config.helm.local.yaml: -------------------------------------------------------------------------------- 1 | configProperties: 2 | version: v2 3 | envFile: env.dev 4 | 5 | application: 6 | name: bookinfo 7 | manifestType: helmLocal 8 | resourcePath: ["charts/bookinfo"] 9 | env: 10 | - name: DEBUG 11 | value: ${DEBUG:-false} 12 | - name: DOMAIN 13 | value: ${DOMAIN:-coding.net} 14 | services: 15 | ${_INCLUDE_:-./base-services.yaml | nindent 4} 16 | -------------------------------------------------------------------------------- /.nocalhost/config.helm.yaml: -------------------------------------------------------------------------------- 1 | configProperties: 2 | version: v2 3 | envFile: env.dev 4 | 5 | application: 6 | name: bookinfo 7 | manifestType: helmGit 8 | resourcePath: ["charts/bookinfo"] 9 | env: 10 | - name: DEBUG 11 | value: ${DEBUG:-false} 12 | - name: DOMAIN 13 | value: ${DOMAIN:-coding.net} 14 | services: 15 | ${_INCLUDE_:-./base-services.yaml | nindent 4} 16 | -------------------------------------------------------------------------------- /.nocalhost/config.kustomize.local.yaml: -------------------------------------------------------------------------------- 1 | configProperties: 2 | version: v2 3 | envFile: env.dev 4 | 5 | application: 6 | name: bookinfo 7 | manifestType: kustomizeLocal 8 | resourcePath: ["kustomize/base"] 9 | env: 10 | - name: DEBUG 11 | value: ${DEBUG:-false} 12 | - name: DOMAIN 13 | value: ${DOMAIN:-coding.net} 14 | services: 15 | ${_INCLUDE_:-./base-services.yaml | nindent 4} -------------------------------------------------------------------------------- /.nocalhost/config.kustomize.yaml: -------------------------------------------------------------------------------- 1 | configProperties: 2 | version: v2 3 | envFile: env.dev 4 | 5 | application: 6 | name: bookinfo 7 | manifestType: kustomizeGit 8 | resourcePath: ["kustomize/base"] 9 | env: 10 | - name: DEBUG 11 | value: ${DEBUG:-false} 12 | - name: DOMAIN 13 | value: ${DOMAIN:-coding.net} 14 | services: 15 | ${_INCLUDE_:-./base-services.yaml | nindent 4} -------------------------------------------------------------------------------- /.nocalhost/config.manifest.git.yaml: -------------------------------------------------------------------------------- 1 | configProperties: 2 | version: v2 3 | envFile: env.dev 4 | 5 | application: 6 | name: bookinfo 7 | manifestType: rawManifestGit 8 | resourcePath: ["manifest/templates"] 9 | ignoredPath: [] 10 | onPreInstall: 11 | - path: manifest/templates/pre-install/print-num-job-01.yaml 12 | weight: "1" 13 | - path: manifest/templates/pre-install/print-num-job-02.yaml 14 | weight: "-5" 15 | env: 16 | - name: DEBUG 17 | value: ${DEBUG:-false} 18 | - name: DOMAIN 19 | value: ${DOMAIN:-coding.net} 20 | services: 21 | ${_INCLUDE_:-./base-services.yaml | nindent 4} -------------------------------------------------------------------------------- /.nocalhost/config.manifest.local.yaml: -------------------------------------------------------------------------------- 1 | configProperties: 2 | version: v2 3 | envFile: env.dev 4 | 5 | application: 6 | name: bookinfo 7 | manifestType: rawManifestLocal 8 | resourcePath: ["manifest/templates"] 9 | ignoredPath: [] 10 | onPreInstall: 11 | - path: manifest/templates/pre-install/print-num-job-01.yaml 12 | weight: "1" 13 | - path: manifest/templates/pre-install/print-num-job-02.yaml 14 | weight: "-5" 15 | env: 16 | - name: DEBUG 17 | value: ${DEBUG:-false} 18 | - name: DOMAIN 19 | value: ${DOMAIN:-coding.net} 20 | services: 21 | ${_INCLUDE_:-./base-services.yaml | nindent 4} -------------------------------------------------------------------------------- /.nocalhost/config.yaml: -------------------------------------------------------------------------------- 1 | configProperties: 2 | version: v2 3 | envFile: env.dev 4 | 5 | application: 6 | name: bookinfo 7 | manifestType: rawManifestGit 8 | resourcePath: ["manifest/templates"] 9 | ignoredPath: [] 10 | onPreInstall: 11 | - path: manifest/templates/pre-install/print-num-job-01.yaml 12 | weight: "1" 13 | - path: manifest/templates/pre-install/print-num-job-02.yaml 14 | weight: "-5" 15 | env: 16 | - name: DEBUG 17 | value: ${DEBUG:-false} 18 | - name: DOMAIN 19 | value: ${DOMAIN:-coding.net} 20 | services: 21 | ${_INCLUDE_:-./base-services.yaml | nindent 4} 22 | -------------------------------------------------------------------------------- /.nocalhost/env.dev: -------------------------------------------------------------------------------- 1 | DEBUG=true 2 | DOMAIN=coding.com 3 | -------------------------------------------------------------------------------- /.nocalhost/perfect-services.yaml: -------------------------------------------------------------------------------- 1 | - name: productpage 2 | serviceType: deployment 3 | dependLabelSelector: 4 | jobs: 5 | - "dep-job" 6 | containers: 7 | - name: productpage 8 | install: 9 | portForward: 10 | - 39080:9080 11 | dev: 12 | gitUrl: https://e.coding.net/nocalhost/nocalhost/bookinfo-productpage.git 13 | image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/python:3.7.7-slim-productpage-with-pydevd 14 | shell: bash 15 | workDir: /root/nocalhost-dev 16 | storageClass: "" 17 | resources: 18 | limits: 19 | memory: 2Gi 20 | cpu: "2" 21 | requests: 22 | memory: "100Mi" 23 | cpu: "0.1" 24 | persistentVolumeDirs: 25 | - path: /root 26 | capacity: 10Gi 27 | command: 28 | run: 29 | - ./run.sh 30 | debug: 31 | - ./debug.sh 32 | debug: 33 | remoteDebugPort: 9009 34 | sync: 35 | type: send 36 | filePattern: 37 | - ./ 38 | ignoreFilePattern: 39 | - ".git" 40 | - ".github" 41 | - ".idea" 42 | portForward: 43 | - 39080:9080 44 | env: 45 | - name: DEBUG 46 | value: "true" 47 | - name: details 48 | serviceType: deployment 49 | containers: 50 | - dev: 51 | gitUrl: https://e.coding.net/nocalhost/nocalhost/bookinfo-details.git 52 | image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/ruby:2.7-buster 53 | shell: bash 54 | workDir: /root/nocalhost-dev 55 | resources: 56 | limits: 57 | memory: 2Gi 58 | cpu: "2" 59 | requests: 60 | memory: "100Mi" 61 | cpu: "0.1" 62 | persistentVolumeDirs: 63 | - path: /root 64 | capacity: 10Gi 65 | command: 66 | run: 67 | - ./run.sh 68 | debug: 69 | - ./debug.sh 70 | debug: 71 | remoteDebugPort: 9001 72 | sync: 73 | type: send 74 | filePattern: 75 | - ./ 76 | ignoreFilePattern: 77 | - ".git" 78 | - ".github" 79 | env: 80 | - name: DEBUG 81 | value: "true" 82 | - name: ratings 83 | serviceType: deployment 84 | dependLabelSelector: 85 | pods: 86 | - "productpage" 87 | - "app.kubernetes.io/name=productpage" 88 | jobs: 89 | - "dep-job" 90 | containers: 91 | - dev: 92 | gitUrl: https://e.coding.net/nocalhost/nocalhost/bookinfo-ratings.git 93 | image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/node:12.18.1-slim 94 | shell: bash 95 | workDir: /root/nocalhost-dev 96 | resources: 97 | limits: 98 | memory: 2Gi 99 | cpu: "2" 100 | requests: 101 | memory: "100Mi" 102 | cpu: "0.1" 103 | persistentVolumeDirs: 104 | - path: /root 105 | capacity: 10Gi 106 | command: 107 | build: [] 108 | run: 109 | - ./run.sh 110 | debug: 111 | - ./debug.sh 112 | hotReloadRun: [] 113 | hotReloadDebug: [] 114 | debug: 115 | remoteDebugPort: 9229 116 | sync: 117 | type: send 118 | filePattern: 119 | - ./ 120 | ignoreFilePattern: 121 | - ".git" 122 | - ".idea" 123 | - ".github" 124 | - "node_modules" 125 | env: 126 | - name: DEBUG 127 | value: "true" 128 | - name: reviews 129 | serviceType: deployment 130 | dependLabelSelector: 131 | pods: 132 | - "productpage" 133 | containers: 134 | - dev: 135 | gitUrl: https://e.coding.net/nocalhost/nocalhost/bookinfo-reviews.git 136 | image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/java:latest 137 | shell: bash 138 | workDir: /root/nocalhost-dev 139 | resources: 140 | limits: 141 | memory: 2Gi 142 | cpu: "2" 143 | requests: 144 | memory: "100Mi" 145 | cpu: "0.1" 146 | persistentVolumeDirs: 147 | - path: /root 148 | capacity: 10Gi 149 | command: 150 | build: [ "./gradlew", "build" ] 151 | run: [ "./gradlew", "bootRun" ] 152 | debug: [ "./gradlew", "bootRun", "--debug-jvm" ] 153 | debug: 154 | remoteDebugPort: 5005 155 | sync: 156 | type: send 157 | filePattern: 158 | - ./ 159 | ignoreFilePattern: 160 | - ".git" 161 | - ".github" 162 | - ".gradle" 163 | - "build" 164 | - name: authors 165 | serviceType: deployment 166 | dependLabelSelector: 167 | pods: 168 | - "authors" 169 | containers: 170 | - dev: 171 | gitUrl: https://e.coding.net/nocalhost/nocalhost/bookinfo-authors.git 172 | image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/golang:latest 173 | shell: sh 174 | workDir: /home/nocalhost-dev 175 | resources: 176 | limits: 177 | memory: 2Gi 178 | cpu: "2" 179 | requests: 180 | memory: "100Mi" 181 | cpu: "0.1" 182 | command: 183 | run: [ "./run.sh" ] 184 | debug: [ "./debug.sh" ] 185 | debug: 186 | remoteDebugPort: 9009 187 | hotReload: true 188 | sync: 189 | type: send 190 | filePattern: 191 | - ./ 192 | ignoreFilePattern: 193 | - ".git" 194 | - ".idea" 195 | - ".github" -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Develop bookinfo with nocalhost 2 | 3 | This is a demo project for nocalhost. Bookinfo is from Istio samples(https://github.com/istio/istio/tree/master/samples/bookinfo). 4 | 5 | # Micro Services 6 | Bookinfo is a typical microservice architecture application, which consists of 5 services: 7 | 8 | - productpage(Request Entrance): https://github.com/nocalhost/bookinfo-productpage 9 | - reviews: https://github.com/nocalhost/bookinfo-reviews 10 | - details: https://github.com/nocalhost/bookinfo-details 11 | - ratings: https://github.com/nocalhost/bookinfo-ratings 12 | - authors: https://github.com/nocalhost/bookinfo-authors 13 | 14 | Every service has its different program language and runtime environment. All of them had been configured to use docker as container runtime, you can find Dockerfile in their corresponding repository. 15 | 16 | # Helm 17 | A helm chart in this repository is prepared for one command installing. 5 Deployments witch 2 replica pods for 5 microservices are main skeleton of this chart. 18 | 19 | You can install the chart by this command: `helm install ./charts/bookinfo`, but if you want to try nocalhost, we recommend you do this with nocalhost. We will give step-by-step QuickStart later. 20 | 21 | # What we changed compared to istio bookinfo? 22 | 23 | We commit some changes to demonstrate nocalhost better. Here are some main changes: 24 | 25 | - Simplified different version of reviews service to one version. Nocalhost does not target on how to manage service traffic or canary deployment. 26 | - Splitted source codes from mono-repo to five independent repositories. In reality, diffrent microservices are developed by diffrent teams with different access rules. 27 | - Changed the framework of reviews service to spring-boot. Nothing but everyone loves spring-boot. 28 | - Configured GitHub Action for every microservice to auto build Docker images. 29 | - Added a .nocalhost directory to support development with nocalhost. 30 | 31 | # About `.nocalhost` directory 32 | 33 | `.nocalhost` is a directory in the root of repository which stores the configurations of nocalhost. In this case, the file `config.yaml`: https://github.com/nocalhost/bookinfo/blob/main/.nocalhost/config.yaml 34 | 35 | # How to start? 36 | 37 | https://nocalhost.dev/docs/quick-start/ 38 | 39 | # Contribute 40 | 41 | https://github.com/nocalhost/nocalhost/blob/main/CONTRIBUTING.md 42 | 43 | -------------------------------------------------------------------------------- /charts/bookinfo/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.3" 3 | description: Nocalhost Bookinfo Helm chart for Kubernetes 4 | name: nocalhost-bookinfo 5 | version: 1.2.2 6 | -------------------------------------------------------------------------------- /charts/bookinfo/README.md: -------------------------------------------------------------------------------- 1 | # Simple BookInfo Helm Chart -------------------------------------------------------------------------------- /charts/bookinfo/config-example/annotations/authors.yaml: -------------------------------------------------------------------------------- 1 | - name: authors 2 | serviceType: deployment 3 | dependLabelSelector: 4 | pods: 5 | - "productpage" 6 | - "details" 7 | containers: 8 | - install: 9 | env: 10 | - name: ENV_INJECT_EXAM 11 | value: ANNOTATIONS 12 | dev: 13 | gitUrl: https://e.coding.net/nocalhost/nocalhost/bookinfo-authors.git 14 | image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/golang:latest 15 | shell: sh 16 | workDir: /home/nocalhost-dev 17 | command: 18 | run: [ "./run.sh" ] 19 | debug: [ "./debug.sh" ] 20 | debug: 21 | remoteDebugPort: 9009 22 | hotReload: true 23 | sync: 24 | type: send 25 | filePattern: 26 | - ./ 27 | ignoreFilePattern: 28 | - ".git" 29 | - ".idea" 30 | - ".github" -------------------------------------------------------------------------------- /charts/bookinfo/config-example/annotations/details.yaml: -------------------------------------------------------------------------------- 1 | - name: details 2 | serviceType: deployment 3 | containers: 4 | - install: 5 | env: 6 | - name: ENV_INJECT_EXAM 7 | value: ANNOTATIONS 8 | dev: 9 | gitUrl: https://e.coding.net/nocalhost/nocalhost/bookinfo-details.git 10 | image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/ruby:2.7-buster 11 | shell: bash 12 | workDir: /home/nocalhost-dev 13 | sync: 14 | type: send 15 | filePattern: 16 | - ./ 17 | ignoreFilePattern: 18 | - ".git" 19 | - ".github" 20 | command: 21 | run: 22 | - ./run.sh 23 | debug: 24 | - ./debug.sh 25 | debug: 26 | remoteDebugPort: 9001 -------------------------------------------------------------------------------- /charts/bookinfo/config-example/annotations/productpage.yaml: -------------------------------------------------------------------------------- 1 | - name: productpage 2 | serviceType: deployment 3 | dependLabelSelector: 4 | pods: 5 | - "productpage" 6 | - "details" 7 | containers: 8 | - name: productpage 9 | install: 10 | env: 11 | - name: ENV_INJECT_EXAM 12 | value: ANNOTATIONS 13 | dev: 14 | gitUrl: https://e.coding.net/nocalhost/nocalhost/bookinfo-productpage.git 15 | image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/python:3.7.7-slim-productpage-with-pydevd 16 | shell: bash 17 | workDir: /home/nocalhost-dev 18 | command: 19 | run: 20 | - ./run.sh 21 | debug: 22 | - ./debug.sh 23 | debug: 24 | remoteDebugPort: 9009 25 | sync: 26 | type: send 27 | filePattern: 28 | - ./ 29 | ignoreFilePattern: 30 | - ".git" 31 | - ".github" 32 | - ".idea" -------------------------------------------------------------------------------- /charts/bookinfo/config-example/annotations/ratings.yaml: -------------------------------------------------------------------------------- 1 | - name: ratings 2 | serviceType: deployment 3 | dependLabelSelector: 4 | pods: 5 | - "productpage" 6 | - "app.kubernetes.io/name=productpage" 7 | jobs: 8 | - "dep-job" 9 | containers: 10 | - dev: 11 | gitUrl: https://e.coding.net/nocalhost/nocalhost/bookinfo-ratings.git 12 | image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/node:12.18.1-slim 13 | shell: bash 14 | workDir: /home/nocalhost-dev 15 | command: 16 | build: [] 17 | run: 18 | - ./run.sh 19 | debug: 20 | - ./debug.sh 21 | hotReloadRun: [] 22 | hotReloadDebug: [] 23 | debug: 24 | remoteDebugPort: 9229 25 | sync: 26 | type: send 27 | filePattern: 28 | - ./ 29 | ignoreFilePattern: 30 | - ".git" 31 | - ".idea" 32 | - ".github" 33 | - "node_modules" 34 | env: 35 | - name: DEBUG 36 | value: "true" 37 | resources: 38 | limits: 39 | cpu: "1" 40 | memory: 1Gi 41 | requests: 42 | cpu: "0.5" 43 | memory: 512Mi 44 | install: 45 | env: 46 | - name: ENV_INJECT_EXAM 47 | value: ANNOTATIONS -------------------------------------------------------------------------------- /charts/bookinfo/config-example/annotations/reviews.yaml: -------------------------------------------------------------------------------- 1 | - name: reviews 2 | serviceType: deployment 3 | dependLabelSelector: 4 | pods: 5 | - "productpage" 6 | containers: 7 | - dev: 8 | gitUrl: https://e.coding.net/nocalhost/nocalhost/bookinfo-reviews.git 9 | image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/java:latest 10 | shell: bash 11 | workDir: /home/nocalhost-dev 12 | command: 13 | build: [ "./gradlew", "build" ] 14 | run: [ "./gradlew", "bootRun" ] 15 | debug: [ "./gradlew", "bootRun", "--debug-jvm" ] 16 | debug: 17 | remoteDebugPort: 5005 18 | sync: 19 | type: send 20 | filePattern: 21 | - ./ 22 | ignoreFilePattern: 23 | - ".git" 24 | - ".github" 25 | - ".gradle" 26 | - "build" 27 | resources: 28 | limits: 29 | cpu: "2" 30 | memory: 2Gi 31 | requests: 32 | cpu: "0.5" 33 | memory: 512Mi 34 | install: 35 | env: 36 | - name: ENV_INJECT_EXAM 37 | value: ANNOTATIONS -------------------------------------------------------------------------------- /charts/bookinfo/config-example/cm/nocalhost-config.yaml: -------------------------------------------------------------------------------- 1 | application: 2 | env: 3 | - name: APP_ENV_1 4 | value: EXAMPLE 5 | - name: APP_ENV_2 6 | value: EXAMPLE 7 | services: 8 | - name: productpage 9 | serviceType: deployment 10 | containers: 11 | - name: productpage 12 | install: 13 | env: 14 | - name: ENV_INJECT_EXAM 15 | value: BASE 16 | dev: 17 | gitUrl: https://e.coding.net/nocalhost/nocalhost/bookinfo-productpage.git 18 | image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/python:3.7.7-slim-productpage-with-pydevd 19 | shell: bash 20 | workDir: /home/nocalhost-dev 21 | command: 22 | run: 23 | - ./run.sh 24 | debug: 25 | - ./debug.sh 26 | debug: 27 | remoteDebugPort: 9009 28 | sync: 29 | type: send 30 | filePattern: 31 | - ./ 32 | ignoreFilePattern: 33 | - ".git" 34 | - ".github" 35 | - ".idea" 36 | 37 | - name: details 38 | serviceType: deployment 39 | containers: 40 | - install: 41 | env: 42 | - name: ENV_INJECT_EXAM 43 | value: BASE 44 | dev: 45 | gitUrl: https://e.coding.net/nocalhost/nocalhost/bookinfo-details.git 46 | image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/ruby:2.7-buster 47 | shell: bash 48 | workDir: /home/nocalhost-dev 49 | command: 50 | run: 51 | - ./run.sh 52 | debug: 53 | - ./debug.sh 54 | debug: 55 | remoteDebugPort: 9001 56 | sync: 57 | type: send 58 | filePattern: 59 | - ./ 60 | ignoreFilePattern: 61 | - ".git" 62 | - ".github" 63 | 64 | - name: ratings 65 | serviceType: deployment 66 | dependLabelSelector: 67 | pods: 68 | - "productpage" 69 | containers: 70 | - install: 71 | env: 72 | - name: ENV_INJECT_EXAM 73 | value: BASE 74 | dev: 75 | gitUrl: https://e.coding.net/nocalhost/nocalhost/bookinfo-ratings.git 76 | image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/node:12.18.1-slim 77 | shell: bash 78 | workDir: /home/nocalhost-dev 79 | command: 80 | run: 81 | - ./run.sh 82 | debug: 83 | - ./debug.sh 84 | debug: 85 | remoteDebugPort: 9229 86 | sync: 87 | type: send 88 | filePattern: 89 | - ./ 90 | ignoreFilePattern: 91 | - ".git" 92 | - ".idea" 93 | - ".github" 94 | - "node_modules" 95 | 96 | - name: reviews 97 | serviceType: deployment 98 | dependLabelSelector: 99 | pods: 100 | - "productpage" 101 | containers: 102 | - install: 103 | env: 104 | - name: ENV_INJECT_EXAM 105 | value: BASE 106 | dev: 107 | gitUrl: https://e.coding.net/nocalhost/nocalhost/bookinfo-reviews.git 108 | image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/java:latest 109 | shell: bash 110 | workDir: /home/nocalhost-dev 111 | command: 112 | build: [ "./gradlew", "build" ] 113 | run: [ "./gradlew", "bootRun" ] 114 | debug: [ "./gradlew", "bootRun", "--debug-jvm" ] 115 | debug: 116 | remoteDebugPort: 5005 117 | sync: 118 | type: send 119 | filePattern: 120 | - ./ 121 | ignoreFilePattern: 122 | - ".git" 123 | - ".github" 124 | - ".gradle" 125 | - "build" 126 | 127 | - name: authors 128 | serviceType: deployment 129 | dependLabelSelector: 130 | pods: 131 | - "productpage" 132 | containers: 133 | - install: 134 | env: 135 | - name: ENV_INJECT_EXAM 136 | value: BASE 137 | dev: 138 | gitUrl: https://e.coding.net/nocalhost/nocalhost/bookinfo-authors.git 139 | image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/golang:latest 140 | shell: sh 141 | workDir: /home/nocalhost-dev 142 | command: 143 | run: [ "./run.sh" ] 144 | debug: [ "./debug.sh" ] 145 | debug: 146 | remoteDebugPort: 9009 147 | hotReload: true 148 | sync: 149 | type: send 150 | filePattern: 151 | - ./ 152 | ignoreFilePattern: 153 | - ".git" 154 | - ".idea" 155 | - ".github" 156 | -------------------------------------------------------------------------------- /charts/bookinfo/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | {{/* 3 | Expand the name of the chart. 4 | */}} 5 | {{- define "test.name" -}} 6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} 7 | {{- end -}} 8 | 9 | {{/* 10 | Create a default fully qualified app name. 11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 12 | If release name contains chart name it will be used as a full name. 13 | */}} 14 | {{- define "test.fullname" -}} 15 | {{- if .Values.fullnameOverride -}} 16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} 17 | {{- else -}} 18 | {{- $name := default .Chart.Name .Values.nameOverride -}} 19 | {{- if contains $name .Release.Name -}} 20 | {{- .Release.Name | trunc 63 | trimSuffix "-" -}} 21 | {{- else -}} 22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} 23 | {{- end -}} 24 | {{- end -}} 25 | {{- end -}} 26 | 27 | {{/* 28 | Create chart name and version as used by the chart label. 29 | */}} 30 | {{- define "test.chart" -}} 31 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} 32 | {{- end -}} 33 | 34 | {{/* 35 | Common labels 36 | */}} 37 | {{- define "test.labels" -}} 38 | app.kubernetes.io/name: {{ include "test.name" . }} 39 | helm.sh/chart: {{ include "test.chart" . }} 40 | app.kubernetes.io/instance: {{ .Release.Name }} 41 | {{- if .Chart.AppVersion }} 42 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} 43 | {{- end }} 44 | app.kubernetes.io/managed-by: {{ .Release.Service }} 45 | {{- end -}} 46 | 47 | {{/* 48 | Create the name of the service account to use 49 | */}} 50 | {{- define "test.serviceAccountName" -}} 51 | {{- if .Values.serviceAccount.create -}} 52 | {{ default (include "test.fullname" .) .Values.serviceAccount.name }} 53 | {{- else -}} 54 | {{ default "default" .Values.serviceAccount.name }} 55 | {{- end -}} 56 | {{- end -}} 57 | -------------------------------------------------------------------------------- /charts/bookinfo/templates/dep-job.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: batch/v1 2 | kind: Job 3 | metadata: 4 | name: dep-job 5 | labels: 6 | app: dep-job 7 | spec: 8 | template: 9 | spec: 10 | containers: 11 | - name: print-num 12 | image: nocalhost-docker.pkg.coding.net/nocalhost/public/alpine:latest 13 | command: ["sleep", "2"] 14 | restartPolicy: Never 15 | backoffLimit: 4 -------------------------------------------------------------------------------- /charts/bookinfo/templates/microservice-authors.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: authors 6 | labels: 7 | app: authors 8 | service: authors 9 | spec: 10 | ports: 11 | - port: 9080 12 | name: http 13 | selector: 14 | app: authors 15 | --- 16 | apiVersion: apps/v1 17 | kind: Deployment 18 | metadata: 19 | name: authors 20 | {{- if .Values.nocalhost.annotations.path.authors }} 21 | annotations: 22 | dev.nocalhost: |- 23 | {{ .Files.Get .Values.nocalhost.annotations.path.authors | nindent 6 }} 24 | {{- end }} 25 | labels: 26 | app: authors 27 | spec: 28 | replicas: 2 29 | selector: 30 | matchLabels: 31 | app: authors 32 | template: 33 | metadata: 34 | labels: 35 | app: authors 36 | spec: 37 | containers: 38 | - name: authors 39 | image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/authors 40 | imagePullPolicy: Always 41 | ports: 42 | - containerPort: 9080 43 | {{- with .Values.resources.authors }} 44 | resources: 45 | {{- toYaml . | nindent 10 }} 46 | {{- end }} 47 | 48 | -------------------------------------------------------------------------------- /charts/bookinfo/templates/microservice-details.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: details 6 | labels: 7 | app: details 8 | service: details 9 | spec: 10 | ports: 11 | - port: 9080 12 | name: http 13 | selector: 14 | app: details 15 | --- 16 | apiVersion: apps/v1 17 | kind: Deployment 18 | metadata: 19 | name: details 20 | {{- if .Values.nocalhost.annotations.path.details }} 21 | annotations: 22 | nocalhost.dev: |- 23 | {{ .Files.Get .Values.nocalhost.annotations.path.details | nindent 6 }} 24 | {{- end }} 25 | labels: 26 | app: details 27 | spec: 28 | replicas: 2 29 | selector: 30 | matchLabels: 31 | app: details 32 | template: 33 | metadata: 34 | labels: 35 | app: details 36 | spec: 37 | containers: 38 | - name: details 39 | image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/details 40 | imagePullPolicy: Always 41 | ports: 42 | - containerPort: 9080 43 | {{- with .Values.resources.details }} 44 | resources: 45 | {{- toYaml . | nindent 10 }} 46 | {{- end }} 47 | -------------------------------------------------------------------------------- /charts/bookinfo/templates/microservice-productpage.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: productpage 6 | labels: 7 | app: productpage 8 | service: productpage 9 | spec: 10 | ports: 11 | - port: 9080 12 | name: http 13 | selector: 14 | app: productpage 15 | type: {{.Values.ServiceType}} 16 | --- 17 | apiVersion: apps/v1 18 | kind: Deployment 19 | metadata: 20 | name: productpage 21 | {{- if .Values.nocalhost.annotations.path.productpage }} 22 | annotations: 23 | nocalhost.dev: |- 24 | {{ .Files.Get .Values.nocalhost.annotations.path.productpage | nindent 6 }} 25 | {{- end }} 26 | labels: 27 | app: productpage 28 | app.kubernetes.io/name: productpage 29 | spec: 30 | replicas: 1 31 | selector: 32 | matchLabels: 33 | app.kubernetes.io/name: productpage 34 | app: productpage 35 | template: 36 | metadata: 37 | labels: 38 | app.kubernetes.io/name: productpage 39 | app: productpage 40 | spec: 41 | containers: 42 | - name: productpage 43 | image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/productpage 44 | imagePullPolicy: IfNotPresent 45 | command: ['python', 'productpage.py', '9080'] 46 | ports: 47 | - containerPort: 9080 48 | readinessProbe: 49 | tcpSocket: 50 | port: 9080 51 | initialDelaySeconds: 5 52 | periodSeconds: 10 53 | volumeMounts: 54 | - name: tmp 55 | mountPath: /tmp 56 | {{- with .Values.resources.productpage }} 57 | resources: 58 | {{- toYaml . | nindent 10 }} 59 | {{- end }} 60 | volumes: 61 | - name: tmp 62 | emptyDir: {} 63 | -------------------------------------------------------------------------------- /charts/bookinfo/templates/microservice-ratings.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: ratings 6 | labels: 7 | app: ratings 8 | service: ratings 9 | spec: 10 | ports: 11 | - port: 9080 12 | name: http 13 | selector: 14 | app: ratings 15 | --- 16 | apiVersion: apps/v1 17 | kind: Deployment 18 | metadata: 19 | name: ratings 20 | {{- if .Values.nocalhost.annotations.path.ratings }} 21 | annotations: 22 | nocalhost.dev: |- 23 | {{ .Files.Get .Values.nocalhost.annotations.path.ratings | nindent 6 }} 24 | {{- end }} 25 | labels: 26 | app: ratings 27 | spec: 28 | replicas: 2 29 | selector: 30 | matchLabels: 31 | app: ratings 32 | template: 33 | metadata: 34 | labels: 35 | app: ratings 36 | spec: 37 | containers: 38 | - name: ratings 39 | image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/ratings 40 | imagePullPolicy: Always 41 | ports: 42 | - containerPort: 9080 43 | {{- with .Values.resources.ratings }} 44 | resources: 45 | {{- toYaml . | nindent 10 }} 46 | {{- end }} 47 | -------------------------------------------------------------------------------- /charts/bookinfo/templates/microservice-reviews.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: reviews 6 | labels: 7 | app: reviews 8 | service: reviews 9 | spec: 10 | ports: 11 | - port: 9080 12 | name: http 13 | selector: 14 | app: reviews 15 | --- 16 | apiVersion: apps/v1 17 | kind: Deployment 18 | metadata: 19 | name: reviews 20 | {{- if .Values.nocalhost.annotations.path.reviews }} 21 | annotations: 22 | nocalhost.dev: |- 23 | {{ .Files.Get .Values.nocalhost.annotations.path.reviews | nindent 6 }} 24 | {{- end }} 25 | labels: 26 | app: reviews 27 | spec: 28 | replicas: 2 29 | selector: 30 | matchLabels: 31 | app: reviews 32 | template: 33 | metadata: 34 | labels: 35 | app: reviews 36 | spec: 37 | containers: 38 | - name: reviews 39 | image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/reviews 40 | env: 41 | - name: server.port 42 | value: "9080" 43 | imagePullPolicy: Always 44 | ports: 45 | - containerPort: 9080 46 | {{- with .Values.resources.reviews }} 47 | resources: 48 | {{- toYaml . | nindent 10 }} 49 | {{- end }} 50 | 51 | -------------------------------------------------------------------------------- /charts/bookinfo/templates/nocalhost-app-config.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | # [Nocalhost]: nocalhost configmap should be named with dev.nocalhost.config.${appName} 5 | name: "dev.nocalhost.config.{{ .Release.Name }}" 6 | # [Nocalhost]: labels {dep-management: nocalhost} is also required 7 | labels: 8 | dep-management: nocalhost 9 | annotations: 10 | "helm.sh/hook": pre-install 11 | data: 12 | config: |- 13 | {{ .Files.Get .Values.nocalhost.config.path | nindent 4 }} -------------------------------------------------------------------------------- /charts/bookinfo/values-with-annotations-config.yaml: -------------------------------------------------------------------------------- 1 | ServiceType: ClusterIP 2 | 3 | nocalhost: 4 | config: 5 | path: "" 6 | 7 | annotations: 8 | path: 9 | authors: "config-example/annotations/authors.yaml" 10 | details: "config-example/annotations/details.yaml" 11 | productpage: "config-example/annotations/productpage.yaml" 12 | ratings: "config-example/annotations/ratings.yaml" 13 | reviews: "config-example/annotations/reviews.yaml" 14 | 15 | resources: 16 | authors: 17 | limits: 18 | cpu: 50m 19 | memory: 128Mi 20 | requests: 21 | cpu: 10m 22 | memory: 32Mi 23 | details: 24 | limits: 25 | cpu: 100m 26 | memory: 256Mi 27 | requests: 28 | cpu: 10m 29 | memory: 32Mi 30 | productpage: 31 | limits: 32 | cpu: 100m 33 | memory: 256Mi 34 | requests: 35 | cpu: 10m 36 | memory: 32Mi 37 | ratings: 38 | limits: 39 | cpu: 100m 40 | memory: 256Mi 41 | requests: 42 | cpu: 10m 43 | memory: 32Mi 44 | reviews: 45 | limits: 46 | cpu: 200m 47 | memory: 512Mi 48 | requests: 49 | cpu: 10m 50 | memory: 32Mi 51 | -------------------------------------------------------------------------------- /charts/bookinfo/values-with-cm-config.yaml: -------------------------------------------------------------------------------- 1 | ServiceType: ClusterIP 2 | 3 | nocalhost: 4 | config: 5 | path: "config-example/cm/nocalhost-config.yaml" 6 | 7 | annotations: 8 | path: 9 | authors: "" 10 | details: "" 11 | productpage: "" 12 | ratings: "" 13 | reviews: "" 14 | 15 | resources: 16 | authors: 17 | limits: 18 | cpu: 50m 19 | memory: 128Mi 20 | requests: 21 | cpu: 10m 22 | memory: 32Mi 23 | details: 24 | limits: 25 | cpu: 100m 26 | memory: 256Mi 27 | requests: 28 | cpu: 10m 29 | memory: 32Mi 30 | productpage: 31 | limits: 32 | cpu: 100m 33 | memory: 256Mi 34 | requests: 35 | cpu: 10m 36 | memory: 32Mi 37 | ratings: 38 | limits: 39 | cpu: 100m 40 | memory: 256Mi 41 | requests: 42 | cpu: 10m 43 | memory: 32Mi 44 | reviews: 45 | limits: 46 | cpu: 200m 47 | memory: 512Mi 48 | requests: 49 | cpu: 10m 50 | memory: 32Mi 51 | -------------------------------------------------------------------------------- /charts/bookinfo/values.yaml: -------------------------------------------------------------------------------- 1 | ServiceType: NodePort 2 | 3 | nocalhost: 4 | config: 5 | path: "" 6 | 7 | annotations: 8 | path: 9 | authors: "" 10 | details: "" 11 | productpage: "" 12 | ratings: "" 13 | reviews: "" 14 | 15 | resources: 16 | authors: 17 | limits: 18 | cpu: 50m 19 | memory: 128Mi 20 | requests: 21 | cpu: 10m 22 | memory: 32Mi 23 | details: 24 | limits: 25 | cpu: 100m 26 | memory: 256Mi 27 | requests: 28 | cpu: 10m 29 | memory: 32Mi 30 | productpage: 31 | limits: 32 | cpu: 100m 33 | memory: 256Mi 34 | requests: 35 | cpu: 10m 36 | memory: 32Mi 37 | ratings: 38 | limits: 39 | cpu: 100m 40 | memory: 256Mi 41 | requests: 42 | cpu: 10m 43 | memory: 32Mi 44 | reviews: 45 | limits: 46 | cpu: 200m 47 | memory: 512Mi 48 | requests: 49 | cpu: 10m 50 | memory: 32Mi 51 | -------------------------------------------------------------------------------- /charts/bookinfo/values_example.yaml: -------------------------------------------------------------------------------- 1 | ServiceType: NodePort 2 | 3 | nocalhost: 4 | config: 5 | path: "" 6 | 7 | annotations: 8 | path: 9 | authors: "" 10 | details: "" 11 | productpage: "" 12 | ratings: "" 13 | reviews: "" 14 | 15 | resources: 16 | authors: 17 | limits: 18 | cpu: 50m 19 | memory: 128Mi 20 | requests: 21 | cpu: 10m 22 | memory: 32Mi 23 | details: 24 | limits: 25 | cpu: 100m 26 | memory: 256Mi 27 | requests: 28 | cpu: 10m 29 | memory: 32Mi 30 | productpage: 31 | limits: 32 | cpu: 100m 33 | memory: 256Mi 34 | requests: 35 | cpu: 10m 36 | memory: 32Mi 37 | ratings: 38 | limits: 39 | cpu: 100m 40 | memory: 256Mi 41 | requests: 42 | cpu: 10m 43 | memory: 32Mi 44 | reviews: 45 | limits: 46 | cpu: 200m 47 | memory: 512Mi 48 | requests: 49 | cpu: 10m 50 | memory: 32Mi 51 | 52 | -------------------------------------------------------------------------------- /kustomize/base/authors.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: authors 5 | labels: 6 | app: authors 7 | service: authors 8 | spec: 9 | ports: 10 | - port: 9080 11 | name: http 12 | selector: 13 | app: authors 14 | --- 15 | apiVersion: apps/v1 16 | kind: Deployment 17 | metadata: 18 | name: authors 19 | labels: 20 | app: authors 21 | spec: 22 | replicas: 1 23 | selector: 24 | matchLabels: 25 | app: authors 26 | template: 27 | metadata: 28 | labels: 29 | app: authors 30 | spec: 31 | containers: 32 | - name: authors 33 | image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/authors 34 | imagePullPolicy: Always 35 | ports: 36 | - containerPort: 9080 37 | readinessProbe: 38 | tcpSocket: 39 | port: 9080 40 | initialDelaySeconds: 5 41 | periodSeconds: 10 42 | resources: 43 | limits: 44 | cpu: 50m 45 | memory: 128Mi 46 | requests: 47 | cpu: 10m 48 | memory: 32Mi 49 | --- 50 | -------------------------------------------------------------------------------- /kustomize/base/dep-job.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: batch/v1 2 | kind: Job 3 | metadata: 4 | name: dep-job 5 | spec: 6 | template: 7 | spec: 8 | containers: 9 | - name: print-num 10 | image: nocalhost-docker.pkg.coding.net/nocalhost/public/alpine:latest 11 | command: ["sleep", "2"] 12 | restartPolicy: Never 13 | backoffLimit: 4 -------------------------------------------------------------------------------- /kustomize/base/detail.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: details 5 | labels: 6 | app: details 7 | service: details 8 | spec: 9 | ports: 10 | - port: 9080 11 | name: http 12 | selector: 13 | app: details 14 | --- 15 | apiVersion: apps/v1 16 | kind: Deployment 17 | metadata: 18 | name: details 19 | labels: 20 | app: details 21 | spec: 22 | replicas: 1 23 | selector: 24 | matchLabels: 25 | app: details 26 | template: 27 | metadata: 28 | labels: 29 | app: details 30 | spec: 31 | containers: 32 | - name: details 33 | image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/details 34 | imagePullPolicy: IfNotPresent 35 | command: ['ruby', 'details.rb', '9080'] 36 | envFrom: 37 | - configMapRef: 38 | name: bookinfo-pre-install-config 39 | ports: 40 | - containerPort: 9080 41 | readinessProbe: 42 | tcpSocket: 43 | port: 9080 44 | initialDelaySeconds: 5 45 | periodSeconds: 10 46 | resources: 47 | limits: 48 | cpu: 100m 49 | memory: 256Mi 50 | requests: 51 | cpu: 10m 52 | memory: 32Mi 53 | --- 54 | -------------------------------------------------------------------------------- /kustomize/base/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | - detail.yaml 3 | - productpage.yaml 4 | - ratings.yaml 5 | - reviews.yaml 6 | - authors.yaml 7 | - dep-job.yaml 8 | - pre-install-cm.yaml -------------------------------------------------------------------------------- /kustomize/base/pre-install-cm.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: bookinfo-pre-install-config 5 | data: 6 | ENV01: aa 7 | ENV02: bb 8 | ENV03: cc 9 | ENV04: dd 10 | -------------------------------------------------------------------------------- /kustomize/base/pre-install/print-num-job-01.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: batch/v1 2 | kind: Job 3 | metadata: 4 | name: print-num-01 5 | spec: 6 | template: 7 | spec: 8 | containers: 9 | - name: print-num 10 | image: nocalhost-docker.pkg.coding.net/nocalhost/public/alpine:latest 11 | command: ["sleep", "1"] 12 | restartPolicy: Never 13 | backoffLimit: 4 14 | -------------------------------------------------------------------------------- /kustomize/base/pre-install/print-num-job-02.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: batch/v1 2 | kind: Job 3 | metadata: 4 | name: print-num-02 5 | spec: 6 | template: 7 | spec: 8 | containers: 9 | - name: print-num 10 | image: nocalhost-docker.pkg.coding.net/nocalhost/public/alpine:latest 11 | command: ["sleep", "1"] 12 | restartPolicy: Never 13 | backoffLimit: 4 14 | -------------------------------------------------------------------------------- /kustomize/base/productpage.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: productpage 5 | labels: 6 | app: productpage 7 | service: productpage 8 | spec: 9 | ports: 10 | - port: 9080 11 | name: http 12 | selector: 13 | app: productpage 14 | --- 15 | apiVersion: apps/v1 16 | kind: Deployment 17 | metadata: 18 | name: productpage 19 | labels: 20 | app: productpage 21 | app.kubernetes.io/name: productpage 22 | spec: 23 | replicas: 2 24 | selector: 25 | matchLabels: 26 | app.kubernetes.io/name: productpage 27 | app: productpage 28 | template: 29 | metadata: 30 | labels: 31 | app.kubernetes.io/name: productpage 32 | app: productpage 33 | spec: 34 | containers: 35 | - name: productpage 36 | image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/productpage 37 | imagePullPolicy: IfNotPresent 38 | command: ['python', 'productpage.py', '9080'] 39 | ports: 40 | - containerPort: 9080 41 | readinessProbe: 42 | tcpSocket: 43 | port: 9080 44 | initialDelaySeconds: 5 45 | periodSeconds: 10 46 | volumeMounts: 47 | - name: tmp 48 | mountPath: /tmp 49 | resources: 50 | limits: 51 | cpu: 100m 52 | memory: 256Mi 53 | requests: 54 | cpu: 10m 55 | memory: 32Mi 56 | volumes: 57 | - name: tmp 58 | emptyDir: {} 59 | --- 60 | -------------------------------------------------------------------------------- /kustomize/base/ratings.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: ratings 5 | labels: 6 | app: ratings 7 | service: ratings 8 | spec: 9 | ports: 10 | - port: 9080 11 | name: http 12 | selector: 13 | app: ratings 14 | --- 15 | apiVersion: apps/v1 16 | kind: Deployment 17 | metadata: 18 | name: ratings 19 | labels: 20 | app: ratings 21 | spec: 22 | replicas: 1 23 | selector: 24 | matchLabels: 25 | app: ratings 26 | template: 27 | metadata: 28 | labels: 29 | app: ratings 30 | spec: 31 | containers: 32 | - name: ratings 33 | image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/ratings 34 | imagePullPolicy: IfNotPresent 35 | ports: 36 | - containerPort: 9080 37 | readinessProbe: 38 | tcpSocket: 39 | port: 9080 40 | initialDelaySeconds: 5 41 | periodSeconds: 10 42 | resources: 43 | limits: 44 | cpu: 100m 45 | memory: 256Mi 46 | requests: 47 | cpu: 10m 48 | memory: 32Mi 49 | --- 50 | -------------------------------------------------------------------------------- /kustomize/base/reviews.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: reviews 5 | labels: 6 | app: reviews 7 | service: reviews 8 | spec: 9 | ports: 10 | - port: 9080 11 | name: http 12 | selector: 13 | app: reviews 14 | --- 15 | apiVersion: apps/v1 16 | kind: Deployment 17 | metadata: 18 | name: reviews 19 | labels: 20 | app: reviews 21 | spec: 22 | replicas: 1 23 | selector: 24 | matchLabels: 25 | app: reviews 26 | template: 27 | metadata: 28 | labels: 29 | app: reviews 30 | spec: 31 | containers: 32 | - name: reviews 33 | image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/reviews:latest 34 | imagePullPolicy: Always 35 | env: 36 | - name: LOG_DIR 37 | value: "/tmp/logs" 38 | ports: 39 | - containerPort: 9080 40 | readinessProbe: 41 | tcpSocket: 42 | port: 9080 43 | initialDelaySeconds: 5 44 | periodSeconds: 10 45 | volumeMounts: 46 | - name: tmp 47 | mountPath: /tmp 48 | - name: wlp-output 49 | mountPath: /opt/ibm/wlp/output 50 | resources: 51 | limits: 52 | cpu: 200m 53 | memory: 512Mi 54 | requests: 55 | cpu: 10m 56 | memory: 32Mi 57 | volumes: 58 | - name: wlp-output 59 | emptyDir: {} 60 | - name: tmp 61 | emptyDir: {} 62 | --- 63 | -------------------------------------------------------------------------------- /manifest/annotation/authors.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: authors 5 | labels: 6 | app: authors 7 | service: authors 8 | spec: 9 | ports: 10 | - port: 9080 11 | name: http 12 | selector: 13 | app: authors 14 | --- 15 | apiVersion: apps/v1 16 | kind: Deployment 17 | metadata: 18 | name: authors 19 | labels: 20 | app: authors 21 | annotations: 22 | dev.nocalhost: | 23 | containers: 24 | - dev: 25 | gitUrl: https://e.coding.net/nocalhost/nocalhost/bookinfo-authors.git 26 | image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/golang:latest 27 | shell: sh 28 | workDir: /home/nocalhost-dev 29 | command: 30 | run: [ "./run.sh" ] 31 | debug: [ "./debug.sh" ] 32 | debug: 33 | remoteDebugPort: 9009 34 | hotReload: true 35 | sync: 36 | type: send 37 | filePattern: 38 | - ./ 39 | ignoreFilePattern: 40 | - ".git" 41 | - ".idea" 42 | - ".github" 43 | env: 44 | - name: DEBUG 45 | value: "true" 46 | spec: 47 | replicas: 1 48 | selector: 49 | matchLabels: 50 | app: authors 51 | template: 52 | metadata: 53 | labels: 54 | app: authors 55 | spec: 56 | containers: 57 | - name: authors 58 | image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/authors:latest 59 | imagePullPolicy: Always 60 | ports: 61 | - containerPort: 9080 62 | readinessProbe: 63 | tcpSocket: 64 | port: 9080 65 | initialDelaySeconds: 5 66 | periodSeconds: 10 67 | resources: 68 | limits: 69 | cpu: 50m 70 | memory: 128Mi 71 | requests: 72 | cpu: 10m 73 | memory: 32Mi 74 | --- 75 | -------------------------------------------------------------------------------- /manifest/annotation/detail.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: details 5 | labels: 6 | app: details 7 | service: details 8 | spec: 9 | ports: 10 | - port: 9080 11 | name: http 12 | selector: 13 | app: details 14 | --- 15 | apiVersion: apps/v1 16 | kind: Deployment 17 | metadata: 18 | name: details 19 | labels: 20 | app: details 21 | annotations: 22 | dev.nocalhost: | 23 | containers: 24 | - dev: 25 | gitUrl: https://e.coding.net/nocalhost/nocalhost/bookinfo-details.git 26 | image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/ruby:2.7-buster 27 | shell: bash 28 | workDir: /home/nocalhost-dev 29 | command: 30 | run: 31 | - ./run.sh 32 | debug: 33 | - ./debug.sh 34 | debug: 35 | remoteDebugPort: 9001 36 | sync: 37 | type: send 38 | filePattern: 39 | - ./ 40 | ignoreFilePattern: 41 | - ".git" 42 | - ".github" 43 | env: 44 | - name: DEBUG 45 | value: "true" 46 | spec: 47 | replicas: 1 48 | selector: 49 | matchLabels: 50 | app: details 51 | template: 52 | metadata: 53 | labels: 54 | app: details 55 | spec: 56 | containers: 57 | - name: details 58 | image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/details 59 | imagePullPolicy: IfNotPresent 60 | command: ['ruby', 'details.rb', '9080'] 61 | ports: 62 | - containerPort: 9080 63 | readinessProbe: 64 | tcpSocket: 65 | port: 9080 66 | initialDelaySeconds: 5 67 | periodSeconds: 10 68 | resources: 69 | limits: 70 | cpu: 100m 71 | memory: 256Mi 72 | requests: 73 | cpu: 10m 74 | memory: 32Mi 75 | - name: ubuntu 76 | image: nocalhost-docker.pkg.coding.net/nocalhost/public/ubuntu:stable 77 | imagePullPolicy: IfNotPresent 78 | command: ['/bin/sh', '-c', 'tail -f /dev/null'] 79 | resources: 80 | limits: 81 | cpu: 100m 82 | memory: 256Mi 83 | requests: 84 | cpu: 10m 85 | memory: 32Mi 86 | --- 87 | -------------------------------------------------------------------------------- /manifest/annotation/productpage.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: productpage 5 | labels: 6 | app: productpage 7 | service: productpage 8 | spec: 9 | ports: 10 | - port: 9080 11 | name: http 12 | selector: 13 | app: productpage 14 | --- 15 | apiVersion: apps/v1 16 | kind: Deployment 17 | metadata: 18 | name: productpage 19 | labels: 20 | app: productpage 21 | app.kubernetes.io/name: productpage 22 | annotations: 23 | dev.nocalhost: | 24 | containers: 25 | - name: productpage 26 | install: 27 | portForward: 28 | - 39080:9080 29 | dev: 30 | gitUrl: https://e.coding.net/nocalhost/nocalhost/bookinfo-productpage.git 31 | image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/python:3.7.7-slim-productpage-with-pydevd 32 | shell: bash 33 | workDir: /home/nocalhost-dev 34 | command: 35 | run: 36 | - ./run.sh 37 | debug: 38 | - ./debug.sh 39 | debug: 40 | remoteDebugPort: 9009 41 | sync: 42 | type: send 43 | filePattern: 44 | - ./ 45 | ignoreFilePattern: 46 | - ".git" 47 | - ".github" 48 | - ".idea" 49 | portForward: 50 | - 39080:9080 51 | spec: 52 | replicas: 2 53 | selector: 54 | matchLabels: 55 | app.kubernetes.io/name: productpage 56 | app: productpage 57 | template: 58 | metadata: 59 | labels: 60 | app.kubernetes.io/name: productpage 61 | app: productpage 62 | spec: 63 | containers: 64 | - name: productpage 65 | image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/productpage 66 | imagePullPolicy: IfNotPresent 67 | command: ['python', 'productpage.py', '9080'] 68 | ports: 69 | - containerPort: 9080 70 | readinessProbe: 71 | tcpSocket: 72 | port: 9080 73 | initialDelaySeconds: 5 74 | periodSeconds: 10 75 | volumeMounts: 76 | - name: tmp 77 | mountPath: /tmp 78 | resources: 79 | limits: 80 | cpu: 100m 81 | memory: 256Mi 82 | requests: 83 | cpu: 10m 84 | memory: 32Mi 85 | volumes: 86 | - name: tmp 87 | emptyDir: {} 88 | --- 89 | -------------------------------------------------------------------------------- /manifest/annotation/ratings.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: ratings 5 | labels: 6 | app: ratings 7 | service: ratings 8 | spec: 9 | ports: 10 | - port: 9080 11 | name: http 12 | selector: 13 | app: ratings 14 | --- 15 | apiVersion: apps/v1 16 | kind: Deployment 17 | metadata: 18 | name: ratings 19 | labels: 20 | app: ratings 21 | annotations: 22 | dev.nocalhost: | 23 | containers: 24 | - dev: 25 | gitUrl: https://e.coding.net/nocalhost/nocalhost/bookinfo-ratings.git 26 | image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/node:12.18.1-slim 27 | shell: bash 28 | workDir: /home/nocalhost-dev 29 | command: 30 | build: [] 31 | run: 32 | - ./run.sh 33 | debug: 34 | - ./debug.sh 35 | hotReloadRun: [] 36 | hotReloadDebug: [] 37 | debug: 38 | remoteDebugPort: 9229 39 | sync: 40 | type: send 41 | filePattern: 42 | - ./ 43 | ignoreFilePattern: 44 | - ".git" 45 | - ".idea" 46 | - ".github" 47 | - "node_modules" 48 | env: 49 | - name: DEBUG 50 | value: "true" 51 | spec: 52 | replicas: 1 53 | selector: 54 | matchLabels: 55 | app: ratings 56 | template: 57 | metadata: 58 | labels: 59 | app: ratings 60 | spec: 61 | containers: 62 | - name: ratings 63 | image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/ratings 64 | imagePullPolicy: IfNotPresent 65 | ports: 66 | - containerPort: 9080 67 | readinessProbe: 68 | tcpSocket: 69 | port: 9080 70 | initialDelaySeconds: 5 71 | periodSeconds: 10 72 | resources: 73 | limits: 74 | cpu: 100m 75 | memory: 256Mi 76 | requests: 77 | cpu: 10m 78 | memory: 32Mi 79 | --- 80 | -------------------------------------------------------------------------------- /manifest/annotation/reviews.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: reviews 5 | labels: 6 | app: reviews 7 | service: reviews 8 | spec: 9 | ports: 10 | - port: 9080 11 | name: http 12 | selector: 13 | app: reviews 14 | --- 15 | apiVersion: apps/v1 16 | kind: Deployment 17 | metadata: 18 | name: reviews 19 | labels: 20 | app: reviews 21 | annotations: 22 | dev.nocalhost: | 23 | containers: 24 | - dev: 25 | gitUrl: https://e.coding.net/nocalhost/nocalhost/bookinfo-reviews.git 26 | image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/java:latest 27 | shell: bash 28 | workDir: /home/nocalhost-dev 29 | command: 30 | build: [ "./gradlew", "build" ] 31 | run: [ "./gradlew", "bootRun" ] 32 | debug: [ "./gradlew", "bootRun", "--debug-jvm" ] 33 | debug: 34 | remoteDebugPort: 5005 35 | sync: 36 | type: send 37 | filePattern: 38 | - ./ 39 | ignoreFilePattern: 40 | - ".git" 41 | - ".github" 42 | - ".gradle" 43 | - "build" 44 | spec: 45 | replicas: 1 46 | selector: 47 | matchLabels: 48 | app: reviews 49 | template: 50 | metadata: 51 | labels: 52 | app: reviews 53 | spec: 54 | containers: 55 | - name: reviews 56 | image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/reviews:latest 57 | imagePullPolicy: Always 58 | env: 59 | - name: LOG_DIR 60 | value: "/tmp/logs" 61 | ports: 62 | - containerPort: 9080 63 | readinessProbe: 64 | tcpSocket: 65 | port: 9080 66 | initialDelaySeconds: 5 67 | periodSeconds: 10 68 | volumeMounts: 69 | - name: tmp 70 | mountPath: /tmp 71 | - name: wlp-output 72 | mountPath: /opt/ibm/wlp/output 73 | resources: 74 | limits: 75 | cpu: 200m 76 | memory: 512Mi 77 | requests: 78 | cpu: 10m 79 | memory: 32Mi 80 | volumes: 81 | - name: wlp-output 82 | emptyDir: {} 83 | - name: tmp 84 | emptyDir: {} 85 | --- 86 | -------------------------------------------------------------------------------- /manifest/templates/authors.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: authors 5 | labels: 6 | app: authors 7 | service: authors 8 | spec: 9 | ports: 10 | - port: 9080 11 | name: http 12 | selector: 13 | app: authors 14 | --- 15 | apiVersion: apps/v1 16 | kind: Deployment 17 | metadata: 18 | name: authors 19 | labels: 20 | app: authors 21 | spec: 22 | replicas: 1 23 | selector: 24 | matchLabels: 25 | app: authors 26 | template: 27 | metadata: 28 | labels: 29 | app: authors 30 | spec: 31 | containers: 32 | - name: authors 33 | image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/authors:latest 34 | imagePullPolicy: Always 35 | ports: 36 | - containerPort: 9080 37 | readinessProbe: 38 | tcpSocket: 39 | port: 9080 40 | initialDelaySeconds: 5 41 | periodSeconds: 10 42 | resources: 43 | limits: 44 | cpu: 50m 45 | memory: 128Mi 46 | requests: 47 | cpu: 10m 48 | memory: 32Mi 49 | --- 50 | -------------------------------------------------------------------------------- /manifest/templates/bookinfo/dep-job.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: batch/v1 2 | kind: Job 3 | metadata: 4 | name: dep-job 5 | spec: 6 | template: 7 | spec: 8 | containers: 9 | - name: print-num 10 | image: nocalhost-docker.pkg.coding.net/nocalhost/public/alpine:latest 11 | command: ["sleep", "2"] 12 | restartPolicy: Never 13 | backoffLimit: 4 -------------------------------------------------------------------------------- /manifest/templates/detail.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: details 5 | labels: 6 | app: details 7 | service: details 8 | spec: 9 | ports: 10 | - port: 9080 11 | name: http 12 | selector: 13 | app: details 14 | --- 15 | apiVersion: apps/v1 16 | kind: Deployment 17 | metadata: 18 | name: details 19 | labels: 20 | app: details 21 | spec: 22 | replicas: 1 23 | selector: 24 | matchLabels: 25 | app: details 26 | template: 27 | metadata: 28 | labels: 29 | app: details 30 | spec: 31 | containers: 32 | - name: details 33 | image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/details 34 | imagePullPolicy: IfNotPresent 35 | command: ['ruby', 'details.rb', '9080'] 36 | ports: 37 | - containerPort: 9080 38 | readinessProbe: 39 | tcpSocket: 40 | port: 9080 41 | initialDelaySeconds: 5 42 | periodSeconds: 10 43 | resources: 44 | limits: 45 | cpu: 100m 46 | memory: 256Mi 47 | requests: 48 | cpu: 10m 49 | memory: 32Mi 50 | - name: sidecar 51 | image: nocalhost-docker.pkg.coding.net/nocalhost/public/ubuntu:stable 52 | imagePullPolicy: IfNotPresent 53 | command: ['/bin/sh', '-c', 'tail -f /dev/null'] 54 | resources: 55 | limits: 56 | cpu: 100m 57 | memory: 256Mi 58 | requests: 59 | cpu: 10m 60 | memory: 32Mi 61 | --- 62 | -------------------------------------------------------------------------------- /manifest/templates/pre-install-cm.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: bookinfo-pre-install-config 5 | data: 6 | ENV01: aa 7 | ENV02: bb 8 | ENV03: cc 9 | ENV04: dd 10 | -------------------------------------------------------------------------------- /manifest/templates/pre-install/print-num-job-01.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: batch/v1 2 | kind: Job 3 | metadata: 4 | name: print-num-01 5 | spec: 6 | template: 7 | spec: 8 | containers: 9 | - name: print-num 10 | image: nocalhost-docker.pkg.coding.net/nocalhost/public/alpine:latest 11 | command: ["sleep", "1"] 12 | restartPolicy: Never 13 | backoffLimit: 4 14 | -------------------------------------------------------------------------------- /manifest/templates/pre-install/print-num-job-02.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: batch/v1 2 | kind: Job 3 | metadata: 4 | name: print-num-02 5 | spec: 6 | template: 7 | spec: 8 | containers: 9 | - name: print-num 10 | image: nocalhost-docker.pkg.coding.net/nocalhost/public/alpine:latest 11 | command: ["sleep", "1"] 12 | restartPolicy: Never 13 | backoffLimit: 4 14 | -------------------------------------------------------------------------------- /manifest/templates/productpage/productpage.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: productpage 5 | labels: 6 | app: productpage 7 | service: productpage 8 | spec: 9 | ports: 10 | - port: 9080 11 | name: http 12 | selector: 13 | app: productpage 14 | --- 15 | apiVersion: apps/v1 16 | kind: Deployment 17 | metadata: 18 | name: productpage 19 | labels: 20 | app: productpage 21 | app.kubernetes.io/name: productpage 22 | spec: 23 | replicas: 2 24 | selector: 25 | matchLabels: 26 | app.kubernetes.io/name: productpage 27 | app: productpage 28 | template: 29 | metadata: 30 | labels: 31 | app.kubernetes.io/name: productpage 32 | app: productpage 33 | spec: 34 | containers: 35 | - name: productpage 36 | image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/productpage 37 | imagePullPolicy: Always 38 | command: ['python', 'productpage.py', '9080'] 39 | ports: 40 | - containerPort: 9080 41 | readinessProbe: 42 | tcpSocket: 43 | port: 9080 44 | initialDelaySeconds: 5 45 | periodSeconds: 10 46 | volumeMounts: 47 | - name: tmp 48 | mountPath: /tmp 49 | resources: 50 | limits: 51 | cpu: 100m 52 | memory: 256Mi 53 | requests: 54 | cpu: 10m 55 | memory: 32Mi 56 | volumes: 57 | - name: tmp 58 | emptyDir: {} 59 | --- 60 | -------------------------------------------------------------------------------- /manifest/templates/ratings.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: ratings 5 | labels: 6 | app: ratings 7 | service: ratings 8 | spec: 9 | ports: 10 | - port: 9080 11 | name: http 12 | selector: 13 | app: ratings 14 | --- 15 | apiVersion: apps/v1 16 | kind: Deployment 17 | metadata: 18 | name: ratings 19 | labels: 20 | app: ratings 21 | spec: 22 | replicas: 1 23 | selector: 24 | matchLabels: 25 | app: ratings 26 | template: 27 | metadata: 28 | labels: 29 | app: ratings 30 | spec: 31 | containers: 32 | - name: ratings 33 | image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/ratings 34 | imagePullPolicy: IfNotPresent 35 | ports: 36 | - containerPort: 9080 37 | readinessProbe: 38 | tcpSocket: 39 | port: 9080 40 | initialDelaySeconds: 5 41 | periodSeconds: 10 42 | resources: 43 | limits: 44 | cpu: 100m 45 | memory: 256Mi 46 | requests: 47 | cpu: 10m 48 | memory: 32Mi 49 | --- 50 | -------------------------------------------------------------------------------- /manifest/templates/reviews.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: reviews 5 | labels: 6 | app: reviews 7 | service: reviews 8 | spec: 9 | ports: 10 | - port: 9080 11 | name: http 12 | selector: 13 | app: reviews 14 | --- 15 | apiVersion: apps/v1 16 | kind: Deployment 17 | metadata: 18 | name: reviews 19 | labels: 20 | app: reviews 21 | spec: 22 | replicas: 1 23 | selector: 24 | matchLabels: 25 | app: reviews 26 | template: 27 | metadata: 28 | labels: 29 | app: reviews 30 | spec: 31 | containers: 32 | - name: reviews 33 | image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/reviews:latest 34 | imagePullPolicy: Always 35 | env: 36 | - name: LOG_DIR 37 | value: "/tmp/logs" 38 | ports: 39 | - containerPort: 9080 40 | readinessProbe: 41 | tcpSocket: 42 | port: 9080 43 | initialDelaySeconds: 5 44 | periodSeconds: 10 45 | volumeMounts: 46 | - name: tmp 47 | mountPath: /tmp 48 | - name: wlp-output 49 | mountPath: /opt/ibm/wlp/output 50 | resources: 51 | limits: 52 | cpu: 1 53 | memory: 512Mi 54 | requests: 55 | cpu: 10m 56 | memory: 32Mi 57 | volumes: 58 | - name: wlp-output 59 | emptyDir: {} 60 | - name: tmp 61 | emptyDir: {} 62 | --- 63 | --------------------------------------------------------------------------------