Using docker python
This commit is contained in:
parent
303d8181f8
commit
5c5f01df2b
7 changed files with 151 additions and 32 deletions
55
examples/kubernetes/easyhaproxy.yml
Normal file
55
examples/kubernetes/easyhaproxy.yml
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: easyhaproxy
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: easyhaproxy-ingress
|
||||
namespace: easyhaproxy
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: easyhaproxy-ingress
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: easyhaproxy-ingress
|
||||
spec:
|
||||
#serviceAccountName: easyhaproxy-ingress
|
||||
containers:
|
||||
- image: byjg/easy-haproxy:test
|
||||
imagePullPolicy: Always
|
||||
name: easyhaproxy-ingress
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
hostPort: 80
|
||||
- name: https
|
||||
containerPort: 443
|
||||
hostPort: 443
|
||||
- name: stats
|
||||
containerPort: 1943
|
||||
hostPort: 1943
|
||||
resources:
|
||||
requests:
|
||||
cpu: "100m"
|
||||
memory: "128Mi"
|
||||
|
||||
env:
|
||||
- name: EASYHAPROXY_DISCOVER
|
||||
value: kubernetes
|
||||
- name: HAPROXY_USERNAME
|
||||
value: admin
|
||||
- name: HAPROXY_PASSWORD
|
||||
value: password
|
||||
- name: EASYHAPROXY_REFRESH_CONF
|
||||
value: "10"
|
||||
- name: HAPROXY_CUSTOMERRORS
|
||||
value: "true"
|
||||
- name: EASYHAPROXY_SSL_MODE
|
||||
value: loose
|
||||
|
||||
80
examples/kubernetes/service.yml
Normal file
80
examples/kubernetes/service.yml
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: easyhaproxy-ingress
|
||||
name: container-example
|
||||
namespace: parking
|
||||
spec:
|
||||
rules:
|
||||
- host: example.org
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
service:
|
||||
name: container-example
|
||||
port:
|
||||
number: 8080
|
||||
pathType: ImplementationSpecific
|
||||
- host: www.example.org
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
service:
|
||||
name: container-example
|
||||
port:
|
||||
number: 8080
|
||||
pathType: ImplementationSpecific
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: container-example
|
||||
namespace: parking
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 8080
|
||||
selector:
|
||||
app: container-example
|
||||
type: ClusterIP
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: container-example
|
||||
namespace: parking
|
||||
spec:
|
||||
replicas: 1
|
||||
revisionHistoryLimit: 10
|
||||
strategy:
|
||||
rollingUpdate:
|
||||
maxSurge: 1
|
||||
maxUnavailable: 0
|
||||
type: RollingUpdate
|
||||
selector:
|
||||
matchLabels:
|
||||
app: container-example
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: container-example
|
||||
spec:
|
||||
containers:
|
||||
- name: container-example
|
||||
image: byjg/static-httpserver
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
resources:
|
||||
limits:
|
||||
cpu: '0.05'
|
||||
memory: '20Mi'
|
||||
requests:
|
||||
cpu: '0.05'
|
||||
memory: '20Mi'
|
||||
env:
|
||||
- name: TITLE
|
||||
value: "My Host Example"
|
||||
Loading…
Add table
Add a link
Reference in a new issue