Skip to content

PluginClient 在请求某些资源时, secret 是可选的,但必须传一个空对象 #315

@chengjingtao

Description

@chengjingtao

Expected Behavior

https://github.com/katanomi/pkg/blob/main/plugin/client/gitcontent.go#L40 不需要 secret时, 不用传递即可。

Actual Behavior

现在必须在业务方构造一个空的secret.

	// If the secret is not found, set empty object.
	if secret == nil {
		secret = &corev1.Secret{}
	}

https://github.com/katanomi/builds/pull/164/files

Steps to Reproduce the Problem

Additional Info

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions