use Alpine linux and provide example deployment manifests

This commit is contained in:
Henning Jacobs
2016-12-16 23:31:14 +01:00
parent 9f22c773f6
commit 3997b5b90f
4 changed files with 84 additions and 1 deletions

View File

@@ -1,4 +1,13 @@
FROM registry.opensource.zalan.do/stups/python:3.5.2-47 FROM alpine:3.4
RUN apk add --no-cache python3 python3-dev alpine-sdk zlib-dev libffi-dev openssl-dev && \
python3 -m ensurepip && \
rm -r /usr/lib/python*/ensurepip && \
# compile gevent
pip3 install --upgrade pip setuptools gevent && \
# cleanup
apk del python3-dev alpine-sdk zlib-dev libffi-dev openssl-dev && \
rm -rf /var/cache/apk/* /root/.cache /tmp/*
EXPOSE 8080 EXPOSE 8080

45
deploy/deployment.yaml Normal file
View File

@@ -0,0 +1,45 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
application: kube-ops-view
version: v0.0.1
name: kube-ops-view
spec:
replicas: 1
selector:
matchLabels:
application: kube-ops-view
template:
metadata:
labels:
application: kube-ops-view
version: v0.0.1
spec:
containers:
- name: service
image: hjacobs/kube-ops-view
ports:
- containerPort: 8080
protocol: TCP
resources:
limits:
cpu: 200m
memory: 100Mi
requests:
cpu: 50m
memory: 50Mi
- name: kubectl
image: registry.opensource.zalan.do/teapot/hyperkube:v1.4.7_zalando.0
command:
- /hyperkube
args:
- kubectl
- proxy
resources:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 25m
memory: 25Mi

15
deploy/ingress.yaml Normal file
View File

@@ -0,0 +1,15 @@
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: kube-ops-view
annotations:
# this annotation is specific to https://github.com/zalando-incubator/kube-ingress-aws-controller
zalando.org/aws-load-balancer-ssl-cert: arn:aws:acm:eu-central-1:123456789123:certificate/12345678-4246-47b0-8884-123456789088
spec:
rules:
- host: "kube-ops-view.example.org"
http:
paths:
- backend:
serviceName: kube-ops-view
servicePort: 80

14
deploy/service.yaml Normal file
View File

@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
labels:
application: kube-ops-view
name: kube-ops-view
spec:
selector:
application: kube-ops-view
type: ClusterIP
ports:
- port: 80
protocol: TCP
targetPort: 8080