Refining some stuff.
This commit is contained in:
@@ -15,6 +15,10 @@ cache:
|
|||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
|
#branches:
|
||||||
|
# only:
|
||||||
|
# - master
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- sudo apt-get update
|
- sudo apt-get update
|
||||||
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
|
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
|
||||||
|
|||||||
@@ -133,13 +133,14 @@ spec:
|
|||||||
httpGet:
|
httpGet:
|
||||||
path: "/healthz"
|
path: "/healthz"
|
||||||
port: "8888"
|
port: "8888"
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 1
|
||||||
periodSeconds: 2
|
periodSeconds: 1
|
||||||
|
failureThreshold: 30
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: "/healthz"
|
path: "/healthz"
|
||||||
port: "8888"
|
port: "8888"
|
||||||
initialDelaySeconds: 16
|
initialDelaySeconds: 35
|
||||||
periodSeconds: 5
|
periodSeconds: 5
|
||||||
serviceAccount: fission-svc
|
serviceAccount: fission-svc
|
||||||
|
|
||||||
@@ -167,13 +168,14 @@ spec:
|
|||||||
httpGet:
|
httpGet:
|
||||||
path: "/router-healthz"
|
path: "/router-healthz"
|
||||||
port: "8888"
|
port: "8888"
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 1
|
||||||
periodSeconds: 2
|
periodSeconds: 1
|
||||||
|
failureThreshold: 30
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: "/router-healthz"
|
path: "/router-healthz"
|
||||||
port: "8888"
|
port: "8888"
|
||||||
initialDelaySeconds: 16
|
initialDelaySeconds: 35
|
||||||
periodSeconds: 5
|
periodSeconds: 5
|
||||||
serviceAccount: fission-svc
|
serviceAccount: fission-svc
|
||||||
|
|
||||||
@@ -222,13 +224,14 @@ spec:
|
|||||||
httpGet:
|
httpGet:
|
||||||
path: "/healthz"
|
path: "/healthz"
|
||||||
port: "8888"
|
port: "8888"
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 1
|
||||||
periodSeconds: 2
|
periodSeconds: 1
|
||||||
|
failureThreshold: 30
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: "/healthz"
|
path: "/healthz"
|
||||||
port: "8888"
|
port: "8888"
|
||||||
initialDelaySeconds: 16
|
initialDelaySeconds: 35
|
||||||
periodSeconds: 5
|
periodSeconds: 5
|
||||||
serviceAccount: fission-svc
|
serviceAccount: fission-svc
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ func Start(port int) {
|
|||||||
signal.Notify(c, syscall.SIGTERM)
|
signal.Notify(c, syscall.SIGTERM)
|
||||||
go func() {
|
go func() {
|
||||||
<-c
|
<-c
|
||||||
log.Println("Dumping stack trace")
|
log.Println("Recived SIGTERM : Dumping stack trace")
|
||||||
dumpStackTrace()
|
dumpStackTrace()
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}()
|
}()
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ func main() {
|
|||||||
signal.Notify(c, syscall.SIGTERM)
|
signal.Notify(c, syscall.SIGTERM)
|
||||||
go func() {
|
go func() {
|
||||||
<-c
|
<-c
|
||||||
|
log.Println("Recived SIGTERM : Dumping stack trace")
|
||||||
dumpStackTrace()
|
dumpStackTrace()
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}()
|
}()
|
||||||
|
|||||||
@@ -197,6 +197,7 @@ func StartExecutor(fissionNamespace string, functionNamespace string, port int)
|
|||||||
signal.Notify(c, syscall.SIGTERM)
|
signal.Notify(c, syscall.SIGTERM)
|
||||||
go func() {
|
go func() {
|
||||||
<-c
|
<-c
|
||||||
|
log.Println("Recived SIGTERM : Dumping stack trace")
|
||||||
dumpStackTrace()
|
dumpStackTrace()
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}()
|
}()
|
||||||
|
|||||||
@@ -520,27 +520,28 @@ func (gp *GenericPool) createPool() error {
|
|||||||
"-cfgmap-dir", gp.sharedCfgMapPath,
|
"-cfgmap-dir", gp.sharedCfgMapPath,
|
||||||
gp.sharedMountPath},
|
gp.sharedMountPath},
|
||||||
ReadinessProbe: &apiv1.Probe{
|
ReadinessProbe: &apiv1.Probe{
|
||||||
InitialDelaySeconds: 5,
|
InitialDelaySeconds: 1,
|
||||||
PeriodSeconds: 2,
|
PeriodSeconds: 1,
|
||||||
|
FailureThreshold: 30,
|
||||||
Handler: apiv1.Handler{
|
Handler: apiv1.Handler{
|
||||||
HTTPGet: &apiv1.HTTPGetAction{
|
HTTPGet: &apiv1.HTTPGetAction{
|
||||||
Path: "/healthz",
|
Path: "/healthz",
|
||||||
Port: intstr.IntOrString{
|
Port: intstr.IntOrString{
|
||||||
Type: intstr.Int,
|
Type: intstr.Int,
|
||||||
IntVal: 8000, // TODO : Find out the correct port.
|
IntVal: 8000,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
LivenessProbe: &apiv1.Probe{
|
LivenessProbe: &apiv1.Probe{
|
||||||
InitialDelaySeconds: 5,
|
InitialDelaySeconds: 35,
|
||||||
PeriodSeconds: 5,
|
PeriodSeconds: 5,
|
||||||
Handler: apiv1.Handler{
|
Handler: apiv1.Handler{
|
||||||
HTTPGet: &apiv1.HTTPGetAction{
|
HTTPGet: &apiv1.HTTPGetAction{
|
||||||
Path: "/healthz",
|
Path: "/healthz",
|
||||||
Port: intstr.IntOrString{
|
Port: intstr.IntOrString{
|
||||||
Type: intstr.Int,
|
Type: intstr.Int,
|
||||||
IntVal: 8000, // TODO : Find out the correct port.
|
IntVal: 8000,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -554,6 +555,7 @@ func (gp *GenericPool) createPool() error {
|
|||||||
}
|
}
|
||||||
depl, err := gp.kubernetesClient.ExtensionsV1beta1().Deployments(gp.namespace).Create(deployment)
|
depl, err := gp.kubernetesClient.ExtensionsV1beta1().Deployments(gp.namespace).Create(deployment)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
log.Printf("Error creating deployment for %s in kubernetes, err: %v", deployment.Name, err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
gp.deployment = depl
|
gp.deployment = depl
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ func Start(port int, executorUrl string) {
|
|||||||
signal.Notify(c, syscall.SIGTERM)
|
signal.Notify(c, syscall.SIGTERM)
|
||||||
go func() {
|
go func() {
|
||||||
<-c
|
<-c
|
||||||
|
log.Println("Recived SIGTERM : Dumping stack trace")
|
||||||
dumpStackTrace()
|
dumpStackTrace()
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}()
|
}()
|
||||||
|
|||||||
@@ -184,6 +184,7 @@ func RunStorageService(storageType StorageType, storagePath string, containerNam
|
|||||||
signal.Notify(c, syscall.SIGTERM)
|
signal.Notify(c, syscall.SIGTERM)
|
||||||
go func() {
|
go func() {
|
||||||
<-c
|
<-c
|
||||||
|
log.Println("Recived SIGTERM : Dumping stack trace")
|
||||||
dumpStackTrace()
|
dumpStackTrace()
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}()
|
}()
|
||||||
|
|||||||
+3
-3
@@ -208,7 +208,6 @@ wait_for_service() {
|
|||||||
if [ -z $ip ]; then
|
if [ -z $ip ]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
echo "IP for $svc : $ip, healthendpoint : $health_endpoint"
|
|
||||||
http_status=`curl -sw "%{http_code}" "http://$ip/$health_endpoint"`
|
http_status=`curl -sw "%{http_code}" "http://$ip/$health_endpoint"`
|
||||||
echo "http_status for svc $svc : $http_status"
|
echo "http_status for svc $svc : $http_status"
|
||||||
if [ "$http_status" -ne "200" ]; then
|
if [ "$http_status" -ne "200" ]; then
|
||||||
@@ -223,10 +222,10 @@ wait_for_service() {
|
|||||||
wait_for_services() {
|
wait_for_services() {
|
||||||
id=$1
|
id=$1
|
||||||
|
|
||||||
|
echo "\n--- wait for controller and router services to be routable ---"
|
||||||
wait_for_service $id controller "healthz"
|
wait_for_service $id controller "healthz"
|
||||||
wait_for_service $id router "router-healthz"
|
wait_for_service $id router "router-healthz"
|
||||||
|
echo "\n--- end wait for controller and router services to be routable ---"
|
||||||
echo "Controller and router services are routable"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dump_kubernetes_events() {
|
dump_kubernetes_events() {
|
||||||
@@ -373,6 +372,7 @@ dump_all_fission_resources() {
|
|||||||
|
|
||||||
echo "--- All objects in the fission namespace $ns ---"
|
echo "--- All objects in the fission namespace $ns ---"
|
||||||
kubectl -n $ns get pods -o wide
|
kubectl -n $ns get pods -o wide
|
||||||
|
echo ""
|
||||||
kubectl -n $ns get svc
|
kubectl -n $ns get svc
|
||||||
echo "--- End objects in the fission namespace $ns ---"
|
echo "--- End objects in the fission namespace $ns ---"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user