This is an automated email from the ASF dual-hosted git repository.
d4rkstar pushed a commit to branch 0.9.0
in repository https://gitbox.apache.org/repos/asf/openserverless-operator.git
The following commit(s) were added to refs/heads/0.9.0 by this push:
new c28d8f6 do not use a fixed offset to nuvolaris.io (#119)
c28d8f6 is described below
commit c28d8f60f62bd38f4d68fc600b63c20c3db87197
Author: Michele Sciabarra <[email protected]>
AuthorDate: Tue Aug 25 19:36:59 2026 +0200
do not use a fixed offset to nuvolaris.io (#119)
* do not use a fixed offset to nuvolaris.io
* removed talos
---------
Co-authored-by: Trustable User <[email protected]>
---
Taskfile.yml | 3 -
actions/devel/download/nuvolaris/config.py | 8 ++-
actions/devel/ferretdb/nuvolaris/config.py | 8 ++-
actions/devel/minio/nuvolaris/config.py | 8 ++-
actions/devel/psql/nuvolaris/config.py | 8 ++-
actions/devel/redis/nuvolaris/config.py | 8 ++-
actions/devel/upload/nuvolaris/config.py | 8 ++-
clusters/talos-gcp.yml | 107 -----------------------------
nuvolaris/config.py | 8 ++-
9 files changed, 42 insertions(+), 124 deletions(-)
diff --git a/Taskfile.yml b/Taskfile.yml
index 51341e5..c5936aa 100644
--- a/Taskfile.yml
+++ b/Taskfile.yml
@@ -68,9 +68,6 @@ includes:
sys:
taskfile: actions/system.yml
dir: actions
- talos:
- taskfile: clusters/talos-gcp.yml
- dir: clusters
tasks:
diff --git a/actions/devel/download/nuvolaris/config.py
b/actions/devel/download/nuvolaris/config.py
index 283ab9f..a1e2ced 100644
--- a/actions/devel/download/nuvolaris/config.py
+++ b/actions/devel/download/nuvolaris/config.py
@@ -20,6 +20,10 @@ import logging
_config = {}
+# Prefix of the kube node labels carrying configuration. Kept as a
+# constant so the slice below tracks its length automatically.
+LABEL_PREFIX = "nuvolaris.io/"
+
# define a configuration
# the configuration is a map, followed by a list of labels
# the map can be a serialized json and will be flattened to a map of values.
@@ -92,8 +96,8 @@ def detect_labels(labels=None):
kube = None
for i in labels:
for j in list(i.keys()):
- if j.startswith("nuvolaris.io/"):
- key = f"nuvolaris.{j[13:]}"
+ if j.startswith(LABEL_PREFIX):
+ key = f"nuvolaris.{j[len(LABEL_PREFIX):]}"
res[key] = i[j]
_config[key] = i[j]
diff --git a/actions/devel/ferretdb/nuvolaris/config.py
b/actions/devel/ferretdb/nuvolaris/config.py
index 283ab9f..a1e2ced 100644
--- a/actions/devel/ferretdb/nuvolaris/config.py
+++ b/actions/devel/ferretdb/nuvolaris/config.py
@@ -20,6 +20,10 @@ import logging
_config = {}
+# Prefix of the kube node labels carrying configuration. Kept as a
+# constant so the slice below tracks its length automatically.
+LABEL_PREFIX = "nuvolaris.io/"
+
# define a configuration
# the configuration is a map, followed by a list of labels
# the map can be a serialized json and will be flattened to a map of values.
@@ -92,8 +96,8 @@ def detect_labels(labels=None):
kube = None
for i in labels:
for j in list(i.keys()):
- if j.startswith("nuvolaris.io/"):
- key = f"nuvolaris.{j[13:]}"
+ if j.startswith(LABEL_PREFIX):
+ key = f"nuvolaris.{j[len(LABEL_PREFIX):]}"
res[key] = i[j]
_config[key] = i[j]
diff --git a/actions/devel/minio/nuvolaris/config.py
b/actions/devel/minio/nuvolaris/config.py
index 283ab9f..a1e2ced 100644
--- a/actions/devel/minio/nuvolaris/config.py
+++ b/actions/devel/minio/nuvolaris/config.py
@@ -20,6 +20,10 @@ import logging
_config = {}
+# Prefix of the kube node labels carrying configuration. Kept as a
+# constant so the slice below tracks its length automatically.
+LABEL_PREFIX = "nuvolaris.io/"
+
# define a configuration
# the configuration is a map, followed by a list of labels
# the map can be a serialized json and will be flattened to a map of values.
@@ -92,8 +96,8 @@ def detect_labels(labels=None):
kube = None
for i in labels:
for j in list(i.keys()):
- if j.startswith("nuvolaris.io/"):
- key = f"nuvolaris.{j[13:]}"
+ if j.startswith(LABEL_PREFIX):
+ key = f"nuvolaris.{j[len(LABEL_PREFIX):]}"
res[key] = i[j]
_config[key] = i[j]
diff --git a/actions/devel/psql/nuvolaris/config.py
b/actions/devel/psql/nuvolaris/config.py
index 283ab9f..a1e2ced 100644
--- a/actions/devel/psql/nuvolaris/config.py
+++ b/actions/devel/psql/nuvolaris/config.py
@@ -20,6 +20,10 @@ import logging
_config = {}
+# Prefix of the kube node labels carrying configuration. Kept as a
+# constant so the slice below tracks its length automatically.
+LABEL_PREFIX = "nuvolaris.io/"
+
# define a configuration
# the configuration is a map, followed by a list of labels
# the map can be a serialized json and will be flattened to a map of values.
@@ -92,8 +96,8 @@ def detect_labels(labels=None):
kube = None
for i in labels:
for j in list(i.keys()):
- if j.startswith("nuvolaris.io/"):
- key = f"nuvolaris.{j[13:]}"
+ if j.startswith(LABEL_PREFIX):
+ key = f"nuvolaris.{j[len(LABEL_PREFIX):]}"
res[key] = i[j]
_config[key] = i[j]
diff --git a/actions/devel/redis/nuvolaris/config.py
b/actions/devel/redis/nuvolaris/config.py
index 283ab9f..a1e2ced 100644
--- a/actions/devel/redis/nuvolaris/config.py
+++ b/actions/devel/redis/nuvolaris/config.py
@@ -20,6 +20,10 @@ import logging
_config = {}
+# Prefix of the kube node labels carrying configuration. Kept as a
+# constant so the slice below tracks its length automatically.
+LABEL_PREFIX = "nuvolaris.io/"
+
# define a configuration
# the configuration is a map, followed by a list of labels
# the map can be a serialized json and will be flattened to a map of values.
@@ -92,8 +96,8 @@ def detect_labels(labels=None):
kube = None
for i in labels:
for j in list(i.keys()):
- if j.startswith("nuvolaris.io/"):
- key = f"nuvolaris.{j[13:]}"
+ if j.startswith(LABEL_PREFIX):
+ key = f"nuvolaris.{j[len(LABEL_PREFIX):]}"
res[key] = i[j]
_config[key] = i[j]
diff --git a/actions/devel/upload/nuvolaris/config.py
b/actions/devel/upload/nuvolaris/config.py
index 283ab9f..a1e2ced 100644
--- a/actions/devel/upload/nuvolaris/config.py
+++ b/actions/devel/upload/nuvolaris/config.py
@@ -20,6 +20,10 @@ import logging
_config = {}
+# Prefix of the kube node labels carrying configuration. Kept as a
+# constant so the slice below tracks its length automatically.
+LABEL_PREFIX = "nuvolaris.io/"
+
# define a configuration
# the configuration is a map, followed by a list of labels
# the map can be a serialized json and will be flattened to a map of values.
@@ -92,8 +96,8 @@ def detect_labels(labels=None):
kube = None
for i in labels:
for j in list(i.keys()):
- if j.startswith("nuvolaris.io/"):
- key = f"nuvolaris.{j[13:]}"
+ if j.startswith(LABEL_PREFIX):
+ key = f"nuvolaris.{j[len(LABEL_PREFIX):]}"
res[key] = i[j]
_config[key] = i[j]
diff --git a/clusters/talos-gcp.yml b/clusters/talos-gcp.yml
deleted file mode 100644
index d5ca56d..0000000
--- a/clusters/talos-gcp.yml
+++ /dev/null
@@ -1,107 +0,0 @@
-# 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.
-#
-version: '3'
-
-vars:
- STORAGE_BUCKET:
nuvolaris-testing-5lqrl-image-registry-us-east4-kfwmgrldgwapgb
- REGION: us-central1
- PROJECT_ID: nuvolaris-testing
-
-tasks:
-
- load-img:
- ignore_error: true
- cmds:
- - rm -Rf /tmp/gcp-amd64.raw.tar.gz
- - curl -sL -o /tmp/gcp-amd64.raw.tar.gz
https://github.com/siderolabs/talos/releases/download/v1.5.1/gcp-amd64.raw.tar.gz
- - gsutil cp /tmp/gcp-amd64.raw.tar.gz gs://{{.STORAGE_BUCKET}}
- - gcloud compute images create talos
--source-uri=gs://{{.STORAGE_BUCKET}}/gcp-amd64.raw.tar.gz
--guest-os-features=VIRTIO_SCSI_MULTIQUEUE
- - rm -Rf /tmp/gcp-amd64.raw.tar.gz
-
- network:
- cmds:
- - |
- gcloud compute instance-groups unmanaged create talos-ig --zone
{{.REGION}}-b
- gcloud compute instance-groups set-named-ports talos-ig --named-ports
tcp6443:6443 --zone {{.REGION}}-b
- gcloud compute health-checks create tcp talos-health-check --port 6443
- gcloud compute backend-services create talos-be \
- --global \
- --protocol TCP \
- --health-checks talos-health-check \
- --timeout 5m \
- --port-name tcp6443
- gcloud compute backend-services add-backend talos-be \
- --global \
- --instance-group talos-ig \
- --instance-group-zone {{.REGION}}-b
- gcloud compute target-tcp-proxies create talos-tcp-proxy \
- --backend-service talos-be \
- --proxy-header NONE
- gcloud compute addresses create talos-lb-ip --global
- gcloud compute forwarding-rules create talos-fwd-rule \
- --global \
- --ports 443 \
- --address talos-lb-ip \
- --target-tcp-proxy talos-tcp-proxy
- gcloud compute firewall-rules create talos-controlplane-firewall \
- --source-ranges 130.211.0.0/22,35.191.0.0/16 \
- --target-tags talos-controlplane \
- --allow tcp:6443
- gcloud compute firewall-rules create talos-controlplane-talosctl \
- --source-ranges 0.0.0.0/0 \
- --target-tags talos-controlplane \
- --allow tcp:50000
-
- talos-config:
- cmds:
- - talosctl gen config talos-k8s-gcp-tutorial
https://{{.LB_PUBLIC_IP}}:443
- vars:
- LB_PUBLIC_IP: $(gcloud compute forwarding-rules describe talos-fwd-rule
--global --format json | jq -r .IPAddress)
-
- create:
- cmds:
- - gcloud compute instances create nuv-talos-controlplane-1
--machine-type=n2-standard-2 --image=talos --zone={{.REGION}}-b
--tags=talos-controlplane --boot-disk-size=128GB
--metadata-from-file=user-data=./controlplane.yaml --tags=talos-controlplane
- - gcloud compute disks create nuv-talos-controlplane-1-disk --size=200GB
--type=pd-balanced --zone={{.REGION}}-b
- - gcloud compute instances attach-disk nuv-talos-controlplane-1
--disk=nuv-talos-controlplane-1-disk --zone={{.REGION}}-b
- - gcloud compute instance-groups unmanaged add-instances talos-ig
--zone={{.REGION}}-b --instances=nuv-talos-controlplane-1
- - for i in $( seq 1 3 ); do
- gcloud compute instances create nuv-talos-worker-$i
--machine-type=n2-standard-2 --image=talos --zone={{.REGION}}-b
--boot-disk-size=128GB --metadata-from-file=user-data=./worker.yaml
--tags=talos-worker-$i;
- gcloud compute disks create nuv-talos-worker-$i-disk --size=200GB
--type=pd-balanced --zone={{.REGION}}-b;
- gcloud compute instances attach-disk nuv-talos-worker-$i
--disk=nuv-talos-worker-$i-disk --zone={{.REGION}}-b;
- done
-
- bootstrap:
- cmds:
- - talosctl --talosconfig talosconfig config endpoint
{{.CONTROL_PLANE_0_IP}}
- - talosctl --talosconfig talosconfig config node {{.CONTROL_PLANE_0_IP}}
- - talosctl --talosconfig talosconfig bootstrap
- vars:
- CONTROL_PLANE_0_IP: $(gcloud compute instances describe
nuv-talos-controlplane-1 --zone {{.REGION}}-b --format json | jq -r
'.networkInterfaces[0].accessConfigs[0].natIP')
-
- config: |-
- talosctl --talosconfig talosconfig kubeconfig ./talos.kubeconfig
- cp talos.kubeconfig ~/.kube/config
- kubectl get nodes
-
- reset:
- - kubectl delete -f ../deploy/cert-manager/cert-manager.yaml
- - kubectl delete -f ../deploy/ingress-nginx/cloud-nginx-ingress.yaml
-
- setup:
- - kubectl apply -f ../deploy/cert-manager/cert-manager.yaml
- - kubectl apply -f ../deploy/ingress-nginx/cloud-nginx-ingress.yaml
\ No newline at end of file
diff --git a/nuvolaris/config.py b/nuvolaris/config.py
index 283ab9f..a1e2ced 100644
--- a/nuvolaris/config.py
+++ b/nuvolaris/config.py
@@ -20,6 +20,10 @@ import logging
_config = {}
+# Prefix of the kube node labels carrying configuration. Kept as a
+# constant so the slice below tracks its length automatically.
+LABEL_PREFIX = "nuvolaris.io/"
+
# define a configuration
# the configuration is a map, followed by a list of labels
# the map can be a serialized json and will be flattened to a map of values.
@@ -92,8 +96,8 @@ def detect_labels(labels=None):
kube = None
for i in labels:
for j in list(i.keys()):
- if j.startswith("nuvolaris.io/"):
- key = f"nuvolaris.{j[13:]}"
+ if j.startswith(LABEL_PREFIX):
+ key = f"nuvolaris.{j[len(LABEL_PREFIX):]}"
res[key] = i[j]
_config[key] = i[j]