File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
src/main/java/cd/go/contrib/elasticagent Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,11 @@ public void refreshAll(PluginSettings properties) {
162
162
}
163
163
}
164
164
165
+ if (list == null ) {
166
+ LOG .info ("Did not find any running kubernetes pods." );
167
+ return ;
168
+ }
169
+
165
170
instances .clear ();
166
171
for (Pod pod : list .getItems ()) {
167
172
Map <String , String > podLabels = pod .getMetadata ().getLabels ();
Original file line number Diff line number Diff line change @@ -126,9 +126,10 @@ private void refreshInstancesForAllClusters(List<ClusterProfileProperties> listO
126
126
private AgentInstances <KubernetesInstance > getAgentInstancesFor (ClusterProfileProperties clusterProfileProperties ) throws Exception {
127
127
KubernetesAgentInstances agentInstances = clusterSpecificAgentInstances .get (clusterProfileProperties .uuid ());
128
128
129
- //initalize agent instances if those are null
129
+ //initialize agent instances if those are null
130
130
if (agentInstances == null ) {
131
131
refreshInstancesForCluster (clusterProfileProperties );
132
+ agentInstances = clusterSpecificAgentInstances .get (clusterProfileProperties .uuid ());
132
133
}
133
134
134
135
return agentInstances ;
You can’t perform that action at this time.
0 commit comments