Skip to content

Commit

Permalink
fix(api): the server could not find the requested resource (kubernete…
Browse files Browse the repository at this point in the history
  • Loading branch information
刘琪 committed Nov 1, 2024
1 parent 41611ad commit 008c68a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/api/pkg/resource/deployment/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,10 @@ func DeployAppFromFile(cfg *rest.Config, spec *AppDeploymentFromFileSpec) (bool,
namespace = data.GetNamespace()
}

if namespace == "" {
namespace = "default"
}

if resource.Namespaced {
_, err = dynamicClient.Resource(groupVersionResource).Namespace(namespace).Create(context.TODO(), data, metaV1.CreateOptions{})
} else {
Expand Down

0 comments on commit 008c68a

Please sign in to comment.