lifecycle hooks are back

This commit is contained in:
nicktrn
2024-03-22 22:01:48 +00:00
parent 8fd16fe3f3
commit 6a93aefa55
+46 -8
View File
@@ -78,6 +78,20 @@ class KubernetesTaskOperations implements TaskOperations {
// memory: "50Mi",
// },
// },
lifecycle: {
preStop: {
httpGet: {
path: "/preStop?cause=index",
port: 8000,
},
},
postStart: {
httpGet: {
path: "/postStart?cause=index",
port: 8000,
},
},
},
env: [
{
name: "DEBUG",
@@ -171,11 +185,29 @@ class KubernetesTaskOperations implements TaskOperations {
// resources: {
// limits: opts.machine,
// },
lifecycle: {
preStop: {
httpGet: {
path: "/preStop?cause=create",
port: 8000,
},
},
postStart: {
httpGet: {
path: "/postStart?cause=create",
port: 8000,
},
},
},
env: [
{
name: "DEBUG",
value: "true",
},
{
name: "HTTP_SERVER_PORT",
value: "8000",
},
{
name: "TRIGGER_ENV_ID",
value: opts.envId,
@@ -295,14 +327,20 @@ class KubernetesTaskOperations implements TaskOperations {
// resources: {
// limits: opts.machine,
// },
// lifecycle: {
// postStart: {
// httpGet: {
// path: "/connect",
// port: 8000,
// },
// },
// },
lifecycle: {
preStop: {
httpGet: {
path: "/preStop?cause=restore",
port: 8000,
},
},
postStart: {
httpGet: {
path: "/postStart?cause=restore",
port: 8000,
},
},
},
volumeMounts: [
{
name: "taskinfo",