From ceaf4419e1bf1cd1a68b8074d6d8773093ab37ce Mon Sep 17 00:00:00 2001 From: Francesco Timperi Tiberi Date: Sat, 13 Dec 2025 19:28:22 +0100 Subject: [PATCH 1/3] feat: using openwhisk2 based images for controller and invoker --- Dockerfile | 8 ++++---- nuvolaris/enterprise_util.py | 4 ++-- nuvolaris/invoker.py | 1 + nuvolaris/openwhisk_enterprise.py | 1 + nuvolaris/openwhisk_standalone.py | 2 ++ nuvolaris/templates/enterprise-sts.yaml | 22 ++++++++++++++++------ nuvolaris/templates/invoker-sts.yaml | 17 ++++++++++++++++- nuvolaris/templates/standalone-sts.yaml | 14 +++++++++++++- nuvolaris/util.py | 4 ++-- tests/kind/whisk-minimal.yaml | 4 ++-- tests/kind/whisk-slim.yaml | 4 ++-- 11 files changed, 61 insertions(+), 20 deletions(-) diff --git a/Dockerfile b/Dockerfile index 99d3441c..982e4927 100644 --- a/Dockerfile +++ b/Dockerfile @@ -104,10 +104,10 @@ FROM python:3.12-slim-bullseye ARG OPERATOR_IMAGE_DEFAULT=registry.hub.docker.com/apache/openserverless-operator ARG OPERATOR_TAG_DEFAULT=0.1.0-testing.2309191654 -ENV CONTROLLER_IMAGE=ghcr.io/nuvolaris/openwhisk-controller -ENV CONTROLLER_TAG=3.1.0-mastrogpt.2402101445 -ENV INVOKER_IMAGE=ghcr.io/nuvolaris/openwhisk-invoker -ENV INVOKER_TAG=3.1.0-mastrogpt.2402101445 +ENV CONTROLLER_IMAGE=ghcr.io/ftimperioss/openserverless-wsk-controller +ENV CONTROLLER_TAG=2.0.0-incubating.2512131645 +ENV INVOKER_IMAGE=ghcr.io/ftimperioss/openserverless-wsk-invoker +ENV INVOKER_TAG=2.0.0-incubating.2512131645 ENV OPERATOR_IMAGE=${OPERATOR_IMAGE_DEFAULT} ENV OPERATOR_TAG=${OPERATOR_TAG_DEFAULT} ENV TZ=Europe/London diff --git a/nuvolaris/enterprise_util.py b/nuvolaris/enterprise_util.py index fd0d0bb8..31c2d51d 100644 --- a/nuvolaris/enterprise_util.py +++ b/nuvolaris/enterprise_util.py @@ -44,8 +44,8 @@ def get_invoker_image_data(data): data['invoker_image'] = img_data["image"] data['invoker_tag'] = img_data["tag"] else: - data['invoker_image'] = cfg.get("invoker.image") or "ghcr.io/nuvolaris/openwhisk-invoker" - data['invoker_tag'] = cfg.get("invoker.tag") or "3.1.0-mastrogpt.2402101445" + data['invoker_image'] = cfg.get("invoker.image","INVOKER_IMAGE","apache/openserverless-wsk-invoker") + data['invoker_tag'] = cfg.get("invoker.tag","INVOKER_TAG","2.0.0-incubating.2506080813") def getEnterpriseControllerConfigData(): data = { diff --git a/nuvolaris/invoker.py b/nuvolaris/invoker.py index 92c673f1..07cbd7ca 100644 --- a/nuvolaris/invoker.py +++ b/nuvolaris/invoker.py @@ -39,6 +39,7 @@ def create(owner=None): if(data['affinity'] or data['tolerations']): tplp.append("affinity-tolerance-sts-invoker-attach.yaml") + logging.info(f"using invoker image {whisk_image}:{whisk_tag}") config = kus.image(whisk_image, newTag=whisk_tag) config += kus.patchTemplates("openwhisk-invoker", tplp, data) spec = kus.kustom_list("openwhisk-invoker", config, templates=[], data=data) diff --git a/nuvolaris/openwhisk_enterprise.py b/nuvolaris/openwhisk_enterprise.py index 6fb6a193..c53813aa 100644 --- a/nuvolaris/openwhisk_enterprise.py +++ b/nuvolaris/openwhisk_enterprise.py @@ -36,6 +36,7 @@ def create(owner=None): if(data['affinity'] or data['tolerations']): tplp.append("affinity-tolerance-sts-core-attach.yaml") + logging.info(f"using controller image {whisk_image}:{whisk_tag}") config = kus.image(whisk_image, newTag=whisk_tag) config += kus.patchTemplates("openwhisk-enterprise", tplp, data) spec = kus.kustom_list("openwhisk-enterprise", config, templates=[], data=data) diff --git a/nuvolaris/openwhisk_standalone.py b/nuvolaris/openwhisk_standalone.py index f44bc3dd..d60c4e53 100644 --- a/nuvolaris/openwhisk_standalone.py +++ b/nuvolaris/openwhisk_standalone.py @@ -31,6 +31,8 @@ def create(owner=None): whisk_image = data["controller_image"] whisk_tag = data["controller_tag"] + + logging.info(f"using controller image {whisk_image}:{whisk_tag}") config = kus.image(whisk_image, newTag=whisk_tag) tplp = ["standalone-sts.yaml"] diff --git a/nuvolaris/templates/enterprise-sts.yaml b/nuvolaris/templates/enterprise-sts.yaml index db8320a7..a635d7a1 100644 --- a/nuvolaris/templates/enterprise-sts.yaml +++ b/nuvolaris/templates/enterprise-sts.yaml @@ -229,9 +229,19 @@ spec: - name: "CONFIG_kamon_metric_tickInterval" value: "30" - #- name: "CONFIG_spi_ContainerFactoryProvider" - # value: "org.apache.openwhisk.core.containerpool.kubernetes.KubernetesContainerFactoryProvider" - #- name: "CONFIG_spi_LogStoreProvider" - # value: "org.apache.openwhisk.core.containerpool.logging.DockerToActivationLogStoreProvider" - #- name: "CONFIG_spi_ArtifactStoreProvider" - # value: "org.apache.openwhisk.core.database.CouchDbStoreProvider" + # OpenWhisk 2 without Scheduler + - name: "CONFIG_spi_LoadBalancerProvider" + value: "org.apache.openwhisk.core.loadBalancer.ShardingContainerPoolBalancer" + - name: "CONFIG_spi_EntitlementSpiProvider" + value: "org.apache.openwhisk.core.entitlement.LocalEntitlementProvider" + - name: "CONFIG_spi_LoadBalancerProvider" + value: "org.apache.openwhisk.core.loadBalancer.ShardingContainerPoolBalancer" + - name: "CONFIG_spi_InvokerProvider" + value: "org.apache.openwhisk.core.invoker.InvokerReactive" + - name: "CONFIG_spi_InvokerServerProvider" + value: "org.apache.openwhisk.core.invoker.DefaultInvokerServer" + - name: "CONFIG_spi_DurationCheckerProvider" + value: "org.apache.openwhisk.core.scheduler.queue.NoopDurationCheckerProvider" + + + diff --git a/nuvolaris/templates/invoker-sts.yaml b/nuvolaris/templates/invoker-sts.yaml index 1f27bcf9..6587d77c 100644 --- a/nuvolaris/templates/invoker-sts.yaml +++ b/nuvolaris/templates/invoker-sts.yaml @@ -306,7 +306,22 @@ spec: {% if usePrivateRegistry %} - name: "CONFIG_whisk_kubernetes_podTemplate" value: "file:/templates/ow_pod_templates.yaml" - {% endif %} + {% endif %} + + # OpenWhisk 2 without Scheduler + - name: "CONFIG_spi_LoadBalancerProvider" + value: "org.apache.openwhisk.core.loadBalancer.ShardingContainerPoolBalancer" + - name: "CONFIG_spi_EntitlementSpiProvider" + value: "org.apache.openwhisk.core.entitlement.LocalEntitlementProvider" + - name: "CONFIG_spi_LoadBalancerProvider" + value: "org.apache.openwhisk.core.loadBalancer.ShardingContainerPoolBalancer" + - name: "CONFIG_spi_InvokerProvider" + value: "org.apache.openwhisk.core.invoker.InvokerReactive" + - name: "CONFIG_spi_InvokerServerProvider" + value: "org.apache.openwhisk.core.invoker.DefaultInvokerServer" + - name: "CONFIG_spi_DurationCheckerProvider" + value: "org.apache.openwhisk.core.scheduler.queue.NoopDurationCheckerProvider" + ports: - name: invoker diff --git a/nuvolaris/templates/standalone-sts.yaml b/nuvolaris/templates/standalone-sts.yaml index 2ee9da87..1782ca0e 100644 --- a/nuvolaris/templates/standalone-sts.yaml +++ b/nuvolaris/templates/standalone-sts.yaml @@ -216,7 +216,19 @@ spec: value: "org.apache.openwhisk.core.containerpool.kubernetes.KubernetesContainerFactoryProvider" - name: "CONFIG_whisk_spi_LogStoreProvider" - value: "org.apache.openwhisk.core.containerpool.logging.DockerToActivationLogStoreProvider" + value: "org.apache.openwhisk.core.containerpool.logging.DockerToActivationLogStoreProvider" + + # OpenWhisk 2 without Scheduler + - name: "CONFIG_spi_EntitlementSpiProvider" + value: "org.apache.openwhisk.core.entitlement.LocalEntitlementProvider" + - name: "CONFIG_spi_LoadBalancerProvider" + value: "org.apache.openwhisk.core.loadBalancer.ShardingContainerPoolBalancer" + - name: "CONFIG_spi_InvokerProvider" + value: "org.apache.openwhisk.core.invoker.InvokerReactive" + - name: "CONFIG_spi_InvokerServerProvider" + value: "org.apache.openwhisk.core.invoker.DefaultInvokerServer" + - name: "CONFIG_spi_DurationCheckerProvider" + value: "org.apache.openwhisk.core.scheduler.queue.NoopDurationCheckerProvider" - name: "CONFIG_whisk_controller_protocol" value: "http" diff --git a/nuvolaris/util.py b/nuvolaris/util.py index 0d0211a3..bfb4edff 100644 --- a/nuvolaris/util.py +++ b/nuvolaris/util.py @@ -302,8 +302,8 @@ def get_controller_image_data(data): data['controller_image'] = img_data["image"] data['controller_tag'] = img_data["tag"] else: - data['controller_image'] = cfg.get("controller.image") or "ghcr.io/nuvolaris/openwhisk-controller" - data['controller_tag'] = cfg.get("controller.tag") or "3.1.0-mastrogpt.2402101445" + data['controller_image'] = cfg.get("controller.image","CONTROLLER_IMAGE","apache/openserverless-wsk-controller") + data['controller_tag'] = cfg.get("controller.tag","CONTROLLER_TAG","2.0.0-incubating.2506080813") # return configuration parameters for the standalone controller def get_standalone_config_data(): diff --git a/tests/kind/whisk-minimal.yaml b/tests/kind/whisk-minimal.yaml index c3fc351a..72dc427e 100644 --- a/tests/kind/whisk-minimal.yaml +++ b/tests/kind/whisk-minimal.yaml @@ -25,11 +25,11 @@ spec: # start openwhisk controller openwhisk: true # start openwhisk invoker - invoker: false + invoker: true # start couchdb couchdb: true # start kafka - kafka: false + kafka: true # start mongodb mongodb: false # start redis diff --git a/tests/kind/whisk-slim.yaml b/tests/kind/whisk-slim.yaml index f6f3f4a9..3ef203ac 100644 --- a/tests/kind/whisk-slim.yaml +++ b/tests/kind/whisk-slim.yaml @@ -41,7 +41,7 @@ spec: # tls enabled or not tls: false # minio enabled or not - minio: true + minio: false # minio static enabled or not static: true # postgres enabled or not @@ -53,7 +53,7 @@ spec: # registry enabled or not registry: false # seaweedfs enabled or not - seaweedfs: false + seaweedfs: true openwhisk: namespaces: whisk-system: 789c46b1-71f6-4ed5-8c54-816aa4f8c502:abczO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP From 8890173449e66f8f81f6771db0dc74ce9153897b Mon Sep 17 00:00:00 2001 From: Francesco Timperi Tiberi Date: Sun, 14 Dec 2025 00:14:46 +0100 Subject: [PATCH 2/3] fix: deploys openwhisk2 with pekko compatible setup --- Dockerfile | 8 +-- deploy/openwhisk-invoker/invoker-sts.yaml | 8 +-- deploy/zookeeper/zookeeper-000-cm.yaml | 11 ++-- deploy/zookeeper/zookeeper-003-sts.yaml | 68 +++++++++++++++-------- nuvolaris/invoker.py | 5 +- nuvolaris/openwhisk_enterprise.py | 5 +- nuvolaris/openwhisk_standalone.py | 5 +- nuvolaris/templates/enterprise-sts.yaml | 14 ++--- nuvolaris/templates/invoker-sts.yaml | 22 +++++--- nuvolaris/templates/standalone-sts.yaml | 18 +++--- nuvolaris/zookeeper.py | 2 +- tests/kafka_test.ipy | 2 +- tests/kind/whisk-minimal.yaml | 2 + tests/kind/whisk-slim.yaml | 4 +- tests/zookeeper_test.ipy | 2 +- 15 files changed, 103 insertions(+), 73 deletions(-) diff --git a/Dockerfile b/Dockerfile index 982e4927..60be6f12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -104,10 +104,10 @@ FROM python:3.12-slim-bullseye ARG OPERATOR_IMAGE_DEFAULT=registry.hub.docker.com/apache/openserverless-operator ARG OPERATOR_TAG_DEFAULT=0.1.0-testing.2309191654 -ENV CONTROLLER_IMAGE=ghcr.io/ftimperioss/openserverless-wsk-controller -ENV CONTROLLER_TAG=2.0.0-incubating.2512131645 -ENV INVOKER_IMAGE=ghcr.io/ftimperioss/openserverless-wsk-invoker -ENV INVOKER_TAG=2.0.0-incubating.2512131645 +ENV CONTROLLER_IMAGE=registry.hub.docker.com/apache/openserverless-wsk-controller +ENV CONTROLLER_TAG=2.0.0-incubating.2512132233 +ENV INVOKER_IMAGE=registry.hub.docker.com/apache/openserverless-wsk-invoker +ENV INVOKER_TAG=2.0.0-incubating.2512132233 ENV OPERATOR_IMAGE=${OPERATOR_IMAGE_DEFAULT} ENV OPERATOR_TAG=${OPERATOR_TAG_DEFAULT} ENV TZ=Europe/London diff --git a/deploy/openwhisk-invoker/invoker-sts.yaml b/deploy/openwhisk-invoker/invoker-sts.yaml index 416838bd..b5a568fa 100644 --- a/deploy/openwhisk-invoker/invoker-sts.yaml +++ b/deploy/openwhisk-invoker/invoker-sts.yaml @@ -91,10 +91,10 @@ spec: - name: "JAVA_OPTS" value: "-Xmx512M " - # Invoker options - - name: "INVOKER_OPTS" - value: " -Dkubernetes.master=https://$KUBERNETES_SERVICE_HOST -Dwhisk.spi.ContainerFactoryProvider=org.apache.openwhisk.core.containerpool.kubernetes.KubernetesContainerFactoryProvider" - + # Invoker options + #- name: "INVOKER_OPTS" + # value: "-Dkubernetes.master=https://$KUBERNETES_SERVICE_HOST" + # action runtimes - name: "RUNTIMES_MANIFEST" valueFrom: diff --git a/deploy/zookeeper/zookeeper-000-cm.yaml b/deploy/zookeeper/zookeeper-000-cm.yaml index cd58f488..faa92ca5 100644 --- a/deploy/zookeeper/zookeeper-000-cm.yaml +++ b/deploy/zookeeper/zookeeper-000-cm.yaml @@ -27,12 +27,15 @@ data: zoo.cfg: | tickTime=2000 clientPort=2181 - initLimit=5 - syncLimit=2 + initLimit=10 + syncLimit=5 dataDir=/data dataLogDir=/datalog - logLevel=INFO - server.0=zookeeper-0.zookeeper:2888:3888 + maxClientCnxns=60 + autopurge.snapRetainCount=3 + autopurge.purgeInterval=24 + server.1=zookeeper-0.zookeeper:2888:3888 + 4lw.commands.whitelist=ruok log4j.properties: |+ # diff --git a/deploy/zookeeper/zookeeper-003-sts.yaml b/deploy/zookeeper/zookeeper-003-sts.yaml index 4bb180ea..d19629ce 100644 --- a/deploy/zookeeper/zookeeper-003-sts.yaml +++ b/deploy/zookeeper/zookeeper-003-sts.yaml @@ -25,7 +25,6 @@ metadata: app: zookeeper spec: serviceName: zookeeper - podManagementPolicy: "Parallel" replicas: 1 selector: matchLabels: @@ -48,20 +47,49 @@ spec: - name: "zookeeper-pvc-datalog" persistentVolumeClaim: claimName: "zookeeper-pvc-datalog" - + + initContainers: + - name: init-myid + image: busybox + command: + - sh + - -c + - | + mkdir -p /data /datalog + echo 1 > /data/myid + chown -R 1001:1001 /data /datalog + volumeMounts: + - name: zookeeper-pvc-data + mountPath: /data + - name: zookeeper-pvc-datalog + mountPath: /datalog + - name: zk-config + mountPath: /conf + containers: - name: zookeeper - image: "ghcr.io/nuvolaris/zookeeper:3.4.14" - imagePullPolicy: "IfNotPresent" - command: ["/bin/bash", "-c", "hostname -s | awk -F '-' '{print $NF}'> /data/myid; cat /data/myid; cat /conf/zoo.cfg; zkServer.sh start-foreground"] + image: zookeeper:3.5.9 + imagePullPolicy: IfNotPresent + command: + - sh + - -c + - | + export ZOOCFGDIR=/conf + zkServer.sh start-foreground ports: - - name: zookeeper - containerPort: 2181 - - name: server - containerPort: 2888 - - name: leader-election - containerPort: 3888 - + - name: zookeeper + containerPort: 2181 + - name: quorum + containerPort: 2888 + - name: leader-election + containerPort: 3888 + volumeMounts: + - name: zk-config + mountPath: /conf + - name: zookeeper-pvc-data + mountPath: /data + - name: zookeeper-pvc-datalog + mountPath: /datalog livenessProbe: tcpSocket: port: 2181 @@ -71,17 +99,9 @@ spec: readinessProbe: exec: command: - - /bin/bash - - -c - - "echo ruok | nc -w 1 localhost 2181 | grep imok" + - sh + - -c + - "zkServer.sh status" initialDelaySeconds: 5 periodSeconds: 10 - timeoutSeconds: 1 - volumeMounts: - - mountPath: /conf - name: zk-config - - mountPath: /data - name: "zookeeper-pvc-data" - - mountPath: /datalog - name: "zookeeper-pvc-datalog" ---- + timeoutSeconds: 3 diff --git a/nuvolaris/invoker.py b/nuvolaris/invoker.py index 07cbd7ca..9639d915 100644 --- a/nuvolaris/invoker.py +++ b/nuvolaris/invoker.py @@ -39,9 +39,8 @@ def create(owner=None): if(data['affinity'] or data['tolerations']): tplp.append("affinity-tolerance-sts-invoker-attach.yaml") - logging.info(f"using invoker image {whisk_image}:{whisk_tag}") - config = kus.image(whisk_image, newTag=whisk_tag) - config += kus.patchTemplates("openwhisk-invoker", tplp, data) + logging.info(f"using invoker image {whisk_image}:{whisk_tag}") + config = kus.patchTemplates("openwhisk-invoker", tplp, data) spec = kus.kustom_list("openwhisk-invoker", config, templates=[], data=data) if owner: diff --git a/nuvolaris/openwhisk_enterprise.py b/nuvolaris/openwhisk_enterprise.py index c53813aa..3acf495a 100644 --- a/nuvolaris/openwhisk_enterprise.py +++ b/nuvolaris/openwhisk_enterprise.py @@ -36,9 +36,8 @@ def create(owner=None): if(data['affinity'] or data['tolerations']): tplp.append("affinity-tolerance-sts-core-attach.yaml") - logging.info(f"using controller image {whisk_image}:{whisk_tag}") - config = kus.image(whisk_image, newTag=whisk_tag) - config += kus.patchTemplates("openwhisk-enterprise", tplp, data) + logging.info(f"using controller image {whisk_image}:{whisk_tag}") + config = kus.patchTemplates("openwhisk-enterprise", tplp, data) spec = kus.kustom_list("openwhisk-enterprise", config, templates=[], data=data) if owner: diff --git a/nuvolaris/openwhisk_standalone.py b/nuvolaris/openwhisk_standalone.py index d60c4e53..1775df20 100644 --- a/nuvolaris/openwhisk_standalone.py +++ b/nuvolaris/openwhisk_standalone.py @@ -32,14 +32,13 @@ def create(owner=None): whisk_image = data["controller_image"] whisk_tag = data["controller_tag"] - logging.info(f"using controller image {whisk_image}:{whisk_tag}") - config = kus.image(whisk_image, newTag=whisk_tag) + logging.info(f"using controller image {whisk_image}:{whisk_tag}") tplp = ["standalone-sts.yaml"] if(data['affinity'] or data['tolerations']): tplp.append("affinity-tolerance-sts-core-attach.yaml") - config += kus.patchTemplates("openwhisk-standalone", tplp, data) + config = kus.patchTemplates("openwhisk-standalone", tplp, data) spec = kus.kustom_list("openwhisk-standalone", config, templates=[], data=data) if owner: diff --git a/nuvolaris/templates/enterprise-sts.yaml b/nuvolaris/templates/enterprise-sts.yaml index a635d7a1..e6d04abb 100644 --- a/nuvolaris/templates/enterprise-sts.yaml +++ b/nuvolaris/templates/enterprise-sts.yaml @@ -48,7 +48,7 @@ spec: containers: - name: controller imagePullPolicy: "IfNotPresent" - image: "ghcr.io/nuvolaris/openwhisk-controller:0.3.0-morpheus.22122609" + image: "{{controller_image}}:{{controller_tag}}" command: ["/bin/bash", "-c", "/init.sh `hostname | awk -F '-' '{print $NF}'`"] ports: - name: controller @@ -230,17 +230,17 @@ spec: value: "30" # OpenWhisk 2 without Scheduler - - name: "CONFIG_spi_LoadBalancerProvider" + - name: "CONFIG_whisk_spi_LoadBalancerProvider" value: "org.apache.openwhisk.core.loadBalancer.ShardingContainerPoolBalancer" - - name: "CONFIG_spi_EntitlementSpiProvider" + - name: "CONFIG_whisk_spi_EntitlementSpiProvider" value: "org.apache.openwhisk.core.entitlement.LocalEntitlementProvider" - - name: "CONFIG_spi_LoadBalancerProvider" + - name: "CONFIG_whisk_spi_LoadBalancerProvider" value: "org.apache.openwhisk.core.loadBalancer.ShardingContainerPoolBalancer" - - name: "CONFIG_spi_InvokerProvider" + - name: "CONFIG_whisk_spi_InvokerProvider" value: "org.apache.openwhisk.core.invoker.InvokerReactive" - - name: "CONFIG_spi_InvokerServerProvider" + - name: "CONFIG_whisk_spi_InvokerServerProvider" value: "org.apache.openwhisk.core.invoker.DefaultInvokerServer" - - name: "CONFIG_spi_DurationCheckerProvider" + - name: "CONFIG_whisk_spi_DurationCheckerProvider" value: "org.apache.openwhisk.core.scheduler.queue.NoopDurationCheckerProvider" diff --git a/nuvolaris/templates/invoker-sts.yaml b/nuvolaris/templates/invoker-sts.yaml index 6587d77c..d56ffd4d 100644 --- a/nuvolaris/templates/invoker-sts.yaml +++ b/nuvolaris/templates/invoker-sts.yaml @@ -47,7 +47,7 @@ spec: command: ['sh', '-c', "until nslookup kafka.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for kafka; sleep 2; done"] containers: - name: invoker - image: "ghcr.io/nuvolaris/openwhisk-invoker:0.3.0-morpheus.22122609" + image: "{{invoker_image}}:{{invoker_tag}}" imagePullPolicy: "IfNotPresent" command: [ "/bin/bash", "-c", "/init.sh --uniqueName $INVOKER_NAME" ] #command: ["sleep", "inf"] @@ -103,8 +103,8 @@ spec: value: "{{invoker_java_opts}} " # Invoker options - - name: "INVOKER_OPTS" - value: "-Dkubernetes.master=https://$KUBERNETES_SERVICE_HOST -Dwhisk.spi.ContainerFactoryProvider=org.apache.openwhisk.core.containerpool.kubernetes.KubernetesContainerFactoryProvider" + #- name: "INVOKER_OPTS" + # value: "-Dkubernetes.master=https://$KUBERNETES_SERVICE_HOST" # action runtimes - name: "RUNTIMES_MANIFEST" @@ -309,19 +309,23 @@ spec: {% endif %} # OpenWhisk 2 without Scheduler - - name: "CONFIG_spi_LoadBalancerProvider" + - name: "CONFIG_whisk_spi_LoadBalancerProvider" value: "org.apache.openwhisk.core.loadBalancer.ShardingContainerPoolBalancer" - - name: "CONFIG_spi_EntitlementSpiProvider" + - name: "CONFIG_whisk_spi_EntitlementSpiProvider" value: "org.apache.openwhisk.core.entitlement.LocalEntitlementProvider" - - name: "CONFIG_spi_LoadBalancerProvider" + - name: "CONFIG_whisk_spi_LoadBalancerProvider" value: "org.apache.openwhisk.core.loadBalancer.ShardingContainerPoolBalancer" - - name: "CONFIG_spi_InvokerProvider" + - name: "CONFIG_whisk_spi_InvokerProvider" value: "org.apache.openwhisk.core.invoker.InvokerReactive" - - name: "CONFIG_spi_InvokerServerProvider" + - name: "CONFIG_whisk_spi_InvokerServerProvider" value: "org.apache.openwhisk.core.invoker.DefaultInvokerServer" - - name: "CONFIG_spi_DurationCheckerProvider" + - name: "CONFIG_whisk_spi_DurationCheckerProvider" value: "org.apache.openwhisk.core.scheduler.queue.NoopDurationCheckerProvider" + # kubernetes + - name: "CONFIG_whisk_spi_ContainerFactoryProvider" + value: "org.apache.openwhisk.core.containerpool.kubernetes.KubernetesContainerFactoryProvider" + ports: - name: invoker diff --git a/nuvolaris/templates/standalone-sts.yaml b/nuvolaris/templates/standalone-sts.yaml index 1782ca0e..c7da1755 100644 --- a/nuvolaris/templates/standalone-sts.yaml +++ b/nuvolaris/templates/standalone-sts.yaml @@ -45,7 +45,7 @@ spec: containers: - name: controller imagePullPolicy: "IfNotPresent" - image: "ghcr.io/nuvolaris/openwhisk-controller:0.3.0-morpheus.22122609" + image: "{{controller_image}}:{{controller_tag}}" command: ["/bin/bash", "-c", "/init.sh `hostname | awk -F '-' '{print $NF}'`"] ports: - name: controller @@ -219,15 +219,19 @@ spec: value: "org.apache.openwhisk.core.containerpool.logging.DockerToActivationLogStoreProvider" # OpenWhisk 2 without Scheduler - - name: "CONFIG_spi_EntitlementSpiProvider" - value: "org.apache.openwhisk.core.entitlement.LocalEntitlementProvider" - - name: "CONFIG_spi_LoadBalancerProvider" + - name: "CONFIG_whisk_spi_EntitlementSpiProvider" + value: "org.apache.openwhisk.core.entitlement.LocalEntitlementProvider" + + - name: "CONFIG_whisk_spi_LoadBalancerProvider" value: "org.apache.openwhisk.core.loadBalancer.ShardingContainerPoolBalancer" - - name: "CONFIG_spi_InvokerProvider" + + - name: "CONFIG_whisk_spi_InvokerProvider" value: "org.apache.openwhisk.core.invoker.InvokerReactive" - - name: "CONFIG_spi_InvokerServerProvider" + + - name: "CONFIG_whisk_spi_InvokerServerProvider" value: "org.apache.openwhisk.core.invoker.DefaultInvokerServer" - - name: "CONFIG_spi_DurationCheckerProvider" + + - name: "CONFIG_whisk_spi_DurationCheckerProvider" value: "org.apache.openwhisk.core.scheduler.queue.NoopDurationCheckerProvider" - name: "CONFIG_whisk_controller_protocol" diff --git a/nuvolaris/zookeeper.py b/nuvolaris/zookeeper.py index b7edb6af..0ba51979 100644 --- a/nuvolaris/zookeeper.py +++ b/nuvolaris/zookeeper.py @@ -39,7 +39,7 @@ def get_zookeeper_connect_data(): return None def create(owner=None): - logging.info(f"*** configuring zookeeper") + logging.info("*** configuring zookeeper") data = cfg_util.get_zookeeper_config_data() diff --git a/tests/kafka_test.ipy b/tests/kafka_test.ipy index 2e0f8330..0d9aee0e 100644 --- a/tests/kafka_test.ipy +++ b/tests/kafka_test.ipy @@ -34,7 +34,7 @@ pod_name = zookeeper.get_zookeeper_pod_name() assert(pod_name) zookeeper_version = kube.kubectl("get", f"pods/{pod_name}", jsonpath="{.spec.containers[0].image}") -assert(zookeeper_version[0] == "ghcr.io/nuvolaris/zookeeper:3.4.14") +assert(zookeeper_version[0] == "zookeeper:3.5.9") # check the url is stored into the configuration assert(cfg.get("nuvolaris.zookeeper.url") == "zookeeper-0.zookeeper:2181") diff --git a/tests/kind/whisk-minimal.yaml b/tests/kind/whisk-minimal.yaml index 72dc427e..179dbb42 100644 --- a/tests/kind/whisk-minimal.yaml +++ b/tests/kind/whisk-minimal.yaml @@ -30,6 +30,8 @@ spec: couchdb: true # start kafka kafka: true + # zookeeper enabled or not + zookeeper: true # start mongodb mongodb: false # start redis diff --git a/tests/kind/whisk-slim.yaml b/tests/kind/whisk-slim.yaml index 3ef203ac..6519f36e 100644 --- a/tests/kind/whisk-slim.yaml +++ b/tests/kind/whisk-slim.yaml @@ -47,9 +47,9 @@ spec: # postgres enabled or not postgres: true # etcd enabled or not - etcd: true + etcd: false # milvus enabled or not - milvus: true + milvus: false # registry enabled or not registry: false # seaweedfs enabled or not diff --git a/tests/zookeeper_test.ipy b/tests/zookeeper_test.ipy index ce176d4a..81b4307e 100644 --- a/tests/zookeeper_test.ipy +++ b/tests/zookeeper_test.ipy @@ -32,7 +32,7 @@ pod_name = zookeeper.get_zookeeper_pod_name() assert(pod_name) zookeeper_version = kube.kubectl("get", f"pods/{pod_name}", jsonpath="{.spec.containers[0].image}") -assert(zookeeper_version[0] == "ghcr.io/nuvolaris/zookeeper:3.4.14") +assert(zookeeper_version[0] == "zookeeper:3.5.9") # check the url is stored into the configuration assert(cfg.get("nuvolaris.zookeeper.url") == "zookeeper-0.zookeeper:2181") From 1e3aca01ef6b891101d15150f6a49fb4e22212d5 Mon Sep 17 00:00:00 2001 From: Francesco Timperi Tiberi Date: Mon, 15 Dec 2025 18:39:57 +0100 Subject: [PATCH 3/3] chore: default to wsk2 images built with zookeeper fix --- nuvolaris/enterprise_util.py | 2 +- nuvolaris/util.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nuvolaris/enterprise_util.py b/nuvolaris/enterprise_util.py index 31c2d51d..e4c9cec0 100644 --- a/nuvolaris/enterprise_util.py +++ b/nuvolaris/enterprise_util.py @@ -45,7 +45,7 @@ def get_invoker_image_data(data): data['invoker_tag'] = img_data["tag"] else: data['invoker_image'] = cfg.get("invoker.image","INVOKER_IMAGE","apache/openserverless-wsk-invoker") - data['invoker_tag'] = cfg.get("invoker.tag","INVOKER_TAG","2.0.0-incubating.2506080813") + data['invoker_tag'] = cfg.get("invoker.tag","INVOKER_TAG","2.0.0-incubating.2512132233") def getEnterpriseControllerConfigData(): data = { diff --git a/nuvolaris/util.py b/nuvolaris/util.py index bfb4edff..1abd4de7 100644 --- a/nuvolaris/util.py +++ b/nuvolaris/util.py @@ -303,7 +303,7 @@ def get_controller_image_data(data): data['controller_tag'] = img_data["tag"] else: data['controller_image'] = cfg.get("controller.image","CONTROLLER_IMAGE","apache/openserverless-wsk-controller") - data['controller_tag'] = cfg.get("controller.tag","CONTROLLER_TAG","2.0.0-incubating.2506080813") + data['controller_tag'] = cfg.get("controller.tag","CONTROLLER_TAG","2.0.0-incubating.2512132233") # return configuration parameters for the standalone controller def get_standalone_config_data():