From 05a848a26122959d140fb79cc5caed5a09d1c4a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=8A=92=E6=83=85=E7=86=8A?= <2669184984@qq.com> Date: Mon, 9 Sep 2024 18:05:55 +0800 Subject: [PATCH] add release old tag --- .../devbox/api/v1alpha1/devboxrelease_types.go | 9 ++++----- .../bases/devbox.sealos.io_devboxreleases.yaml | 15 ++++++++++++++- .../devbox/deploy/manifests/deploy.yaml.tmpl | 15 ++++++++++++++- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/controllers/devbox/api/v1alpha1/devboxrelease_types.go b/controllers/devbox/api/v1alpha1/devboxrelease_types.go index d249065d25f..7ac9e126773 100644 --- a/controllers/devbox/api/v1alpha1/devboxrelease_types.go +++ b/controllers/devbox/api/v1alpha1/devboxrelease_types.go @@ -41,11 +41,6 @@ const ( DevboxReleasePhaseFailed DevboxReleasePhase = "Failed" ) -// +kubebuilder:printcolumn:name="DevboxName",type="string",JSONPath=".spec.devboxName" -// +kubebuilder:printcolumn:name="NewTag",type="string",JSONPath=".spec.newTag" -// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase" -// +kubebuilder:printcolumn:name="OriginalImage",type="string",JSONPath=".status.originalImage" - // DevBoxReleaseStatus defines the observed state of DevBoxRelease type DevBoxReleaseStatus struct { // +kubebuilder:validation:Optional @@ -57,6 +52,10 @@ type DevBoxReleaseStatus struct { // +kubebuilder:object:root=true // +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="DevboxName",type="string",JSONPath=".spec.devboxName" +// +kubebuilder:printcolumn:name="NewTag",type="string",JSONPath=".spec.newTag" +// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase" +// +kubebuilder:printcolumn:name="OriginalImage",type="string",JSONPath=".status.originalImage" // DevBoxRelease is the Schema for the devboxreleases API type DevBoxRelease struct { diff --git a/controllers/devbox/config/crd/bases/devbox.sealos.io_devboxreleases.yaml b/controllers/devbox/config/crd/bases/devbox.sealos.io_devboxreleases.yaml index 06af0dfb7fc..6ef4ad257b4 100644 --- a/controllers/devbox/config/crd/bases/devbox.sealos.io_devboxreleases.yaml +++ b/controllers/devbox/config/crd/bases/devbox.sealos.io_devboxreleases.yaml @@ -28,7 +28,20 @@ spec: singular: devboxrelease scope: Namespaced versions: - - name: v1alpha1 + - additionalPrinterColumns: + - jsonPath: .spec.devboxName + name: DevboxName + type: string + - jsonPath: .spec.newTag + name: NewTag + type: string + - jsonPath: .status.phase + name: Phase + type: string + - jsonPath: .status.originalImage + name: OriginalImage + type: string + name: v1alpha1 schema: openAPIV3Schema: description: DevBoxRelease is the Schema for the devboxreleases API diff --git a/controllers/devbox/deploy/manifests/deploy.yaml.tmpl b/controllers/devbox/deploy/manifests/deploy.yaml.tmpl index 01e9a777159..7332eb18296 100644 --- a/controllers/devbox/deploy/manifests/deploy.yaml.tmpl +++ b/controllers/devbox/deploy/manifests/deploy.yaml.tmpl @@ -2807,7 +2807,20 @@ spec: singular: devboxrelease scope: Namespaced versions: - - name: v1alpha1 + - additionalPrinterColumns: + - jsonPath: .spec.devboxNamåe + name: DevboxName + type: string + - jsonPath: .spec.newTag + name: NewTag + type: string + - jsonPath: .status.phase + name: Phase + type: string + - jsonPath: .status.originalImage + name: OriginalImage + type: string + name: v1alpha1 schema: openAPIV3Schema: description: DevBoxRelease is the Schema for the devboxreleases API