Skip to content

Commit

Permalink
fix: make private
Browse files Browse the repository at this point in the history
  • Loading branch information
etrikp committed Feb 24, 2024
1 parent 8ff4eef commit 703fb69
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions pkg/processor/pod/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,8 @@ import (
const imagePullPolicyTemplate = "{{ .Values.%[1]s.%[2]s.imagePullPolicy }}"
const envValue = "{{ quote .Values.%[1]s.%[2]s.%[3]s.%[4]s }}"

func CalculateBaseIndent(resourceType string) int {
switch resourceType {
case "CronJob", "Job":
return 4 // Adjusting for the deeper nesting within a JobTemplate
default:
return 0 // Regular Template
}
}

func ProcessSpec(objName string, appMeta helmify.AppMetadata, spec corev1.PodSpec, kind string) (map[string]interface{}, helmify.Values, error) {
baseIndent := CalculateBaseIndent(kind)
baseIndent := calculateBaseIndent(kind)

values, err := processPodSpec(objName, appMeta, &spec)
if err != nil {
Expand Down Expand Up @@ -108,6 +99,15 @@ func processNestedContainers(specMap map[string]interface{}, objName string, val
return specMap, values, nil
}

func calculateBaseIndent(resourceType string) int {
switch resourceType {
case "CronJob", "Job":
return 4 // Adjusting for the deeper nesting within a JobTemplate
default:
return 0 // Regular Template
}
}

func processContainers(objName string, values helmify.Values, containerType string, containers []interface{}, baseIndent int) ([]interface{}, helmify.Values, error) {
for i := range containers {
containerName := strcase.ToLowerCamel((containers[i].(map[string]interface{})["name"]).(string))
Expand Down

0 comments on commit 703fb69

Please sign in to comment.