File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
src/supervisor/watchers/handlers Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -125,10 +125,17 @@ async function isSupportedWorkload(
125125 namespace : string ,
126126 workloadKind : WorkloadKind ,
127127) : Promise < boolean > {
128- if ( workloadKind !== WorkloadKind . DeploymentConfig ) {
129- return true ;
128+ switch ( workloadKind ) {
129+ case WorkloadKind . DeploymentConfig :
130+ return await isDeploymentConfigSupported ( namespace ) ;
131+ default :
132+ return true ;
130133 }
134+ }
131135
136+ async function isDeploymentConfigSupported (
137+ namespace : string ,
138+ ) : Promise < boolean > {
132139 try {
133140 const pretty = undefined ;
134141 const continueToken = undefined ;
@@ -162,7 +169,7 @@ async function isSupportedWorkload(
162169 ) ;
163170 } catch ( error ) {
164171 logger . debug (
165- { error, workloadKind } ,
172+ { error, workloadKind : WorkloadKind . DeploymentConfig } ,
166173 'Failed on Kubernetes API call to list DeploymentConfig' ,
167174 ) ;
168175 return false ;
You can’t perform that action at this time.
0 commit comments