git mv Ingress ingress
This commit is contained in:
parent
34b949c134
commit
3da4e74e5a
2185 changed files with 754743 additions and 0 deletions
28
images/haproxy/Dockerfile
Normal file
28
images/haproxy/Dockerfile
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# Copyright 2015 The Kubernetes Authors. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
FROM alpine:edge
|
||||
MAINTAINER Prashanth B <beeps@google.com>
|
||||
|
||||
RUN apk add -U bash curl socat haproxy && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
RUN mkdir -p /etc/haproxy/errors /var/state/haproxy
|
||||
RUN for ERROR_CODE in 400 403 404 408 500 502 503 504;do curl -sSL -o /etc/haproxy/errors/$ERROR_CODE.http \
|
||||
https://raw.githubusercontent.com/haproxy/haproxy-1.5/master/examples/errorfiles/$ERROR_CODE.http;done
|
||||
|
||||
ADD haproxy.cfg /etc/haproxy/haproxy.cfg
|
||||
|
||||
CMD ["/usr/sbin/haproxy", "-db", "-f", "/etc/haproxy/haproxy.cfg"]
|
||||
16
images/haproxy/Makefile
Normal file
16
images/haproxy/Makefile
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
all: push
|
||||
|
||||
# 0.0.0 shouldn't clobber any released builds
|
||||
TAG = 0.2
|
||||
PREFIX = gcr.io/google_containers/haproxy
|
||||
HAPROXY_IMAGE = haproxy
|
||||
|
||||
container:
|
||||
docker build -t $(PREFIX):$(TAG) .
|
||||
|
||||
push: container
|
||||
gcloud docker push $(PREFIX):$(TAG)
|
||||
|
||||
clean:
|
||||
# remove haproxy images
|
||||
docker rmi -f $(PREFIX):$(TAG) || true
|
||||
18
images/haproxy/README.md
Normal file
18
images/haproxy/README.md
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
|
||||
HAProxy 1.6 base image using alpine linux
|
||||
|
||||
What is HAProxy?
|
||||
HAProxy is a free, very fast and reliable solution offering high availability, load balancing, and proxying for TCP and HTTP-based applications.
|
||||
|
||||
**How to use this image:**
|
||||
This image does provides a default configuration file with no backend servers.
|
||||
|
||||
*Using docker*
|
||||
```
|
||||
$ docker run -v /some/haproxy.cfg:/etc/haproxy/haproxy.cfg:ro gcr.io/google_containers/haproxy:0.2
|
||||
```
|
||||
|
||||
*Creating a pod*
|
||||
```
|
||||
$ kubectl create -f ./pod.yaml
|
||||
```
|
||||
36
images/haproxy/haproxy.cfg
Normal file
36
images/haproxy/haproxy.cfg
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
# Default haproxy config file.
|
||||
global
|
||||
daemon
|
||||
stats socket /tmp/haproxy
|
||||
server-state-file global
|
||||
server-state-base /var/state/haproxy/
|
||||
|
||||
defaults
|
||||
log global
|
||||
mode http
|
||||
option dontlognull
|
||||
option dontlog-normal
|
||||
timeout connect 5000
|
||||
timeout client 50000
|
||||
timeout server 50000
|
||||
errorfile 400 /etc/haproxy/errors/400.http
|
||||
errorfile 403 /etc/haproxy/errors/403.http
|
||||
errorfile 408 /etc/haproxy/errors/408.http
|
||||
errorfile 500 /etc/haproxy/errors/500.http
|
||||
errorfile 502 /etc/haproxy/errors/502.http
|
||||
errorfile 503 /etc/haproxy/errors/503.http
|
||||
errorfile 504 /etc/haproxy/errors/504.http
|
||||
|
||||
# haproxy stats, required hostport and firewall rules for :1936
|
||||
listen stats
|
||||
bind *:1936
|
||||
mode http
|
||||
stats enable
|
||||
stats hide-version
|
||||
stats realm Haproxy\ Statistics
|
||||
stats uri /
|
||||
|
||||
frontend httpfrontend
|
||||
# Frontend bound on all network interfaces on port 80
|
||||
bind *:80
|
||||
mode http
|
||||
17
images/haproxy/pod.yaml
Normal file
17
images/haproxy/pod.yaml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: simple
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/google_containers/haproxy:0.2
|
||||
imagePullPolicy: Always
|
||||
name: haproxy
|
||||
command:
|
||||
- /usr/sbin/haproxy
|
||||
args:
|
||||
- -db
|
||||
- -f
|
||||
- /etc/haproxy/haproxy.cfg
|
||||
ports:
|
||||
- containerPort: 80
|
||||
Loading…
Add table
Add a link
Reference in a new issue