Skip to content

Commit

Permalink
update tinynode api add module_version to the spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Maksym Trofimenko committed Jan 5, 2025
1 parent 173d919 commit cc09011
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 3 deletions.
1 change: 1 addition & 0 deletions api-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ _Appears in:_
| Field | Description |
| --- | --- |
| `module` _string_ | Module name - container image repo + tag |
| `module_version` _string_ | Module version semver v2 compatible (without v prefix) |
| `component` _string_ | Component name within a module |
| `ports` _[TinyNodePortConfig](#tinynodeportconfig) array_ | Port configurations |
| `edges` _[TinyNodeEdge](#tinynodeedge) array_ | Edges to send message next |
Expand Down
5 changes: 5 additions & 0 deletions api/v1alpha1/tinynode_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ type TinyNodeSpec struct {
// +kubebuilder:validation:Required
Module string `json:"module"`

// Module version semver v2 compatible (without v prefix)
// +kubebuilder:validation:Required
// +kubebuilder:default="1.0.0"
ModuleVersion string `json:"module_version"`

// Component name within a module
// +kubebuilder:validation:Required
Component string `json:"component"`
Expand Down
2 changes: 1 addition & 1 deletion charts/tinysystems-crd/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.23
version: 0.1.24
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
Expand Down
5 changes: 5 additions & 0 deletions charts/tinysystems-crd/templates/tinynode-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ spec:
module:
description: Module name - container image repo + tag
type: string
module_version:
default: '''1.0.0'''
description: Module version semver v2 compatible (without v prefix)
type: string
ports:
description: Port configurations
items:
Expand All @@ -96,6 +100,7 @@ spec:
required:
- component
- module
- module_version
type: object
status:
description: TinyNodeStatus defines the observed state of TinyNode
Expand Down
5 changes: 5 additions & 0 deletions config/crd/bases/operator.tinysystems.io_tinynodes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ spec:
module:
description: Module name - container image repo + tag
type: string
module_version:
default: 1.0.0
description: Module version semver v2 compatible (without v prefix)
type: string
ports:
description: Port configurations
items:
Expand All @@ -95,6 +99,7 @@ spec:
required:
- component
- module
- module_version
type: object
status:
description: TinyNodeStatus defines the observed state of TinyNode
Expand Down
2 changes: 0 additions & 2 deletions internal/scheduler/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ type Scheduler interface {
HandleInternal(ctx context.Context, msg *runner.Msg) error
//Destroy stops the instance and deletes it
Destroy(name string) error
//Start starts scheduler
Start(ctx context.Context) error
}

type Schedule struct {
Expand Down

0 comments on commit cc09011

Please sign in to comment.