Skip to content

Commit

Permalink
fix: code comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tamirdavid1 committed Dec 30, 2024
1 parent 7b94b17 commit 10a461e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
6 changes: 6 additions & 0 deletions helm/odigos/templates/instrumentor/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,9 @@ rules:
- patch
- update
- watch
- apiGroups:
- odigos.io
resources:
- instrumentationconfigs/status
verbs:
- update
16 changes: 5 additions & 11 deletions instrumentor/runtimemigration/runtimemigration.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ func (m *MigrationRunnable) fetchAndProcessDeployments(ctx context.Context, kube
}

workloadInstrumentationConfigReference := workloadNames[dep.Name]
if workloadInstrumentationConfigReference == nil {
m.Logger.Error(err, "Failed to get InstrumentationConfig reference")
continue
}

// Fetching the latest state of the InstrumentationConfig resource from the Kubernetes API.
// This is necessary to ensure we work with the most up-to-date version of the resource, as it may
Expand Down Expand Up @@ -296,7 +300,7 @@ func handleContainerRuntimeDetailsUpdate(
}
// Skip if the container has already been processed
if containerRuntimeDetails.RuntimeUpdateState != nil {
continue
return nil
}

annotationEnvVarsForContainer := originalWorkloadEnvVar.GetContainerStoredEnvs(containerObject.Name)
Expand Down Expand Up @@ -381,13 +385,3 @@ func isEnvVarPresent(envVars []v1alpha1.EnvVar, envVarName string) bool {
}
return false
}

func removeEnvVar(envVars []v1alpha1.EnvVar, key string) []v1alpha1.EnvVar {
filteredEnvVars := []v1alpha1.EnvVar{}
for _, envVar := range envVars {
if envVar.Name != key {
filteredEnvVars = append(filteredEnvVars, envVar)
}
}
return filteredEnvVars
}

0 comments on commit 10a461e

Please sign in to comment.