devapp/devappserver: add kubernetes service and deployment configs

Updates golang/go#20691

Change-Id: Ia92422213111a965136c33359c16b17ca3fabec5
Reviewed-on: https://go-review.googlesource.com/46465
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Andrew Bonventre 2017-06-22 14:18:44 -07:00
Родитель b60de1f46f
Коммит 3cc3abb423
3 изменённых файлов: 64 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,20 @@
# devappserver
## Local development
```sh
$ make devappserver
$ ./devappserver -http=:8080
```
Then visit http://localhost:8080
## Deployment
```sh
$ gcloud config set project {go-dashboard-dev|symbolic-datum-552}
$ gcloud container clusters get-credentials --zone=us-central1-f go
$ make push-{dev|prod}
$ kubectl create -f service.yaml
$ kubectl create -f deployment-prod.yaml
```

Просмотреть файл

@ -0,0 +1,28 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: devappserver-deployment
spec:
replicas: 1
template:
metadata:
labels:
app: devappserver
spec:
containers:
- name: devappserver
image: gcr.io/symbolic-datum-552/devappserver:latest
imagePullPolicy: Always
command: ["/go/bin/devappserver"]
volumeMounts:
- mountPath: /autocert-cache
name: pv-autocert-cache
ports:
- containerPort: 80
- containerPort: 443
resources:
requests:
cpu: "1"
memory: "1Gi"
limits:
memory: "2Gi"

Просмотреть файл

@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: devappserver
spec:
ports:
- port: 80
targetPort: 80
name: http
- port: 443
targetPort: 443
name: https
selector:
app: devappserver
type: LoadBalancer
loadBalancerIP: 35.184.237.80