Skip to content

do not support standard kustomization format #1167

@13567436138

Description

@13567436138

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions