Skip to content

Commit

Permalink
fix kubean manifest helm keep policy
Browse files Browse the repository at this point in the history
Signed-off-by: KubeKyrie <shaolong.qin@daocloud.io>
  • Loading branch information
KubeKyrie committed Aug 28, 2024
1 parent e4962f4 commit 86b5ff4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions artifacts/cr_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand Down
3 changes: 3 additions & 0 deletions pkg/controllers/infomanifest/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 86b5ff4

Please sign in to comment.