+ private void changeNameOverrideUnderServiceAccount(Map<String, Object> valuesYamlKv, ChartInfo chartInfo) {
+ if(valuesYamlKv.containsKey("serviceAccount")){
+ Map<String,Object> serviceAccount = (Map<String, Object>) valuesYamlKv.get("serviceAccount");
+ if(serviceAccount.containsKey("nameOverride")){
+ serviceAccount.put("nameOverride", chartInfo.getMetadata().getName());
+ }
+ }
+ else{
+ log.warn("No serviceAccount section found in the values.yaml file. Skipping nameOverride substitution.");
+ }
+ }
+