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

Move sparkctl to cmd directory #2347

Merged
merged 3 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,12 @@ override LDFLAGS += \
.PHONY: build-operator
build-operator: ## Build Spark operator.
echo "Building spark-operator binary..."
go build -o $(SPARK_OPERATOR) -ldflags '${LDFLAGS}' cmd/main.go
go build -o $(SPARK_OPERATOR) -ldflags '${LDFLAGS}' cmd/operator/main.go

.PHONY: build-sparkctl
build-sparkctl: ## Build sparkctl binary.
echo "Building sparkctl binary..."
CGO_ENABLED=0 go build -o $(SPARKCTL) -buildvcs=false sparkctl/main.go
CGO_ENABLED=0 go build -o $(SPARKCTL) -buildvcs=false cmd/sparkctl/main.go

.PHONY: install-sparkctl
install-sparkctl: build-sparkctl ## Install sparkctl binary.
Expand All @@ -191,7 +191,7 @@ clean: ## Clean spark-operator and sparktcl binaries.
rm -f $(SPARKCTL)

.PHONY: build-api-docs
build-api-docs: gen-crd-api-reference-docs ## Build api documentaion.
build-api-docs: gen-crd-api-reference-docs ## Build api documentation.
$(GEN_CRD_API_REFERENCE_DOCS) \
-config hack/api-docs/config.json \
-api-dir github.com/kubeflow/spark-operator/api/v1beta2 \
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions cmd/operator/root.go → cmd/operator/app/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package operator
package app

import (
"github.com/spf13/cobra"

"github.com/kubeflow/spark-operator/cmd/operator/controller"
"github.com/kubeflow/spark-operator/cmd/operator/version"
"github.com/kubeflow/spark-operator/cmd/operator/webhook"
"github.com/kubeflow/spark-operator/cmd/operator/app/controller"
"github.com/kubeflow/spark-operator/cmd/operator/app/version"
"github.com/kubeflow/spark-operator/cmd/operator/app/webhook"
)

func NewCommand() *cobra.Command {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions cmd/main.go → cmd/operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import (
"fmt"
"os"

"github.com/kubeflow/spark-operator/cmd/operator"
"github.com/kubeflow/spark-operator/cmd/operator/app"
)

func main() {
if err := operator.NewCommand().Execute(); err != nil {
if err := app.NewCommand().Execute(); err != nil {
ChenYi015 marked this conversation as resolved.
Show resolved Hide resolved
fmt.Fprintf(os.Stderr, "%v\n", err)
os.Exit(1)
}
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion sparkctl/cmd/client.go → cmd/sparkctl/app/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package cmd
package app

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion sparkctl/cmd/create.go → cmd/sparkctl/app/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package cmd
package app

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package cmd
package app

import (
"strings"
Expand Down
2 changes: 1 addition & 1 deletion sparkctl/cmd/delete.go → cmd/sparkctl/app/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package cmd
package app

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion sparkctl/cmd/event.go → cmd/sparkctl/app/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package cmd
package app

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion sparkctl/cmd/forward.go → cmd/sparkctl/app/forward.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package cmd
package app

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion sparkctl/cmd/gcs.go → cmd/sparkctl/app/gcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package cmd
package app

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion sparkctl/cmd/list.go → cmd/sparkctl/app/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package cmd
package app

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion sparkctl/cmd/log.go → cmd/sparkctl/app/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package cmd
package app

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion sparkctl/cmd/root.go → cmd/sparkctl/app/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package cmd
package app

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion sparkctl/cmd/s3.go → cmd/sparkctl/app/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package cmd
package app

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion sparkctl/cmd/status.go → cmd/sparkctl/app/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package cmd
package app

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion sparkctl/cmd/utils.go → cmd/sparkctl/app/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package cmd
package app

import (
"time"
Expand Down
4 changes: 2 additions & 2 deletions sparkctl/main.go → cmd/sparkctl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ package main
import (
_ "k8s.io/client-go/plugin/pkg/client/auth"

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

func main() {
cmd.Execute()
app.Execute()
}
Loading