Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
ci: build minimal and standard images #135
ci: build minimal and standard images #135
Changes from 12 commits
e62a482
4e18e34
d5dc966
086b72f
2d4ec1e
691d11a
fbdf23d
1a26b91
c1b1b8d
5d04db7
328537f
260e7b6
110929c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the debian package postinst script, both the postgres user and the postgres group are created without hardcoding an ID.
https://salsa.debian.org/postgresql/postgresql-common/-/blob/22bf910531252c373a38175904a12f74ce820e86/debian/postgresql-common.postinst#L31-39
i just tried installing postgres-17 on an empty bookworm-slim container and I got:
i'm not entirely sure the reasoning for specifically choosing
26
instead of100
for cnpg? it doesn't seem like a good coding practice at all to assume a user will have a specific UIDregardless, if we need to lock the UID in cnpg, should we also be ensuring that the GID is always
102
(or explicitly setting it to some other value)?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Historical reasons, 26 has been in use for a lot of things and it was the id long time ago, changing that now will affect a lot of people and is just a UID, in many system is even replaced.
The UID needs to be known for permissions and fs rules and security context, etc.
If we start changing to something else, then Debian may change the rule (as they already did) and we will have to change it again? in my opinion, changing will bring more problems than keep it them. If debian change the default we will have to change again and system already running with the permissions on the old UID may have issues when triggering an update of the image to the new one with a different UID
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense ~ thx for explaining
no historical GID right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Historically, it has also been GID=26, but this doesn't matter during the image build. The operator works well even if the GID is not present in the image as long as the GID doesn't change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
over in #132 (comment) I asked if it makes sense to move pg-failover-slots to the minimal image; I'm not sure where the other discussion will go but thought I'd flag it here just as FYI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The minimal needs to be minimal in my opinion, just postgres without anything else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @sxd. The goal of
minimal
is to provide just PostgreSQL and allow us to start working on the extension container images project, which will take years to complete.I would move the existing extensions to standard. After all, as you pointed out, producing images with the new process will be much easier. I expect many image customisations to happen in the future.