You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openserverless.apache.org by "francescotimperi (via GitHub)" <gi...@apache.org> on 2025/09/18 18:59:05 UTC

[PR] Implements apache/operserverless#172 [openserverless-operator]

francescotimperi opened a new pull request, #73:
URL: https://github.com/apache/openserverless-operator/pull/73

   This PR contributes the capability to use SEWEEDFS as an alternative to replace MINIO
   
   feat: added seaweeedfs as MINIO replacement
   feat: supporting seaweedfs buckets for wsku resources
   feat: milvus setup may use seaweedfs
   fix: update valkey image to use bitnamisecure based images
   
   Limitations: The operator does not allow to deploy minio and seaweedfs at the same time. In addition seaweedfs is configured to use volume with a default size of 1GB. The operator sets a default per bucket quota of 1GB, unless otherwise specified and a default size of 60GB for the PVC assigned to the seaweed data folder.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@openserverless.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Implements apache/operserverless#172 [openserverless-operator]

Posted by "francescotimperi (via GitHub)" <gi...@apache.org>.
francescotimperi commented on code in PR #73:
URL: https://github.com/apache/openserverless-operator/pull/73#discussion_r2365713777


##########
nuvolaris/templates/redis-set.yaml:
##########
@@ -42,7 +42,7 @@ spec:
       {% endif %}
       containers:
       - name: redis
-        image: bitnami/valkey:7.2.5
+        image: bitnamisecure/valkey:latest

Review Comment:
   Yes, we should but the bitnamisecure repository it is relatively new, and the old bitnami repo has been deprecated. I haven't found a TAG pointing to a specific version yet.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@openserverless.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Implements apache/operserverless#172 [openserverless-operator]

Posted by "francescotimperi (via GitHub)" <gi...@apache.org>.
francescotimperi commented on code in PR #73:
URL: https://github.com/apache/openserverless-operator/pull/73#discussion_r2365713101


##########
deploy/seaweedfs/seaweedfs-pvc.yaml:
##########
@@ -0,0 +1,28 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+---
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+  name: seaweedfs-pvc
+  namespace: nuvolaris
+spec:
+  accessModes:
+    - ReadWriteOnce
+  resources:
+    requests:
+      storage: 30Gi

Review Comment:
   It is configurable. the CRD specifies a parameter for  it and the operator applies it. By the way the default value it s 60GB.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@openserverless.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Implements apache/operserverless#172 [openserverless-operator]

Posted by "francescotimperi (via GitHub)" <gi...@apache.org>.
francescotimperi commented on code in PR #73:
URL: https://github.com/apache/openserverless-operator/pull/73#discussion_r2365714493


##########
nuvolaris/seaweedfs_deploy.py:
##########
@@ -0,0 +1,278 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+import kopf, logging, time, os
+import nuvolaris.kube as kube
+import nuvolaris.kustomize as kus
+import nuvolaris.config as cfg
+import nuvolaris.util as util
+import nuvolaris.openwhisk as openwhisk
+import nuvolaris.seaweedfs_ingress as seaweedfs_ingress
+import nuvolaris.operator_util as operator_util
+
+from nuvolaris.user_config import UserConfig
+from nuvolaris.user_metadata import UserMetadata
+from nuvolaris.seaweedfs_util import SeaweedfsClient
+
+def _get_seaweedfs_service():
+    return util.get_service("{.items[?(@.spec.selector.app == 'seaweedfs')]}")
+
+def _add_seaweedfs_user_metadata(ucfg: UserConfig, user_metadata:UserMetadata):
+    """
+    adds entries for seaweedfs connectivity S3_HOST, S3_PORT, S3_ACCESS_KEY, S3_SECRET_KEY    
+    """ 
+
+    try:
+        seaweed_service =  _get_seaweedfs_service()
+        if(seaweed_service):
+            seaweedfs_host = f"{seaweed_service['metadata']['name']}.{seaweed_service['metadata']['namespace']}.svc.cluster.local"
+            access_key = ucfg.get('namespace')
+            secret_key = ucfg.get("object-storage.password")
+            user_metadata.add_metadata("S3_PROVIDER","seaweedfs")
+            user_metadata.add_metadata("S3_HOST",seaweedfs_host)
+            user_metadata.add_metadata("S3_ACCESS_KEY",access_key)
+            user_metadata.add_metadata("S3_SECRET_KEY",secret_key)
+
+            user_metadata.add_safely_from_cm("S3_API_URL", '{.metadata.annotations.s3_api_url}')
+            user_metadata.add_safely_from_cm("S3_CONSOLE_URL", '{.metadata.annotations.s3_console_url}')
+
+            ports = list(seaweed_service['spec']['ports'])
+            for port in ports:
+                if(port['name']=='s3-api'):
+                    user_metadata.add_metadata("S3_PORT",port['port'])
+
+        return None
+    except Exception as e:
+        logging.error(f"failed to build SEAWEEDFS metadata for {ucfg.get('namespace')}: {e}")
+        return None 
+
+def create(owner=None):
+    logging.info("*** configuring seaweedfs standalone")
+
+    data = util.get_seaweedfs_config_data()
+
+    tplp = ["pvc-attach.yaml"]

Review Comment:
   @d4rkstar this is where the seaweeedFS PVC is patched to apply the configured size



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@openserverless.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Implements apache/operserverless#172 [openserverless-operator]

Posted by "francescotimperi (via GitHub)" <gi...@apache.org>.
francescotimperi commented on code in PR #73:
URL: https://github.com/apache/openserverless-operator/pull/73#discussion_r2365713777


##########
nuvolaris/templates/redis-set.yaml:
##########
@@ -42,7 +42,7 @@ spec:
       {% endif %}
       containers:
       - name: redis
-        image: bitnami/valkey:7.2.5
+        image: bitnamisecure/valkey:latest

Review Comment:
   Yes, we should but the bitnamisecure repository it is relatively new, and the old bitnami repo has been deprecated. I haven't a a TAG pointing to a specific version yet.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@openserverless.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Implements apache/operserverless#172 [openserverless-operator]

Posted by "d4rkstar (via GitHub)" <gi...@apache.org>.
d4rkstar merged PR #73:
URL: https://github.com/apache/openserverless-operator/pull/73


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@openserverless.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Implements apache/operserverless#172 [openserverless-operator]

Posted by "d4rkstar (via GitHub)" <gi...@apache.org>.
d4rkstar commented on code in PR #73:
URL: https://github.com/apache/openserverless-operator/pull/73#discussion_r2365685138


##########
deploy/redis/redis-set.yaml:
##########


Review Comment:
   it's ok not to stick to a specific version?



##########
deploy/seaweedfs/seaweedfs-pvc.yaml:
##########
@@ -0,0 +1,28 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+---
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+  name: seaweedfs-pvc
+  namespace: nuvolaris
+spec:
+  accessModes:
+    - ReadWriteOnce
+  resources:
+    requests:
+      storage: 30Gi

Review Comment:
   @francescotimperi :
   On most modern CSI drivers / cloud providers (AWS EBS, GCP PD, Azure Disk, etc.) the requests.storage is a reservation and the volume is provisioned with that exact capacity. While in local path it's just a directory (so no reservation..).
   We saw that 30Gi is the default size, but it would be good - from your point of view - to make this configurable?



##########
nuvolaris/templates/redis-set.yaml:
##########
@@ -42,7 +42,7 @@ spec:
       {% endif %}
       containers:
       - name: redis
-        image: bitnami/valkey:7.2.5
+        image: bitnamisecure/valkey:latest

Review Comment:
   @francescotimperi same as above: should we use a specific version?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@openserverless.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Implements apache/operserverless#172 [openserverless-operator]

Posted by "francescotimperi (via GitHub)" <gi...@apache.org>.
francescotimperi commented on code in PR #73:
URL: https://github.com/apache/openserverless-operator/pull/73#discussion_r2365713777


##########
nuvolaris/templates/redis-set.yaml:
##########
@@ -42,7 +42,7 @@ spec:
       {% endif %}
       containers:
       - name: redis
-        image: bitnami/valkey:7.2.5
+        image: bitnamisecure/valkey:latest

Review Comment:
   Yes, we should but the nitnamisecure repository it is relatively new, and the old bitnami repo has been deprecated. I haven't a a TAG pointing to a specific version yet.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@openserverless.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org