|
|
|
@ -54,15 +54,17 @@ spec:
|
|
|
|
- '/app/app.py'
|
|
|
|
- '/app/app.py'
|
|
|
|
readinessProbe:
|
|
|
|
readinessProbe:
|
|
|
|
initialDelaySeconds: 10
|
|
|
|
initialDelaySeconds: 10
|
|
|
|
timeoutSeconds: 11
|
|
|
|
timeoutSeconds: 15
|
|
|
|
failureThreshold: 10
|
|
|
|
failureThreshold: 10
|
|
|
|
|
|
|
|
successThreshold: 10
|
|
|
|
httpGet:
|
|
|
|
httpGet:
|
|
|
|
path: /
|
|
|
|
path: /
|
|
|
|
port: 8000
|
|
|
|
port: 8000
|
|
|
|
livenessProbe:
|
|
|
|
livenessProbe:
|
|
|
|
initialDelaySeconds: 10
|
|
|
|
initialDelaySeconds: 10
|
|
|
|
timeoutSeconds: 11
|
|
|
|
timeoutSeconds: 15
|
|
|
|
failureThreshold: 10
|
|
|
|
failureThreshold: 10
|
|
|
|
|
|
|
|
successThreshold: 10
|
|
|
|
httpGet:
|
|
|
|
httpGet:
|
|
|
|
path: /
|
|
|
|
path: /
|
|
|
|
port: 8000
|
|
|
|
port: 8000
|
|
|
|
@ -76,12 +78,12 @@ spec:
|
|
|
|
volumes:
|
|
|
|
volumes:
|
|
|
|
- name: app-script-volume
|
|
|
|
- name: app-script-volume
|
|
|
|
configMap:
|
|
|
|
configMap:
|
|
|
|
name: app-script-config-4
|
|
|
|
name: app-script-config-5
|
|
|
|
---
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
|
|
|
metadata:
|
|
|
|
name: app-script-config-4
|
|
|
|
name: app-script-config-5
|
|
|
|
data:
|
|
|
|
data:
|
|
|
|
app.py: |
|
|
|
|
app.py: |
|
|
|
|
#! /bin/python3
|
|
|
|
#! /bin/python3
|
|
|
|
@ -90,7 +92,7 @@ data:
|
|
|
|
|
|
|
|
|
|
|
|
class GetHandler(BaseHTTPRequestHandler):
|
|
|
|
class GetHandler(BaseHTTPRequestHandler):
|
|
|
|
def do_GET(self):
|
|
|
|
def do_GET(self):
|
|
|
|
sleep(1)
|
|
|
|
sleep(10)
|
|
|
|
x = self.wfile.write
|
|
|
|
x = self.wfile.write
|
|
|
|
self.send_response(200)
|
|
|
|
self.send_response(200)
|
|
|
|
self.send_header("Content-type", "text/html")
|
|
|
|
self.send_header("Content-type", "text/html")
|
|
|
|
|