Skip to content

Commit

Permalink
Merge pull request #1352 from KubeKyrie/fix-manifest-keep
Browse files Browse the repository at this point in the history
fix kubean manifest helm keep policy
  • Loading branch information
ErikJiang authored Aug 29, 2024
2 parents e4962f4 + 86b5ff4 commit 0e9269a
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 0e9269a

Please sign in to comment.