use Alpine linux and provide example deployment manifests
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -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
45
deploy/deployment.yaml
Normal 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
15
deploy/ingress.yaml
Normal 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
14
deploy/service.yaml
Normal 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
|
||||||
Reference in New Issue
Block a user