updates to kubernetes deployments

This commit is contained in:
marcel-dempers 2019-09-10 21:42:26 +10:00
parent a8664272e9
commit 20011946e7
5 changed files with 14 additions and 7 deletions

View File

@ -15,7 +15,7 @@ services:
image: aimvector/golang:1.0.0
build:
context: ./golang
target: debug
target: prod
volumes:
- ./golang/src/:/go/src/work/
ports:

View File

@ -11,12 +11,17 @@ import (
func Response(ctx *fasthttp.RequestCtx) {
fmt.Fprintf(ctx, "Hello")
}
func Status(ctx *fasthttp.RequestCtx) {
fmt.Fprintf(ctx, "ok")
}
func main() {
fmt.Println("starting...")
router := fasthttprouter.New()
router.GET("/", Response)
router.GET("/status", Status)
log.Fatal(fasthttp.ListenAndServe(":5000", router.Handler))
}

View File

@ -12,18 +12,16 @@ spec:
labels:
app: example-app
spec:
imagePullSecrets:
- name: "docker-registry"
containers:
- name: example-app
image: aimvector/example-app
image: aimvector/golang:1.0.0
imagePullPolicy: Always
ports:
- containerPort: 80
- containerPort: 5000
livenessProbe:
httpGet:
path: /status
port: 80
port: 5000
initialDelaySeconds: 3
periodSeconds: 3
resources:

View File

@ -23,4 +23,6 @@ docker-compose build nodejs
# aimvector/python:1.0.0
docker-compose build python
```
```
Take a look at example [deployment yaml](./deployment.yaml)

View File

@ -5,3 +5,5 @@
Checkout [kubectl](./kubectl.md) for detailed steps
## Deployments
Checkout [deployments](./deployments/readme.md) for detailed steps