Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce image size by rm'ing old tf versions #2619

Merged
merged 1 commit into from
Nov 14, 2022
Merged

Conversation

nitrocode
Copy link
Member

@nitrocode nitrocode commented Oct 25, 2022

what

  • Remove 5 old tf versions

why

  • Reduce image size. Each binary is 80MB.
  • This removes all terraform versions prior to 1.x.
  • This will reduce the image size by 400MB.
  • @jamengual and I worked on this and discussed this. Hoping this PR can be a discussion point with a wider audience.

references

@nitrocode nitrocode requested a review from a team as a code owner October 25, 2022 06:19
@@ -17,7 +17,7 @@ ENV DEFAULT_TERRAFORM_VERSION=1.3.3

# In the official Atlantis image we only have the latest of each Terraform version.
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN AVAILABLE_TERRAFORM_VERSIONS="0.11.15 0.12.31 0.13.7 0.14.11 0.15.5 1.0.11 1.1.9 1.2.9 ${DEFAULT_TERRAFORM_VERSION}" && \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is breaking change that we should call out separately.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so we agreed to support only version 1.X to reduce the image size and document the change as a breaking change and announce it in Slack to the community

@chenrui333
Copy link
Member

@nitrocode can we create an issue to track down this removal?

I can see there are some code cleanup opportunities as well

// In version 0.9.* the workspace command was called env.
workspaceCmd := "workspace"
runningZeroPointNine := MustConstraint(">=0.9,<0.10").Check(tfVersion)
if runningZeroPointNine {
workspaceCmd = "env"
}

@jamengual jamengual added quick-win Is obviously something Atlantis should do and will take <4 hrs work docker Pull requests that update Docker code labels Oct 27, 2022
@nitrocode nitrocode merged commit d3623de into main Nov 14, 2022
@nitrocode nitrocode deleted the reduce-image-size branch November 14, 2022 22:33
krrrr38 pushed a commit to krrrr38/atlantis that referenced this pull request Dec 16, 2022
@nitrocode nitrocode added this to the 0.21.0 milestone Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker Pull requests that update Docker code quick-win Is obviously something Atlantis should do and will take <4 hrs work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reduce image size
3 participants