Skip to content

Commit

Permalink
Fix typos and format issues
Browse files Browse the repository at this point in the history
Signed-off-by: Yuan Chen <[email protected]>

Remove venv

Signed-off-by: Yuan Chen <[email protected]>

Add venv to gitignore

Signed-off-by: Yuan Chen <[email protected]>
  • Loading branch information
yuanchen8911 committed May 10, 2024
1 parent fa14d63 commit a341442
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/bin
/venv
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Knavigator is a project designed to analyze, optimize, and compare scheduling sy

The term "knavigator" is derived from "navigator," with a silent "k" prefix representing "kubernetes." Much like a navigator, this initiative assists in charting a secure route and steering clear of obstacles within the cluster.

Knavigator interfaces with Kubernetes clusters to manage tasks such as manupulating with Kubernetes objects, evaluating PromQL queries, as well as executing specific operations.
Knavigator interfaces with Kubernetes clusters to manage tasks such as manipulating with Kubernetes objects, evaluating PromQL queries, as well as executing specific operations.

Knavigator can operate both outside and inside a Kubernetes cluster, leveraging the Kubernetes API for task management.

Expand Down
2 changes: 1 addition & 1 deletion pkg/engine/check_object_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (task *CheckObjTask) checkStateAsync(ctx context.Context, name string, info
}
}

// checkState validates state conformance and removes object name from the map if succeded
// checkState validates state conformance and removes object name from the map if succeeded
func (task *CheckObjTask) checkState(ctx context.Context, name string, info *ObjInfo, nameMap *utils.SyncMap) error {
cr, err := task.client.Resource(info.GVR).Namespace(info.Namespace).Get(ctx, name, metav1.GetOptions{})
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions resources/templates/example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ spec:
template:
metadata:
annotations:
orgName: {{or .orgName "my-org" }}
teamName: {{or .teamName "my-team" }}
userName: "{{or .userName "my-user"}}"
orgName: {{or .orgName "my-org"}}
teamName: {{or .teamName "my-team"}}
userName: {{or .userName "my-user"}}
labels:
obj-name: test
instance: {{.instance}}
Expand Down
4 changes: 2 additions & 2 deletions resources/templates/k8s/failed-job.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apiVersion: batch/v1
kind: Job
kind: Job
metadata:
name: "{{._NAME_}}"
namespace: "{{.namespace}}"
spec:
backoffLimit: {{.backoffLimit}}
completions: {{.completions}}
completions: {{.completions}}
parallelism: {{.parallelism}}
completionMode: {{.completionMode}}
template:
Expand Down
4 changes: 2 additions & 2 deletions resources/templates/k8s/job.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apiVersion: batch/v1
kind: Job
kind: Job
metadata:
name: "{{._NAME_}}"
namespace: "{{.namespace}}"
spec:
backoffLimit: {{.backoffLimit}}
completions: {{.completions}}
completions: {{.completions}}
parallelism: {{.parallelism}}
completionMode: {{.completionMode}}
template:
Expand Down
12 changes: 6 additions & 6 deletions resources/templates/k8s/jobset-with-driver.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apiVersion: jobset.x-k8s.io/v1alpha2
kind: JobSet
kind: JobSet
metadata:
name: "{{._NAME_}}"
namespace: "{{.namespace}}"
spec:
# We want to declare our JobSet successful if workers finish.
# If workers finish we should clean up the remaining replicatedJobs.
# We want to declare our JobSet successful if workers finish.
# If workers finish we should clean up the remaining replicatedJobs.
successPolicy:
operator: All
targetReplicatedJobs:
Expand All @@ -16,7 +16,7 @@ spec:
template:
spec:
# Set backoff limit to 0 so job will immediately fail if any pod fails.
backoffLimit: 0
backoffLimit: 0
completions: 1
parallelism: 1
template:
Expand All @@ -25,11 +25,11 @@ spec:
- name: driver
image: {{.image}}
- name: workers
replicas: {{.replicas}}
replicas: {{.replicas}}
template:
spec:
backoffLimit: {{.backoffLimit}}
completions: {{.completions}}
completions: {{.completions}}
parallelism: {{.parallelism}}
completionMode: {{.completionMode}}
template:
Expand Down
10 changes: 5 additions & 5 deletions resources/templates/k8s/jobset.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
apiVersion: jobset.x-k8s.io/v1alpha2
kind: JobSet
kind: JobSet
metadata:
name: "{{._NAME_}}"
namespace: "{{.namespace}}"
spec:
# We want to declare our JobSet successful if workers finish.
# If workers finish we should clean up the remaining replicatedJobs.
# We want to declare our JobSet successful if workers finish.
# If workers finish we should clean up the remaining replicatedJobs.
successPolicy:
operator: All
targetReplicatedJobs:
- workers
replicatedJobs:
- name: workers
replicas: {{.replicas}}
replicas: {{.replicas}}
template:
spec:
backoffLimit: {{.backoffLimit}}
completions: {{.completions}}
completions: {{.completions}}
parallelism: {{.parallelism}}
completionMode: {{.completionMode}}
template:
Expand Down
2 changes: 1 addition & 1 deletion resources/tests/k8s/test-failed-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ tasks:
- id: status
type: CheckPod
params:
refTaskId: job
refTaskId: job
status: Failed
timeout: 10s
2 changes: 1 addition & 1 deletion resources/tests/volcano/test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ tasks:
pods:
range:
pattern: "{{._NAME_}}-test-{{._INDEX_}}"
ranges: ["0-1"]
ranges: ["0-1"]
- id: status
type: CheckPod
params:
Expand Down

0 comments on commit a341442

Please sign in to comment.