Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rizul2108 committed Dec 23, 2023
1 parent f62d8ea commit 2e1b1cb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 22 deletions.
1 change: 0 additions & 1 deletion cliHelpers/chalDeployerService/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package chalDeployerService

import (
"context"
"fmt"
"log"
"os"
"strconv"
Expand Down
2 changes: 1 addition & 1 deletion katana-services
Submodule katana-services updated 37 files
+6 −0 wireguard/.dockerignore
+20 −0 wireguard/.editorconfig
+17 −0 wireguard/.gitattributes
+44 −0 wireguard/.gitignore
+56 −0 wireguard/Dockerfile
+56 −0 wireguard/Dockerfile.aarch64
+674 −0 wireguard/LICENSE
+4 −0 wireguard/README.md
+214 −0 wireguard/package_versions.txt
+22 −0 wireguard/root/app/show-peer
+5 −0 wireguard/root/defaults/Corefile
+0 −0 wireguard/root/defaults/firewall.conf
+11 −0 wireguard/root/defaults/peer.conf
+7 −0 wireguard/root/defaults/server.conf
+0 −0 wireguard/root/etc/s6-overlay/s6-rc.d/init-config-end/dependencies.d/init-wireguard-confs
+0 −0 wireguard/root/etc/s6-overlay/s6-rc.d/init-wireguard-confs/dependencies.d/init-wireguard-module
+204 −0 wireguard/root/etc/s6-overlay/s6-rc.d/init-wireguard-confs/run
+1 −0 wireguard/root/etc/s6-overlay/s6-rc.d/init-wireguard-confs/type
+1 −0 wireguard/root/etc/s6-overlay/s6-rc.d/init-wireguard-confs/up
+0 −0 wireguard/root/etc/s6-overlay/s6-rc.d/init-wireguard-module/dependencies.d/init-config
+18 −0 wireguard/root/etc/s6-overlay/s6-rc.d/init-wireguard-module/run
+1 −0 wireguard/root/etc/s6-overlay/s6-rc.d/init-wireguard-module/type
+1 −0 wireguard/root/etc/s6-overlay/s6-rc.d/init-wireguard-module/up
+0 −0 wireguard/root/etc/s6-overlay/s6-rc.d/svc-coredns/dependencies.d/init-services
+1 −0 wireguard/root/etc/s6-overlay/s6-rc.d/svc-coredns/notification-fd
+23 −0 wireguard/root/etc/s6-overlay/s6-rc.d/svc-coredns/run
+1 −0 wireguard/root/etc/s6-overlay/s6-rc.d/svc-coredns/type
+0 −0 wireguard/root/etc/s6-overlay/s6-rc.d/svc-wireguard/dependencies.d/svc-coredns
+1 −0 wireguard/root/etc/s6-overlay/s6-rc.d/svc-wireguard/down
+4 −0 wireguard/root/etc/s6-overlay/s6-rc.d/svc-wireguard/finish
+4 −0 wireguard/root/etc/s6-overlay/s6-rc.d/svc-wireguard/run
+1 −0 wireguard/root/etc/s6-overlay/s6-rc.d/svc-wireguard/type
+1 −0 wireguard/root/etc/s6-overlay/s6-rc.d/svc-wireguard/up
+0 −0 wireguard/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-wireguard-confs
+0 −0 wireguard/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-wireguard-module
+0 −0 wireguard/root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-coredns
+0 −0 wireguard/root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-wireguard
23 changes: 4 additions & 19 deletions services/infrasetservice/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,23 +123,7 @@ func CreateTeams(c *fiber.Ctx) error {
errDir := os.Mkdir("teams", 0755)
if errDir != nil {
log.Fatal(err)
return err
}
}

// Create a directory named teams in the current directory
if _, err := os.Stat("teams"); os.IsNotExist(err) {
errDir := os.Mkdir("teams", 0755)
if errDir != nil {
log.Fatal(err)
}
}

// Create a directory named teams in the current directory
if _, err := os.Stat("teams"); os.IsNotExist(err) {
errDir := os.Mkdir("teams", 0755)
if errDir != nil {
log.Fatal(err)
return err
}
}

Expand Down Expand Up @@ -170,7 +154,9 @@ func CreateTeams(c *fiber.Ctx) error {
_, err = client.CoreV1().Namespaces().Create(c.Context(), nsName, metav1.CreateOptions{})
if err != nil {
log.Fatal(err)
return err
if(err.Error() != "namespaces \""+namespace+"\" already exists in the cluster"){
return err
}
}
manifest := &bytes.Buffer{}
tmpl, err := template.ParseFiles(filepath.Join(configs.ClusterConfig.TemplatedManifestDir, "runtime", "teams.yml"))
Expand All @@ -183,7 +169,6 @@ func CreateTeams(c *fiber.Ctx) error {
return err
}


deploymentConfig := utils.DeploymentConfig()

deploymentConfig.SSHPassword = pwd
Expand Down
2 changes: 1 addition & 1 deletion services/master/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func Server() error {
admin.Get("/createTeams", infraSetService.CreateTeams)
admin.Post("/challengeUpdate", challengeDeployerService.ChallengeUpdate)
admin.Get("/deploy", challengeDeployerService.Deploy)
admin.Post("/deployChallenge", challengeDeployerService.Deploy)
admin.Post("/deployChallenge", challengeDeployerService.DeployChallenge)
admin.Get("/gitServer", infraSetService.GitServer)
admin.Get("/deleteChallenge/:chall_name", challengeDeployerService.DeleteChallenge)
log.Printf("Listening on %s:%d\n", cfg.APIConfig.Host, cfg.APIConfig.Port)
Expand Down

0 comments on commit 2e1b1cb

Please sign in to comment.