argocd-image-updater icon indicating copy to clipboard operation
argocd-image-updater copied to clipboard

do not support standard kustomization format

Open 13567436138 opened this issue 5 months ago • 1 comments

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

when write back with follow go panic

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: gulimall-auth-server

# 添加 images 字段用于镜像更新
images:
  - name: gulimall-auth-server
    newName: harbor.mark.demo/guli/gulimall-auth-server
    newTag: ac47eef


resources:
  - deployment.yaml
  - service.yaml
  - propagationpolicy-deployment.yaml
  - propagationpolicy-svc.yaml
  - configmap.yaml

with code

switch appType {
	case ApplicationTypeKustomize:
		if appSource.Kustomize == nil {
			return []byte{}, nil
		}

		var params kustomizeOverride
		newParams := kustomizeOverride{
			Kustomize: kustomizeImages{
				Images: &appSource.Kustomize.Images,
			},
		}

		if len(originalData) == 0 {
			override, err = marshalWithIndent(newParams, defaultIndent)
			break
		}
		err = yaml.Unmarshal(originalData, &params)
		if err != nil {
			override, err = marshalWithIndent(newParams, defaultIndent)
			break
		}
		mergeKustomizeOverride(&params, &newParams)
		override, err = marshalWithIndent(params, defaultIndent)

params is nil

13567436138 avatar Jun 14 '25 12:06 13567436138