From 890193e05bdd724c115f207b5e52682a3778b30c Mon Sep 17 00:00:00 2001 From: Peter Valdez Date: Tue, 4 Jun 2024 02:32:18 -0400 Subject: [PATCH] v0.5.0 --- Makefile | 2 +- README.md | 8 ++--- charts/snorlax/Chart.yaml | 4 +-- .../snorlax/templates/sleepschedule-crd.yaml | 33 +++++++++++++++++-- charts/snorlax/values.yaml | 2 +- operator/config/manager/kustomization.yaml | 2 +- .../controller/sleepschedule_controller.go | 2 +- 7 files changed, 40 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index b5fc4d8..93f6f1d 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION = 0.5.0-dev +VERSION = 0.5.0 BUNDLE_IMG = ghcr.io/moonbeam-nyc/snorlax-operator-bundle:${VERSION} OPERATOR_IMG = ghcr.io/moonbeam-nyc/snorlax-operator:${VERSION} PROXY_IMG = ghcr.io/moonbeam-nyc/snorlax-proxy:${VERSION} diff --git a/README.md b/README.md index fec9f8e..0c376c2 100644 --- a/README.md +++ b/README.md @@ -52,15 +52,15 @@ As a common example, if you sleep all of your staging/ephemeral deployments for wakeTime: '8:00am' sleepTime: '10:00pm' deployments: - - your-app-frontend - - your-app-db - - your-app-redis + - name: your-app-frontend + - name: your-app-db + - name: your-app-redis # (optional) the ingresses to update and point to the snorlax wake proxy, # which wakes your deployment when a request is received while it's # sleeping. ingresses: - - your-app-ingress + - name: your-app-ingress # (optional, defaults to UTC) the timezone to use for the input times above timezone: 'America/New_York' diff --git a/charts/snorlax/Chart.yaml b/charts/snorlax/Chart.yaml index 421d6a2..60d9616 100644 --- a/charts/snorlax/Chart.yaml +++ b/charts/snorlax/Chart.yaml @@ -13,9 +13,9 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.4.2 +version: 0.5.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "0.4.2" +appVersion: "0.5.0" diff --git a/charts/snorlax/templates/sleepschedule-crd.yaml b/charts/snorlax/templates/sleepschedule-crd.yaml index f8af0bf..98ebe8e 100644 --- a/charts/snorlax/templates/sleepschedule-crd.yaml +++ b/charts/snorlax/templates/sleepschedule-crd.yaml @@ -40,17 +40,44 @@ spec: spec: properties: deployments: - description: The names of the deployments that will be slept/woken + description: |- + The deployments that will be slept/woken. + SHAPE: {name: "deployment-name"} items: - type: string + properties: + name: + type: string + required: + - name + type: object type: array ingresses: description: |- The names of the ingresses that will be updated to point to the snorlax proxy which wakes the deployments when a request is received. A copy of the originals are stored in a configmap. + SHAPE: {name: "ingress-name", requires: [{deployment: {name: "deployment-name"}}]} items: - type: string + properties: + name: + type: string + requires: + items: + properties: + deployment: + properties: + name: + type: string + required: + - name + type: object + required: + - deployment + type: object + type: array + required: + - name + type: object type: array sleepTime: description: The time that the deployment will start sleeping diff --git a/charts/snorlax/values.yaml b/charts/snorlax/values.yaml index 8cf070f..0ee0d1e 100644 --- a/charts/snorlax/values.yaml +++ b/charts/snorlax/values.yaml @@ -32,7 +32,7 @@ controllerManager: - ALL image: repository: ghcr.io/moonbeam-nyc/snorlax-operator - tag: 0.4.2 + tag: 0.5.0 resources: limits: cpu: 500m diff --git a/operator/config/manager/kustomization.yaml b/operator/config/manager/kustomization.yaml index 0699af7..eeec1c1 100644 --- a/operator/config/manager/kustomization.yaml +++ b/operator/config/manager/kustomization.yaml @@ -5,4 +5,4 @@ kind: Kustomization images: - name: controller newName: ghcr.io/moonbeam-nyc/snorlax-operator - newTag: 0.4.2 + newTag: 0.5.0 diff --git a/operator/internal/controller/sleepschedule_controller.go b/operator/internal/controller/sleepschedule_controller.go index ed7d74f..28decc9 100644 --- a/operator/internal/controller/sleepschedule_controller.go +++ b/operator/internal/controller/sleepschedule_controller.go @@ -696,7 +696,7 @@ func (r *SleepScheduleReconciler) deploySnorlaxProxy(ctx context.Context, sleepS Containers: []corev1.Container{ { Name: "snorlax", - Image: "ghcr.io/moonbeam-nyc/snorlax-proxy:0.4.0", + Image: "ghcr.io/moonbeam-nyc/snorlax-proxy:0.5.0", ImagePullPolicy: "IfNotPresent", Env: []corev1.EnvVar{ {