diff --git a/artifacts/cr_template.py b/artifacts/cr_template.py index eded6109d..fd54a06aa 100644 --- a/artifacts/cr_template.py +++ b/artifacts/cr_template.py @@ -58,10 +58,13 @@ class CR_Template: kubean.io/sprayTimestamp: "{{ sprayInfo.sprayCommitTimestamp }}" kubean.io/sprayRelease: "{{ sprayInfo.sprayRlease }}" kubean.io/sprayCommit: "{{ sprayInfo.sprayCommitShort }}" + helm.sh/resource-policy: keep {%- else %} name: "manifest-{{ kubeanTag|replace('.', '-') }}" labels: kubean.io/sprayRelease: master + annotations: + helm.sh/resource-policy: keep {%- endif %} spec: kubesprayVersion: "{{ sprayInfo.sprayCommit }}" diff --git a/pkg/controllers/infomanifest/controller.go b/pkg/controllers/infomanifest/controller.go index 87b9e3a34..98caf877a 100644 --- a/pkg/controllers/infomanifest/controller.go +++ b/pkg/controllers/infomanifest/controller.go @@ -191,6 +191,9 @@ func (c *Controller) UpdateLocalService(manifests []manifestv1alpha1.Manifest) b // UpdateLocalAvailableImage update image infos into status. func (c *Controller) UpdateLocalAvailableImage(manifests []manifestv1alpha1.Manifest) { imageRepo := util.FetchKubeanConfigProperty(c.ClientSet).SprayJobImageRegistry + if imageRepo == "" { + imageRepo = "ghcr.m.daocloud.io" + } for _, manifest := range manifests { var newImageName string sprayRelease := manifest.ObjectMeta.Annotations[constants.KeySprayRelease]