Skip to content

Commit

Permalink
refactor(api): rename as
Browse files Browse the repository at this point in the history
  • Loading branch information
tunahanertekin committed Mar 5, 2024
1 parent 7bbdb3d commit 4eef564
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkg/api/roboscale.io/v1alpha2/production_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ type ROS2WorkloadSpec struct {
// that can be mounted to the ROS 2 workload.
VolumeClaimTemplates []corev1.PersistentVolumeClaimTemplate `json:"volumeClaimTemplates,omitempty"`
// Configurational parameters for containers that will be encapsulated within the ROS 2 workload StatefulSet.
Containers []LaunchContainer `json:"containers,omitempty"`
LaunchContainers []LaunchContainer `json:"launchContainers,omitempty"`
}

// ROS2WorkloadStatus defines the observed state of ROS2Workload.
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/roboscale.io/v1alpha2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/controllers/v1alpha2/production/ros2_workload/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (r *ROS2WorkloadReconciler) reconcileCheckStatefulSets(ctx context.Context,
return err
} else {
// check if there are any inconsistencies
launchContainer := instance.Spec.Containers[key]
launchContainer := instance.Spec.LaunchContainers[key]
actualContainer := ssQuery.Spec.Template.Spec.Containers[0]

volumeMountsSynced := true
Expand Down
4 changes: 2 additions & 2 deletions pkg/controllers/v1alpha2/production/ros2_workload/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ func (r *ROS2WorkloadReconciler) registerStatefulSets(instance *robotv1alpha2.RO

ssStatuses := []robotv1alpha2.OwnedStatefulSetStatus{}

if len(instance.Spec.Containers) != len(instance.Status.StatefulSetStatuses) {
for key := range instance.Spec.Containers {
if len(instance.Spec.LaunchContainers) != len(instance.Status.StatefulSetStatuses) {
for key := range instance.Spec.LaunchContainers {
ssStatus := robotv1alpha2.OwnedStatefulSetStatus{
Resource: robotv1alpha2.OwnedResourceStatus{
Reference: corev1.ObjectReference{
Expand Down

1 comment on commit 4eef564

@tunahanertekin
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full comment message was "refactor(api): rename .spec.containers as .spec.launchContainers".

Please sign in to comment.