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

Remove rootless images from build process #558

Merged

Conversation

tjons
Copy link
Contributor

@tjons tjons commented Jun 11, 2024

Resolves open-policy-agent/opa#6810 by removing rootless images from the Makefile, and thus, from the build/release process for opa-envoy-plugin.

@charlieegan3
Copy link
Contributor

Hey Tyler, thanks for picking this one up!

I think the first thing we need to do is to set the user arg to non root: https://github.com/open-policy-agent/opa-envoy-plugin/blob/main/Dockerfile#L13C1-L13C11, similar to this: https://github.com/open-policy-agent/opa/blob/b463d30028d927a00bf0143d6fbf0533bf5d6783/Dockerfile#L15

Then we can get a release out and share that that the default user has been updated to non-root.

Either in the same release, or in a follow on release, we can do as you have here, where we drop the rootless tags. We've made a big noise about the end of rootless images in the past for opa, but it might be good to do a final reminder in the next release for opa-envoy too.

@ashutosh-narkar might be able to provide some metrics on the image pulls for the rootless tags. Also Ash, let me know if you think that plan above sounds ok, and if you think we can do the user change and the dropping of the tags in the same release.

@charlieegan3
Copy link
Contributor

$ docker image inspect openpolicyagent/opa:latest-envoy-static | jq .[0].Config.User
"0"

😞

@tjons tjons force-pushed the tjons/6810-remove-rootless-images branch from 5424666 to 5575da5 Compare June 13, 2024 19:38
@tjons
Copy link
Contributor Author

tjons commented Jun 13, 2024

@charlieegan3 thanks for the pointer about the default user, I missed that part! Would you like me to restore the rootless build targets for that last release? If there are no users I'm not sure that it's necessary but I like the thought you put into this.

@charlieegan3
Copy link
Contributor

Hey, I think that the best course of action is to drop rootless tag at the same time as making the default image use a non-root user.

The rationale here being that we've already spent a lot of time letting users know that rootless images are discontinued and that they are not to be used. Making this change now in opa-envoy will be 'just' updating opa-envoy to be the same as OPA.

Do you think that makes sense too?

Copy link
Contributor

@charlieegan3 charlieegan3 left a comment

Choose a reason for hiding this comment

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

Thanks for the work here @tjons 👏

charlieegan3 added a commit to charlieegan3/opa-envoy-plugin that referenced this pull request Jun 25, 2024
@charlieegan3
Copy link
Contributor

When merging, we should rebase and merge #560 too.

Copy link
Member

@anderseknert anderseknert left a comment

Choose a reason for hiding this comment

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

LGTM!

@charlieegan3 charlieegan3 merged commit 2cd5f2b into open-policy-agent:main Jun 25, 2024
8 checks passed
charlieegan3 added a commit to charlieegan3/opa-envoy-plugin that referenced this pull request Jun 25, 2024
charlieegan3 added a commit that referenced this pull request Jun 25, 2024
Merge after
#558

Follows open-policy-agent/opa#6830

Signed-off-by: Charlie Egan <[email protected]>
Co-authored-by: Charlie Egan <[email protected]>
@tjons tjons deleted the tjons/6810-remove-rootless-images branch June 25, 2024 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cease pushing of opa-envoy rootless images
3 participants