Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[YUNIKORN-2092] Remove spark-operator AppManager #711

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -477,18 +477,6 @@ $(RELEASE_BIN_DIR)/$(TEST_SERVER_BINARY): go.mod go.sum pkg
-installsuffix netgo \
./pkg/cmd/webtest/

#Generate the CRD code with code-generator (release-1.14)

# If you want to re-run the code-generator to generate code,
# Please make sure the directory structure must be the example.
# ex: github.com/apache/yunikorn-k8shim
# Also you need to set you GOPATH environmental variables first.
# If GOPATH is empty, we will set it to "$HOME/go".
.PHONY: code_gen
code_gen:
@echo "Generating CRD code"
./scripts/update-codegen.sh

# Run the tests after building
.PHONY: test
test:
Expand Down
3 changes: 0 additions & 3 deletions deployments/scheduler/yunikorn-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "watch", "list", "create", "patch", "update", "delete"]
- apiGroups: ["sparkoperator.k8s.io"]
resources: ["*"]
verbs: ["*"]

---
apiVersion: rbac.authorization.k8s.io/v1
Expand Down
3 changes: 0 additions & 3 deletions pkg/appmgmt/appmgmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (

"github.com/apache/yunikorn-k8shim/pkg/appmgmt/general"
"github.com/apache/yunikorn-k8shim/pkg/appmgmt/interfaces"
"github.com/apache/yunikorn-k8shim/pkg/appmgmt/sparkoperator"
"github.com/apache/yunikorn-k8shim/pkg/client"
"github.com/apache/yunikorn-k8shim/pkg/conf"
"github.com/apache/yunikorn-k8shim/pkg/log"
Expand Down Expand Up @@ -58,8 +57,6 @@ func NewAMService(amProtocol interfaces.ApplicationManagementProtocol,
// registered app plugins
// for general apps
general.NewManager(apiProvider, podEventHandler),
// for spark operator - SparkApplication
sparkoperator.NewManager(amProtocol, apiProvider),
)

return appManager
Expand Down
125 changes: 0 additions & 125 deletions pkg/appmgmt/sparkoperator/spark.go

This file was deleted.

2 changes: 0 additions & 2 deletions pkg/common/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ const DefaultUser = "nobody"

// Spark
const SparkLabelAppID = "spark-app-selector"
const SparkLabelRole = "spark-role"
const SparkLabelRoleDriver = "driver"

// Configuration
const ConfigMapName = "yunikorn-configs"
Expand Down
57 changes: 28 additions & 29 deletions pkg/log/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,41 +53,40 @@ const (

// Defined loggers: when adding new loggers, ids must be sequential, and all must be added to the loggers slice in the same order
var (
Shim = &LoggerHandle{id: 0, name: "shim"}
Kubernetes = &LoggerHandle{id: 1, name: "kubernetes"}
Test = &LoggerHandle{id: 2, name: "test"}
Admission = &LoggerHandle{id: 3, name: "admission"}
AdmissionClient = &LoggerHandle{id: 4, name: "admission.client"}
AdmissionConf = &LoggerHandle{id: 5, name: "admission.conf"}
AdmissionWebhook = &LoggerHandle{id: 6, name: "admission.webhook"}
AdmissionUtils = &LoggerHandle{id: 7, name: "admission.utils"}
ShimAppMgmt = &LoggerHandle{id: 8, name: "shim.appmgmt"}
ShimAppMgmtGeneral = &LoggerHandle{id: 9, name: "shim.appmgmt.general"}
ShimAppMgmtSparkOperator = &LoggerHandle{id: 10, name: "shim.appmgmt.sparkoperator"}
ShimContext = &LoggerHandle{id: 11, name: "shim.context"}
ShimFSM = &LoggerHandle{id: 12, name: "shim.fsm"}
ShimCacheApplication = &LoggerHandle{id: 13, name: "shim.cache.application"}
ShimCacheNode = &LoggerHandle{id: 14, name: "shim.cache.node"}
ShimCacheTask = &LoggerHandle{id: 15, name: "shim.cache.task"}
ShimCacheExternal = &LoggerHandle{id: 16, name: "shim.cache.external"}
ShimCachePlaceholder = &LoggerHandle{id: 17, name: "shim.cache.placeholder"}
ShimRMCallback = &LoggerHandle{id: 18, name: "shim.rmcallback"}
ShimClient = &LoggerHandle{id: 19, name: "shim.client"}
ShimResources = &LoggerHandle{id: 20, name: "shim.resources"}
ShimUtils = &LoggerHandle{id: 21, name: "shim.utils"}
ShimConfig = &LoggerHandle{id: 22, name: "shim.config"}
ShimDispatcher = &LoggerHandle{id: 23, name: "shim.dispatcher"}
ShimScheduler = &LoggerHandle{id: 24, name: "shim.scheduler"}
ShimSchedulerPlugin = &LoggerHandle{id: 25, name: "shim.scheduler.plugin"}
ShimPredicates = &LoggerHandle{id: 26, name: "shim.predicates"}
ShimFramework = &LoggerHandle{id: 27, name: "shim.framework"}
Shim = &LoggerHandle{id: 0, name: "shim"}
Kubernetes = &LoggerHandle{id: 1, name: "kubernetes"}
Test = &LoggerHandle{id: 2, name: "test"}
Admission = &LoggerHandle{id: 3, name: "admission"}
AdmissionClient = &LoggerHandle{id: 4, name: "admission.client"}
AdmissionConf = &LoggerHandle{id: 5, name: "admission.conf"}
AdmissionWebhook = &LoggerHandle{id: 6, name: "admission.webhook"}
AdmissionUtils = &LoggerHandle{id: 7, name: "admission.utils"}
ShimAppMgmt = &LoggerHandle{id: 8, name: "shim.appmgmt"}
ShimAppMgmtGeneral = &LoggerHandle{id: 9, name: "shim.appmgmt.general"}
ShimContext = &LoggerHandle{id: 10, name: "shim.context"}
ShimFSM = &LoggerHandle{id: 11, name: "shim.fsm"}
ShimCacheApplication = &LoggerHandle{id: 12, name: "shim.cache.application"}
ShimCacheNode = &LoggerHandle{id: 13, name: "shim.cache.node"}
ShimCacheTask = &LoggerHandle{id: 14, name: "shim.cache.task"}
ShimCacheExternal = &LoggerHandle{id: 15, name: "shim.cache.external"}
ShimCachePlaceholder = &LoggerHandle{id: 16, name: "shim.cache.placeholder"}
ShimRMCallback = &LoggerHandle{id: 17, name: "shim.rmcallback"}
ShimClient = &LoggerHandle{id: 18, name: "shim.client"}
ShimResources = &LoggerHandle{id: 19, name: "shim.resources"}
ShimUtils = &LoggerHandle{id: 20, name: "shim.utils"}
ShimConfig = &LoggerHandle{id: 21, name: "shim.config"}
ShimDispatcher = &LoggerHandle{id: 22, name: "shim.dispatcher"}
ShimScheduler = &LoggerHandle{id: 23, name: "shim.scheduler"}
ShimSchedulerPlugin = &LoggerHandle{id: 24, name: "shim.scheduler.plugin"}
ShimPredicates = &LoggerHandle{id: 25, name: "shim.predicates"}
ShimFramework = &LoggerHandle{id: 26, name: "shim.framework"}
)

// this tracks all the known logger handles, used to preallocate the real logger instances when configuration changes
var loggers = []*LoggerHandle{
Shim, Kubernetes, Test,
Admission, AdmissionClient, AdmissionConf, AdmissionWebhook, AdmissionUtils,
ShimAppMgmt, ShimAppMgmtGeneral, ShimAppMgmtSparkOperator, ShimContext, ShimFSM,
ShimAppMgmt, ShimAppMgmtGeneral, ShimContext, ShimFSM,
ShimCacheApplication, ShimCacheNode, ShimCacheTask, ShimCacheExternal, ShimCachePlaceholder,
ShimRMCallback, ShimClient, ShimResources, ShimUtils, ShimConfig, ShimDispatcher,
ShimScheduler, ShimSchedulerPlugin, ShimPredicates, ShimFramework,
Expand Down
2 changes: 1 addition & 1 deletion pkg/log/logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestLoggerIds(t *testing.T) {
_ = Log(Test)

// validate logger count
assert.Equal(t, 28, len(loggers), "wrong logger count")
assert.Equal(t, 27, len(loggers), "wrong logger count")

// validate that all loggers are populated and have sequential ids
for i := 0; i < len(loggers); i++ {
Expand Down
121 changes: 0 additions & 121 deletions pkg/sparkclient/clientset/versioned/clientset.go

This file was deleted.

Loading