volcano icon indicating copy to clipboard operation
volcano copied to clipboard

Remove list secret in controller ClusterRole

Open lekaf974 opened this issue 9 months ago • 3 comments

Fix issue #3446

Hi I saw this opened issue and tried to fix it with following PR

lekaf974 avatar Apr 30 '24 02:04 lekaf974

Welcome @lekaf974!

It looks like this is your first PR to volcano-sh/volcano.

Thank you, and welcome to Volcano. :smiley:

volcano-sh-bot avatar Apr 30 '24 02:04 volcano-sh-bot

/assign @kevin-wangzefeng

lekaf974 avatar Apr 30 '24 16:04 lekaf974

/lgtm

Monokaix avatar May 07 '24 06:05 Monokaix

Hi, please execute make verify-generated-yaml and then execute command according the output instruction to make ci happy.

Monokaix avatar May 07 '24 07:05 Monokaix

Hi, please execute make verify-generated-yaml and then execute command according the output instruction to make ci happy.

Taking a look

lekaf974 avatar May 08 '24 00:05 lekaf974

@Monokaix got this issue when I am trying to run the command provided

$ make TAG=latest generate-yaml
mkdir -p _output/bin
mkdir -p _output/release
#go mod vendor
# volcano crd base
/home/matthieu/go/bin/controller-gen "crd:crdVersions=v1,generateEmbeddedObjectMeta=true" paths="./vendor/volcano.sh/apis/pkg/apis/scheduling/v1beta1;./vendor/volcano.sh/apis/pkg/apis/batch/v1alpha1;./vendor/volcano.sh/apis/pkg/apis/bus/v1alpha1;./vendor/volcano.sh/apis/pkg/apis/nodeinfo/v1alpha1" output:crd:artifacts:config=config/crd/volcano/bases
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x9ed52f]

goroutine 55 [running]:
go/types.(*Checker).handleBailout(0xc000242400, 0xc0015c1d40)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/check.go:367 +0x88
panic({0xb9a3a0?, 0x1266ad0?})
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/runtime/panic.go:770 +0x132
go/types.(*StdSizes).Sizeof(0x0, {0xd85068, 0x126f300})
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/sizes.go:228 +0x30f
go/types.(*Config).sizeof(...)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/sizes.go:333
go/types.representableConst.func1({0xd85068?, 0x126f300?})
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/const.go:76 +0x9e
go/types.representableConst({0xd8b4c0, 0x123b460}, 0xc000242400, 0x126f300, 0xc0015c14b0)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/const.go:92 +0x192
go/types.(*Checker).representation(0xc000242400, 0xc0015cc6c0, 0x126f300)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/const.go:256 +0x65
go/types.(*Checker).implicitTypeAndValue(0xc000242400, 0xc0015cc6c0, {0xd85090, 0xc0001fa380})
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/expr.go:375 +0x2d7
go/types.(*Checker).assignment(0xc000242400, 0xc0015cc6c0, {0xd85090, 0xc0001fa380}, {0xc64127, 0x14})
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/assignments.go:52 +0x2e5
go/types.(*Checker).initConst(0xc000242400, 0xc0018c08a0, 0xc0015cc6c0)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/assignments.go:126 +0x2c5
go/types.(*Checker).constDecl(0xc000242400, 0xc0018c08a0, {0xd87d70, 0xc000c06160}, {0xd87d70, 0xc000c06180}, 0x0)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/decl.go:490 +0x311
go/types.(*Checker).objDecl(0xc000242400, {0xd90b40, 0xc0018c08a0}, 0x0)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/decl.go:191 +0xa49
go/types.(*Checker).packageObjects(0xc000242400)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/resolver.go:693 +0x4dd
go/types.(*Checker).checkFiles(0xc000242400, {0xc0005d9e90, 0x5, 0x5})
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/check.go:408 +0x1a5
go/types.(*Checker).Files(...)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/check.go:372
sigs.k8s.io/controller-tools/pkg/loader.(*loader).typeCheck(0xc000232f30, 0xc0010c9de0)
	/home/matthieu/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/loader.go:283 +0x36a
sigs.k8s.io/controller-tools/pkg/loader.(*Package).NeedTypesInfo(0xc0010c9de0)
	/home/matthieu/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/loader.go:96 +0x39
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check(0xc00062cd50, 0xc0010c9de0)
	/home/matthieu/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:263 +0x2b7
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check.func1(0x64?)
	/home/matthieu/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:257 +0x53
created by sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check in goroutine 16
	/home/matthieu/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:255 +0x1c5
make: *** [Makefile:107: manifests] Error 2

lekaf974 avatar May 08 '24 01:05 lekaf974

@Monokaix got this issue when I am trying to run the command provided

$ make TAG=latest generate-yaml
mkdir -p _output/bin
mkdir -p _output/release
#go mod vendor
# volcano crd base
/home/matthieu/go/bin/controller-gen "crd:crdVersions=v1,generateEmbeddedObjectMeta=true" paths="./vendor/volcano.sh/apis/pkg/apis/scheduling/v1beta1;./vendor/volcano.sh/apis/pkg/apis/batch/v1alpha1;./vendor/volcano.sh/apis/pkg/apis/bus/v1alpha1;./vendor/volcano.sh/apis/pkg/apis/nodeinfo/v1alpha1" output:crd:artifacts:config=config/crd/volcano/bases
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x9ed52f]

goroutine 55 [running]:
go/types.(*Checker).handleBailout(0xc000242400, 0xc0015c1d40)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/check.go:367 +0x88
panic({0xb9a3a0?, 0x1266ad0?})
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/runtime/panic.go:770 +0x132
go/types.(*StdSizes).Sizeof(0x0, {0xd85068, 0x126f300})
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/sizes.go:228 +0x30f
go/types.(*Config).sizeof(...)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/sizes.go:333
go/types.representableConst.func1({0xd85068?, 0x126f300?})
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/const.go:76 +0x9e
go/types.representableConst({0xd8b4c0, 0x123b460}, 0xc000242400, 0x126f300, 0xc0015c14b0)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/const.go:92 +0x192
go/types.(*Checker).representation(0xc000242400, 0xc0015cc6c0, 0x126f300)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/const.go:256 +0x65
go/types.(*Checker).implicitTypeAndValue(0xc000242400, 0xc0015cc6c0, {0xd85090, 0xc0001fa380})
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/expr.go:375 +0x2d7
go/types.(*Checker).assignment(0xc000242400, 0xc0015cc6c0, {0xd85090, 0xc0001fa380}, {0xc64127, 0x14})
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/assignments.go:52 +0x2e5
go/types.(*Checker).initConst(0xc000242400, 0xc0018c08a0, 0xc0015cc6c0)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/assignments.go:126 +0x2c5
go/types.(*Checker).constDecl(0xc000242400, 0xc0018c08a0, {0xd87d70, 0xc000c06160}, {0xd87d70, 0xc000c06180}, 0x0)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/decl.go:490 +0x311
go/types.(*Checker).objDecl(0xc000242400, {0xd90b40, 0xc0018c08a0}, 0x0)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/decl.go:191 +0xa49
go/types.(*Checker).packageObjects(0xc000242400)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/resolver.go:693 +0x4dd
go/types.(*Checker).checkFiles(0xc000242400, {0xc0005d9e90, 0x5, 0x5})
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/check.go:408 +0x1a5
go/types.(*Checker).Files(...)
	/home/matthieu/go/pkg/mod/golang.org/[email protected]/src/go/types/check.go:372
sigs.k8s.io/controller-tools/pkg/loader.(*loader).typeCheck(0xc000232f30, 0xc0010c9de0)
	/home/matthieu/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/loader.go:283 +0x36a
sigs.k8s.io/controller-tools/pkg/loader.(*Package).NeedTypesInfo(0xc0010c9de0)
	/home/matthieu/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/loader.go:96 +0x39
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check(0xc00062cd50, 0xc0010c9de0)
	/home/matthieu/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:263 +0x2b7
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check.func1(0x64?)
	/home/matthieu/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:257 +0x53
created by sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check in goroutine 16
	/home/matthieu/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:255 +0x1c5
make: *** [Makefile:107: manifests] Error 2

Please use go 1.20: )

Monokaix avatar May 08 '24 01:05 Monokaix

@Monokaix it works, changes pushed

lekaf974 avatar May 08 '24 02:05 lekaf974

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: william-wang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

volcano-sh-bot avatar May 08 '24 07:05 volcano-sh-bot