Skip to content

Commit 3308f68

Browse files
authored
chore(controller-sdk-go): pts add node selector and ps add status field
1 parent f3fdd9e commit 3308f68

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

api/ps.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ type ContainerState struct {
6666
LastState map[string]map[string]interface{} `json:"lastState"`
6767
Ready bool `json:"ready"`
6868
RestartCount int `json:"restartCount"`
69+
Status string `json:"status"`
70+
Reason string `json:"reason"`
71+
Message string `json:"message"`
6972
}
7073

7174
// PodState defines a collection of container state.

api/pts.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ type PtypeState struct {
2828
ReadinessProbe Healthcheck `json:"readiness_probe,omitempty"`
2929
Limits map[string]string `json:"limits,omitempty"`
3030
VolumeMounts []VolumeMount `json:"volume_mounts,omitempty"`
31+
NodeSelector map[string]string `json:"node_selector,omitempty"`
3132
}
3233

3334
type VolumeMount struct {

pts/pts_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ const ptypeStateFixture string = `
5858
"mountPath": "/data",
5959
"name": "myvolume"
6060
}
61-
]
61+
],
62+
"node_selector": ["kubernetes.io/os=linux"]
6263
}]
6364
}`
6465

@@ -199,6 +200,7 @@ func TestDescribe(t *testing.T) {
199200
MountPath: "/data",
200201
},
201202
},
203+
NodeSelector: []string{"kubernetes.io/os=linux"},
202204
},
203205
}
204206
if !reflect.DeepEqual(actual, expected) {

0 commit comments

Comments
 (0)