Skip to content

Commit 5a1fc7b

Browse files
Deprecating sparkctl (#2484)
* Added deprecation warning in cmd/sparkctl/main.go Signed-off-by: Vikas Saxena <[email protected]> * added deprecation warning in Makefile Signed-off-by: Vikas Saxena <[email protected]> * added recommendation to use kubectl in Makefile Signed-off-by: Vikas Saxena <[email protected]> * updated readme for sparkctl to show its being deprecated Signed-off-by: Vikas Saxena <[email protected]> * adding deprecated comment as well to main.go Signed-off-by: Vikas Saxena <[email protected]> --------- Signed-off-by: Vikas Saxena <[email protected]>
1 parent 1768eb1 commit 5a1fc7b

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ build-operator: ## Build Spark operator.
177177

178178
.PHONY: build-sparkctl
179179
build-sparkctl: ## Build sparkctl binary.
180+
echo "⚠️ Warning: sparkctl is deprecated and no longer maintained. It will be removed in a future release. Please use kubectl instead."
180181
echo "Building sparkctl binary..."
181182
CGO_ENABLED=0 go build -o $(SPARKCTL) -buildvcs=false cmd/sparkctl/main.go
182183

cmd/sparkctl/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# sparkctl
2+
> ⚠️ **Deprecated:** `sparkctl` is no longer actively maintained and may be removed in a future release.
3+
> We recommend using `kubectl` or other Kubernetes-native tools to manage `SparkApplication` resources.
24
35
`sparkctl` is a command-line tool of the Spark Operator for creating, listing, checking status of, getting logs of, and deleting `SparkApplication`s. It can also do port forwarding from a local port to the Spark web UI port for accessing the Spark web UI on the driver. Each function is implemented as a sub-command of `sparkctl`.
46

cmd/sparkctl/main.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,16 @@ limitations under the License.
1717
package main
1818

1919
import (
20+
"fmt"
21+
"os"
22+
2023
_ "k8s.io/client-go/plugin/pkg/client/auth"
2124

2225
"github.com/kubeflow/spark-operator/cmd/sparkctl/app"
2326
)
2427

28+
// Deprecated: sparkctl is no longer maintained. Use kubectl or other tools instead.
2529
func main() {
30+
fmt.Fprintln(os.Stderr, "⚠️ Warning: sparkctl is deprecated and no longer maintained. Use kubectl instead.")
2631
app.Execute()
2732
}

0 commit comments

Comments
 (0)