SeldonIO / seldon-operator

Seldon Core Operator for Kubernetes
Apache License 2.0
12 stars 10 forks source link

#114 - Seldon Operator enabled for operatorhub #2

Closed axsaucedo closed 5 years ago

axsaucedo commented 5 years ago

This PR is currently in progress. The objective is to modify the existing repository for it to be compatible with the OperatorHub platform. The current changes include:

This currently requires a CSV (custom service version) YAML file (not .csv) with specific rules. There may be current requirements to ensure all the attributes are included. When the scorecard CLI is run we get an error. The CLI command is: operator-sdk scorecard --cr-manifest config/crds/machinelearning_v1alpha2_seldondeployment.json --csv-path ./seldonoperator.0.1.2.clusterserviceversion.yaml

The error is the following:

donoperator.v1alpha2.clusterserviceversion.yaml
WARN[0000] Could not load config file; using flags
Running for cr: config/crds/machinelearning_v1alpha2_seldondeployment.yaml
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0x1820aac]

goroutine 1 [running]:
github.com/operator-framework/operator-sdk/vendor/k8s.io/apimachinery/pkg/apis/meta/v1.(*ObjectMeta).GetNamespace(...)
        ~/go/src/github.com/operator-framework/operator-sdk/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go:131
github.com/operator-framework/operator-sdk/internal/pkg/scorecard.getProxyLogs(0x0, 0x0, 0x0, 0x0, 0x0)
        ~/go/src/github.com/operator-framework/operator-sdk/internal/pkg/scorecard/resource_handler.go:374 +0x1bc
github.com/operator-framework/operator-sdk/internal/pkg/scorecard.(*WritingIntoCRsHasEffectTest).Run(0xc000878370, 0x209a6c0, 0xc0000560d0, 0x1)
        ~/go/src/github.com/operator-framework/operator-sdk/internal/pkg/scorecard/basic_tests.go:144 +0x82
github.com/operator-framework/operator-sdk/internal/pkg/scorecard.(*TestSuite).Run(0xc00063c5b0, 0x209a6c0, 0xc0000560d0)
        ~/go/src/github.com/operator-framework/operator-sdk/internal/pkg/scorecard/test_definitions.go:102 +0x95
github.com/operator-framework/operator-sdk/internal/pkg/scorecard.runTests(0x0, 0x0, 0x0, 0x0, 0x0)
        ~/go/src/github.com/operator-framework/operator-sdk/internal/pkg/scorecard/scorecard.go:291 +0x2d0b
github.com/operator-framework/operator-sdk/internal/pkg/scorecard.ScorecardTests(0xc0003eb680, 0xc0004b4b00, 0x0, 0x4, 0x0, 0x0)
        ~/go/src/github.com/operator-framework/operator-sdk/internal/pkg/scorecard/scorecard.go:382 +0x8a
github.com/operator-framework/operator-sdk/vendor/github.com/spf13/cobra.(*Command).execute(0xc0003eb680, 0xc0004b4ac0, 0x4, 0x4, 0xc0003eb680, 0xc0004b4ac0)
        ~/go/src/github.com/operator-framework/operator-sdk/vendor/github.com/spf13/cobra/command.go:762 +0x465
github.com/operator-framework/operator-sdk/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc0000fcc80, 0x2053500, 0xc0003ca200, 0x0)
        ~/go/src/github.com/operator-framework/operator-sdk/vendor/github.com/spf13/cobra/command.go:852 +0x2ec
github.com/operator-framework/operator-sdk/vendor/github.com/spf13/cobra.(*Command).Execute(...)
        ~/go/src/github.com/operator-framework/operator-sdk/vendor/github.com/spf13/cobra/command.go:800
main.main()
        ~/go/src/github.com/operator-framework/operator-sdk/cmd/operator-sdk/main.go:80 +0x4ce
axsaucedo commented 5 years ago

The issue referenced is https://github.com/SeldonIO/seldon-core/issues/114

axsaucedo commented 5 years ago

Added commit addressing @cliveseldon requests including:

As mentioned, there is a PR submitted to the OperatorHub community operators repo, which contains the files required to be added to the communtiy hub. The PR can be found here https://github.com/operator-framework/community-operators/pull/395