UffizziCloud / uffizzi_controller

A smart proxy service that handles requests from the Uffizzi API to the Kubernetes API
Apache License 2.0
11 stars 3 forks source link

Update Uffizzi Operator 1.3 with sleep mode #107

Closed moklidia closed 11 months ago

moklidia commented 12 months ago

@waveywaves Please add an example of the values the controller needs to send to Kubernetes for this to work.

axisofentropy commented 12 months ago

Are these examples good? https://github.com/UffizziCloud/uffizzi_platform/issues/1206

waveywaves commented 11 months ago

@moklidia please refer to https://github.com/UffizziCloud/uffizzi_platform/issues/1206 for this

TLDR

metadata:
  annotations:
    enterprise.uffizzi.com/sleep-after: "3600"

the above annotation needs to be put on the UffizziCluster to give timer based sleep

spec:
  sleep: true

the above needs to be given to trigger sleep

spec:
  sleep: false

the above needs to be given to wake the UffizziCluster up

moklidia commented 11 months ago

Conditions when asleep:

Status:
  Conditions:
    Last Transition Time:  2023-09-28T11:57:29Z
    Message:               [HelmRelease] Release reconciliation succeeded
    Reason:                ReconciliationSucceeded
    Status:                True
    Type:                  Ready
    Last Transition Time:  2023-09-28T11:57:29Z
    Message:               [HelmRelease] Helm install succeeded
    Reason:                InstallSucceeded
    Status:                True
    Type:                  Released
    Last Transition Time:  2023-09-28T12:01:41Z
    Message:               UffizziCluster put to sleep manually
    Reason:                Sleeping
    Status:                True
    Type:                  Sleep
  Helm Release Ref:        uc-pr-82
  Host:                    pr-82-c169590220745553.uclusters.app.qa-gke.uffizzi.com

Conditions when awake:

Status:
  Conditions:
    Last Transition Time:  2023-09-28T11:57:29Z
    Message:               [HelmRelease] Release reconciliation succeeded
    Reason:                ReconciliationSucceeded
    Status:                True
    Type:                  Ready
    Last Transition Time:  2023-09-28T11:57:29Z
    Message:               [HelmRelease] Helm install succeeded
    Reason:                InstallSucceeded
    Status:                True
    Type:                  Released
    Last Transition Time:  2023-09-28T12:01:41Z
    Message:               UffizziCluster put to sleep manually
    Reason:                Sleeping
    Status:                True
    Type:                  Sleep
  Helm Release Ref:        uc-pr-82
  Host:                    pr-82-c169590220745553.uclusters.app.qa-gke.uffizzi.com