diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 6830b17..738d459 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -33,9 +33,10 @@ jobs: run: | VERSION=${GITHUB_REF//refs\/tags\/v} sed -i 's/0.0.1/'"${VERSION}"'/' helm/hybrid-cloud-amqp-operator/Chart.yaml + sed -i 's/0.1.0/'"${VERSION}"'/' helm/hybrid-cloud-amqp-operator/Chart.yaml sed -i 's/dev/'"${VERSION}"'/' helm/hybrid-cloud-amqp-operator/values.yaml sed -i 's/0.0.1/'"${VERSION}"'/' helm/hybrid-cloud-amqp-operator-crds/Chart.yaml - sed -i 's/dev/'"${VERSION}"'/' helm/hybrid-cloud-amqp-operator-crds/values.yaml + sed -i 's/0.1.0/'"${VERSION}"'/' helm/hybrid-cloud-amqp-operator-crds/Chart.yaml - name: Publish helm chart uses: stefanprodan/helm-gh-pages@master diff --git a/hybridcloud/handlers/broker.py b/hybridcloud/handlers/broker.py index 5133a75..992a613 100644 --- a/hybridcloud/handlers/broker.py +++ b/hybridcloud/handlers/broker.py @@ -1,3 +1,4 @@ +from datetime import datetime, timezone import kopf from .routing import amqp_backend from hybridcloud_core.configuration import config_get @@ -65,6 +66,7 @@ def _status(name, namespace, status_obj, status, reason=None, backend=None, endp status_obj["broker_name"] = broker_name status_obj["deployment"] = { "status": status, - "reason": reason + "reason": reason, + "latest-update": datetime.now(tz=timezone.utc).isoformat() } patch_namespaced_custom_object_status(k8s.AMQPBroker, namespace, name, status_obj) diff --git a/hybridcloud/handlers/queue.py b/hybridcloud/handlers/queue.py index 79a6afc..abd1919 100644 --- a/hybridcloud/handlers/queue.py +++ b/hybridcloud/handlers/queue.py @@ -1,3 +1,4 @@ +from datetime import datetime, timezone import kopf from .routing import amqp_backend from hybridcloud_core.configuration import config_get @@ -101,6 +102,7 @@ def _status(name, namespace, status_obj, status, reason=None, backend=None, brok status_obj["queue_name"] = queue_name status_obj["deployment"] = { "status": status, - "reason": reason + "reason": reason, + "latest-update": datetime.now(tz=timezone.utc).isoformat() } patch_namespaced_custom_object_status(k8s.AMQPQueue, namespace, name, status_obj) diff --git a/hybridcloud/handlers/queue_consumer.py b/hybridcloud/handlers/queue_consumer.py index 9a29333..641c1d6 100644 --- a/hybridcloud/handlers/queue_consumer.py +++ b/hybridcloud/handlers/queue_consumer.py @@ -1,3 +1,4 @@ +from datetime import datetime, timezone import kopf from .routing import amqp_backend from hybridcloud_core.configuration import config_get @@ -97,7 +98,8 @@ def _status(name, namespace, status_obj, status, reason=None, backend=None, brok status_obj["queue_name"] = queue_name status_obj["deployment"] = { "status": status, - "reason": reason + "reason": reason, + "latest-update": datetime.now(tz=timezone.utc).isoformat() } patch_namespaced_custom_object_status(k8s.AMQPQueueConsumer, namespace, name, status_obj) diff --git a/hybridcloud/handlers/topic.py b/hybridcloud/handlers/topic.py index b293409..df72efe 100644 --- a/hybridcloud/handlers/topic.py +++ b/hybridcloud/handlers/topic.py @@ -1,3 +1,4 @@ +from datetime import datetime, timezone import kopf from .routing import amqp_backend from hybridcloud_core.configuration import config_get @@ -101,6 +102,7 @@ def _status(name, namespace, status_obj, status, reason=None, backend=None, brok status_obj["topic_name"] = topic_name status_obj["deployment"] = { "status": status, - "reason": reason + "reason": reason, + "latest-update": datetime.now(tz=timezone.utc).isoformat() } patch_namespaced_custom_object_status(k8s.AMQPTopic, namespace, name, status_obj) diff --git a/hybridcloud/handlers/topic_subscription.py b/hybridcloud/handlers/topic_subscription.py index a28404a..d706876 100644 --- a/hybridcloud/handlers/topic_subscription.py +++ b/hybridcloud/handlers/topic_subscription.py @@ -1,3 +1,4 @@ +from datetime import datetime, timezone import kopf from .routing import amqp_backend from hybridcloud_core.configuration import config_get @@ -105,7 +106,8 @@ def _status(name, namespace, status_obj, status, reason=None, backend=None, brok status_obj["subscription_name"] = subscription_name status_obj["deployment"] = { "status": status, - "reason": reason + "reason": reason, + "latest-update": datetime.now(tz=timezone.utc).isoformat() } patch_namespaced_custom_object_status(k8s.AMQPTopicSubscription, namespace, name, status_obj)