Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Commit

Permalink
Fix setting LEGO_DISABLE_CNAME_SUPPORT during install
Browse files Browse the repository at this point in the history
Signed-off-by: Darren Shepherd <[email protected]>
  • Loading branch information
ibuildthecloud committed Jul 26, 2023
1 parent 2a65bf3 commit 96e71db
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions pkg/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -640,11 +640,15 @@ func replaceImage(image string, objs []kclient.Object) ([]kclient.Object, error)
containers, _, _ := unstructured.NestedSlice(ustr.Object, "spec", "template", "spec", "containers")
for _, container := range containers {
container.(map[string]any)["image"] = image
container.(map[string]any)["env"] = []interface{}{
map[string]any{
"name": "ACORN_IMAGE",
"value": image,
},
acornImageEnv := map[string]any{
"name": "ACORN_IMAGE",
"value": image,
}
envs := container.(map[string]any)["env"]
if envs == nil {
container.(map[string]any)["env"] = []interface{}{acornImageEnv}
} else {
container.(map[string]any)["env"] = append(envs.([]interface{}), acornImageEnv)
}
if !strings.Contains(image, ":v") {
container.(map[string]any)["imagePullPolicy"] = "Always"
Expand Down

0 comments on commit 96e71db

Please sign in to comment.