1
- package common
1
+ package component
2
2
3
3
import (
4
4
"context"
8
8
"github.com/devfile/library/v2/pkg/devfile/parser"
9
9
"k8s.io/klog"
10
10
11
- "github.com/redhat-developer/odo/pkg/component"
12
11
envcontext "github.com/redhat-developer/odo/pkg/config/context"
13
12
"github.com/redhat-developer/odo/pkg/configAutomount"
14
13
"github.com/redhat-developer/odo/pkg/devfile/image"
@@ -94,7 +93,7 @@ func (a *runHandler) ApplyKubernetes(kubernetes devfilev1.Component, kind v1alph
94
93
}
95
94
switch platform := a .platformClient .(type ) {
96
95
case kclient.ClientInterface :
97
- return component . ApplyKubernetes (mode , appName , componentName , a .devfile , kubernetes , platform , a .path )
96
+ return ApplyKubernetes (mode , appName , componentName , a .devfile , kubernetes , platform , a .path )
98
97
default :
99
98
klog .V (4 ).Info ("apply kubernetes commands are not implemented on podman" )
100
99
log .Warningf ("Apply Kubernetes components are not supported on Podman. Skipping: %v." , kubernetes .Name )
@@ -113,7 +112,7 @@ func (a *runHandler) ApplyOpenShift(openshift devfilev1.Component, kind v1alpha2
113
112
}
114
113
switch platform := a .platformClient .(type ) {
115
114
case kclient.ClientInterface :
116
- return component . ApplyKubernetes (mode , appName , componentName , a .devfile , openshift , platform , a .path )
115
+ return ApplyKubernetes (mode , appName , componentName , a .devfile , openshift , platform , a .path )
117
116
default :
118
117
klog .V (4 ).Info ("apply OpenShift commands are not implemented on podman" )
119
118
log .Warningf ("Apply OpenShift components are not supported on Podman. Skipping: %v." , openshift .Name )
@@ -127,11 +126,11 @@ func (a *runHandler) ExecuteNonTerminatingCommand(ctx context.Context, command d
127
126
appName = odocontext .GetApplication (a .ctx )
128
127
)
129
128
if isContainerRunning (command .Exec .Component , a .containersRunning ) {
130
- return component . ExecuteRunCommand (ctx , a .execClient , a .platformClient , command , a .ComponentExists , a .podName , appName , componentName )
129
+ return ExecuteRunCommand (ctx , a .execClient , a .platformClient , command , a .ComponentExists , a .podName , appName , componentName )
131
130
}
132
131
switch platform := a .platformClient .(type ) {
133
132
case kclient.ClientInterface :
134
- return component . ExecuteInNewContainer (ctx , platform , a .configAutomountClient , a .devfile , componentName , appName , command )
133
+ return ExecuteInNewContainer (ctx , platform , a .configAutomountClient , a .devfile , componentName , appName , command )
135
134
default :
136
135
klog .V (4 ).Info ("executing a command in a new container is not implemented on podman" )
137
136
log .Warningf ("executing a command in a new container is not implemented on podman. Skipping: %v." , command .Id )
@@ -145,11 +144,11 @@ func (a *runHandler) ExecuteTerminatingCommand(ctx context.Context, command devf
145
144
appName = odocontext .GetApplication (a .ctx )
146
145
)
147
146
if isContainerRunning (command .Exec .Component , a .containersRunning ) {
148
- return component . ExecuteTerminatingCommand (ctx , a .execClient , a .platformClient , command , a .ComponentExists , a .podName , appName , componentName , a .msg , false )
147
+ return ExecuteTerminatingCommand (ctx , a .execClient , a .platformClient , command , a .ComponentExists , a .podName , appName , componentName , a .msg , false )
149
148
}
150
149
switch platform := a .platformClient .(type ) {
151
150
case kclient.ClientInterface :
152
- return component . ExecuteInNewContainer (ctx , platform , a .configAutomountClient , a .devfile , componentName , appName , command )
151
+ return ExecuteInNewContainer (ctx , platform , a .configAutomountClient , a .devfile , componentName , appName , command )
153
152
default :
154
153
klog .V (4 ).Info ("executing a command in a new container is not implemented on podman" )
155
154
log .Warningf ("executing a command in a new container is not implemented on podman. Skipping: %v." , command .Id )
0 commit comments