Skip to content

Commit e1fa6ef

Browse files
authored
Update naming and comments (#3)
* Update naming * Update comment for auto-generated files
1 parent 99a3d23 commit e1fa6ef

File tree

16 files changed

+62
-58
lines changed

16 files changed

+62
-58
lines changed

api/v1/dag_types.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
55
)
66

7-
// TaskType은 지원할 Operator 종류를 정의합니다.
7+
// TaskType defines the type of task
88
type TaskType string
99

1010
const (
@@ -13,24 +13,24 @@ const (
1313
TaskTypeGo TaskType = "Go"
1414
)
1515

16-
// TaskSpec은 DAG 내부의 개별 작업 단위입니다.
16+
// TaskSpec defines the task spec
1717
type TaskSpec struct {
1818
Name string `json:"name"`
1919
Type TaskType `json:"type"`
20-
Dependencies []string `json:"dependencies,omitempty"` // 이 Task가 실행되기 위해 완료되어야 할 부모 Task들
20+
Dependencies []string `json:"dependencies,omitempty"` // Parent tasks that must be completed before this task can run
2121

22-
// Operator별 실행 내용
23-
Command string `json:"command,omitempty"` // Bash용
24-
Script string `json:"script,omitempty"` // Python/Go 코드 본문
25-
Image string `json:"image,omitempty"` // 커스텀 이미지 사용 시
22+
// Execution details for each task type
23+
Command string `json:"command,omitempty"` // For Bash tasks
24+
Script string `json:"script,omitempty"` // For Python/Go code
25+
Image string `json:"image,omitempty"` // Custom container image if needed
2626
}
2727

28-
// DagSpec은 사용자가 정의하는 DAG의 전체 명세입니다.
28+
// DagSpec defines the complete specification of a DAG as defined by the user.
2929
type DagSpec struct {
3030
Tasks []TaskSpec `json:"tasks"`
3131
}
3232

33-
// TaskStatus는 개별 Task의 현재 상태입니다.
33+
// TaskState represents the current state of an individual task.
3434
type TaskState string
3535

3636
const (
@@ -47,9 +47,9 @@ type TaskStatus struct {
4747
Message string `json:"message,omitempty"`
4848
}
4949

50-
// DagStatus는 DAG 전체의 상태입니다.
50+
// DagStatus represents the overall status of the entire DAG.
5151
type DagStatus struct {
52-
State TaskState `json:"state"` // DAG 전체 상태 (Running, Completed...)
52+
State TaskState `json:"state"` // Overall DAG state (Running, Completed, etc.)
5353
TaskStatuses []TaskStatus `json:"taskStatuses,omitempty"`
5454
}
5555

api/v1/zz_generated.deepcopy.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/dag-cli/main.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,14 @@ import (
99
)
1010

1111
func main() {
12-
// 플래그 설정
1312
configPath := flag.String("config", "config.yaml", "Path to the configuration file")
1413
outputDir := flag.String("out", "dist", "Directory to save generated JSON files")
1514
flag.Parse()
1615

17-
fmt.Println("🚀 Starting Pequod DAG Compiler...")
16+
fmt.Println("🚀 Starting Nautikus DAG Compiler...")
1817
fmt.Printf(" - Config: %s\n", *configPath)
1918
fmt.Printf(" - Output: %s\n", *outputDir)
2019

21-
// 컴파일 로직 실행
2220
if err := compiler.CompileDags(*configPath, *outputDir); err != nil {
2321
fmt.Printf("❌ Compilation failed: %v\n", err)
2422
os.Exit(1)

cmd/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ func main() {
160160
WebhookServer: webhookServer,
161161
HealthProbeBindAddress: probeAddr,
162162
LeaderElection: enableLeaderElection,
163-
LeaderElectionID: "0403ed10.pequod.io",
163+
LeaderElectionID: "0403ed10.nautikus.io",
164164
// LeaderElectionReleaseOnCancel defines if the leader should step down voluntarily
165165
// when the Manager ends. This requires the binary to immediately end when the
166166
// Manager is stopped, otherwise, this setting is unsafe. Setting this significantly

config/crd/bases/workflow.nautikus.io_dags.yaml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# This file is auto-generated by kubebuilder's controller-gen tool.
2+
# DO NOT EDIT manually - changes will be overwritten when 'make manifests' is run.
3+
# To modify the CRD, update api/v1/dag_types.go and run 'make manifests'.
14
---
25
apiVersion: apiextensions.k8s.io/v1
36
kind: CustomResourceDefinition
@@ -37,14 +40,15 @@ spec:
3740
metadata:
3841
type: object
3942
spec:
40-
description: DagSpec은 사용자가 정의하는 DAG의 전체 명세입니다.
43+
description: DagSpec defines the complete specification of a DAG as defined
44+
by the user.
4145
properties:
4246
tasks:
4347
items:
44-
description: TaskSpec은 DAG 내부의 개별 작업 단위입니다.
48+
description: TaskSpec defines the task spec
4549
properties:
4650
command:
47-
description: Operator별 실행 내용
51+
description: Execution details for each task type
4852
type: string
4953
dependencies:
5054
items:
@@ -57,7 +61,7 @@ spec:
5761
script:
5862
type: string
5963
type:
60-
description: TaskType은 지원할 Operator 종류를 정의합니다.
64+
description: TaskType defines the type of task
6165
type: string
6266
required:
6367
- name
@@ -68,10 +72,11 @@ spec:
6872
- tasks
6973
type: object
7074
status:
71-
description: DagStatus는 DAG 전체의 상태입니다.
75+
description: DagStatus represents the overall status of the entire DAG.
7276
properties:
7377
state:
74-
description: TaskStatus는 개별 Task의 현재 상태입니다.
78+
description: TaskState represents the current state of an individual
79+
task.
7580
type: string
7681
taskStatuses:
7782
items:
@@ -83,7 +88,8 @@ spec:
8388
podName:
8489
type: string
8590
state:
86-
description: TaskStatus는 개별 Task의 현재 상태입니다.
91+
description: TaskState represents the current state of an individual
92+
task.
8793
type: string
8894
required:
8995
- name

config/rbac/dag_editor_role.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
# This rule is not used by the project pequod itself.
1+
# This rule is not used by the project nautikus itself.
22
# It is provided to allow the cluster admin to help manage permissions for users.
33
#
4-
# Grants permissions to create, update, and delete resources within the workflow.pequod.io.
4+
# Grants permissions to create, update, and delete resources within the workflow.nautikus.io.
55
# This role is intended for users who need to manage these resources
66
# but should not control RBAC or manage permissions for others.
77

88
apiVersion: rbac.authorization.k8s.io/v1
99
kind: ClusterRole
1010
metadata:
1111
labels:
12-
app.kubernetes.io/name: pequod
12+
app.kubernetes.io/name: nautikus
1313
app.kubernetes.io/managed-by: kustomize
1414
name: dag-editor-role
1515
rules:
1616
- apiGroups:
17-
- workflow.pequod.io
17+
- workflow.nautikus.io
1818
resources:
1919
- dags
2020
verbs:
@@ -26,7 +26,7 @@ rules:
2626
- update
2727
- watch
2828
- apiGroups:
29-
- workflow.pequod.io
29+
- workflow.nautikus.io
3030
resources:
3131
- dags/status
3232
verbs:

config/rbac/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ resources:
2020
- metrics_reader_role.yaml
2121
# For each CRD, "Admin", "Editor" and "Viewer" roles are scaffolded by
2222
# default, aiding admins in cluster management. Those roles are
23-
# not used by the pequod itself. You can comment the following lines
23+
# not used by the nautikus itself. You can comment the following lines
2424
# if you do not want those helpers be installed with your Project.
2525
- dag_admin_role.yaml
2626
- dag_editor_role.yaml

config/rbac/leader_election_role.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1
33
kind: Role
44
metadata:
55
labels:
6-
app.kubernetes.io/name: pequod
6+
app.kubernetes.io/name: nautikus
77
app.kubernetes.io/managed-by: kustomize
88
name: leader-election-role
99
rules:

config/rbac/role.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
# This file is auto-generated by kubebuilder's controller-gen tool.
2+
# DO NOT EDIT manually - changes will be overwritten when 'make manifests' is run.
3+
# To modify RBAC rules, update controller code with +kubebuilder:rbac markers and run 'make manifests'.
14
apiVersion: rbac.authorization.k8s.io/v1
25
kind: ClusterRole
36
metadata:
47
labels:
5-
app.kubernetes.io/name: pequod
8+
app.kubernetes.io/name: nautikus
69
app.kubernetes.io/managed-by: kustomize
710
name: manager-role
811
rules:
@@ -19,7 +22,7 @@ rules:
1922
- patch
2023
- delete
2124
- apiGroups:
22-
- workflow.pequod.io
25+
- workflow.nautikus.io
2326
resources:
2427
- dags
2528
verbs:
@@ -31,15 +34,15 @@ rules:
3134
- patch
3235
- delete
3336
- apiGroups:
34-
- workflow.pequod.io
37+
- workflow.nautikus.io
3538
resources:
3639
- dags/status
3740
verbs:
3841
- get
3942
- update
4043
- patch
4144
- apiGroups:
42-
- workflow.pequod.io
45+
- workflow.nautikus.io
4346
resources:
4447
- dags/finalizers
4548
verbs:

config/samples/workflow_v1_dag_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ spec:
66
tasks:
77
- name: hello-task
88
type: Bash
9-
command: "echo 'Hello from Pequod!'"
9+
command: "echo 'Hello from Nautikus!'"

0 commit comments

Comments
 (0)