@@ -140,47 +140,51 @@ func printProcessTypes(d *DryccCmd, appID string, ptypes api.Ptypes) {
140140func printProcessTypeDetail (d * DryccCmd , ptypeStates api.PtypeStates , events api.AppEvents ) {
141141 // table process type
142142 tpt := d .getDefaultFormatTable ([]string {})
143- for _ , containerState := range ptypeStates {
144- // tpt.Append([]string{"Container: " + containerState.Container})
145- // tpt.Append([]string{"Image: " + containerState.Image})
146- tpt .Append ([]string {"Container:" , containerState .Container })
147- tpt .Append ([]string {"Image:" , containerState .Image })
148- if len (containerState .Command ) != 0 {
143+ for _ , ptypeState := range ptypeStates {
144+ tpt .Append ([]string {"Container:" , ptypeState .Container })
145+ tpt .Append ([]string {"Image:" , ptypeState .Image })
146+ if len (ptypeState .Command ) != 0 {
149147 tpt .Append ([]string {"Command:" })
150- for _ , command := range containerState .Command {
148+ for _ , command := range ptypeState .Command {
151149 tpt .Append ([]string {"" , fmt .Sprintf ("- %v" , command )})
152150 }
153151 }
154- if len (containerState .Args ) != 0 {
152+ if len (ptypeState .Args ) != 0 {
155153 tpt .Append ([]string {"Args:" })
156- for _ , arg := range containerState .Args {
154+ for _ , arg := range ptypeState .Args {
157155 tpt .Append ([]string {"" , fmt .Sprintf ("- %v" , arg )})
158156 }
159157 }
160- if containerState .Limits != nil {
158+ if len ( ptypeState .Limits ) != 0 {
161159 tpt .Append ([]string {"Limits:" })
162- for r , q := range containerState .Limits {
160+ for r , q := range ptypeState .Limits {
163161 tpt .Append ([]string {"" , fmt .Sprintf ("%s %s" , r , q )})
164162 }
165163 }
166- if len (containerState .VolumeMounts ) != 0 {
164+ if len (ptypeState .VolumeMounts ) != 0 {
167165 tpt .Append ([]string {"Mounts:" })
168- for _ , mount := range containerState .VolumeMounts {
166+ for _ , mount := range ptypeState .VolumeMounts {
169167 tpt .Append ([]string {"" , fmt .Sprintf ("%s from %s" , mount .MountPath , mount .Name )})
170168 }
171169 }
172- sp := getHealthcheckString ("" , "" , & containerState .StartupProbe )
170+ sp := getHealthcheckString ("" , "" , & ptypeState .StartupProbe )
173171 if sp != "" {
174172 tpt .Append ([]string {"Startup:" , strings .TrimSpace (sp )})
175173 }
176- lp := getHealthcheckString ("" , "" , & containerState .LivenessProbe )
174+ lp := getHealthcheckString ("" , "" , & ptypeState .LivenessProbe )
177175 if lp != "" {
178176 tpt .Append ([]string {"Liveness:" , strings .TrimSpace (lp )})
179177 }
180- rp := getHealthcheckString ("" , "" , & containerState .ReadinessProbe )
178+ rp := getHealthcheckString ("" , "" , & ptypeState .ReadinessProbe )
181179 if rp != "" {
182180 tpt .Append ([]string {"Readiness:" , strings .TrimSpace (rp )})
183181 }
182+ if len (ptypeState .NodeSelector ) != 0 {
183+ tpt .Append ([]string {"Node-Selectors:" })
184+ for k , v := range ptypeState .NodeSelector {
185+ tpt .Append ([]string {"" , fmt .Sprintf ("%s=%s" , k , v )})
186+ }
187+ }
184188
185189 }
186190 tpt .Render ()
0 commit comments