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

removed init container for Postgres DB pod #1317

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

dannyzaken
Copy link
Member

@dannyzaken dannyzaken commented Mar 10, 2024

Explain the changes

  • The init container was used to workaround an issue with hugepages which seems to be solved (see Disable huge_pages in Postgres config #661).
  • After removing it, there is no need for a privileged container in Postgres DB scc

Issues: Fixed #xxx / Gap #xxx

Testing Instructions:

  1. See testing instructions here
  • Doc added/updated
  • Tests added

@dannyzaken dannyzaken marked this pull request as draft March 10, 2024 09:02
@dannyzaken dannyzaken requested a review from jackyalbo March 10, 2024 13:47
@dannyzaken dannyzaken marked this pull request as ready for review March 10, 2024 13:47
- name: db
mountPath: /var/lib/pgsql
- name: noobaa-postgres-initdb-sh-volume
mountPath: /init
containers:
Copy link
Contributor

@jackyalbo jackyalbo Mar 10, 2024

Choose a reason for hiding this comment

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

Removing all the init containers will result in this code failing as it expects init_containers[0] to exist:

upgradeContainer := podSpec.InitContainers[0]

@dannyzaken dannyzaken force-pushed the danny-fixes branch 2 times, most recently from 76c01ce to 6ab46ba Compare March 17, 2024 07:42
@dannyzaken dannyzaken marked this pull request as draft March 17, 2024 07:42
@dannyzaken
Copy link
Member Author

Converted back to draft. Still have some work to do with respect to DB upgrades

@dannyzaken dannyzaken force-pushed the danny-fixes branch 2 times, most recently from bb8bb50 to 5feb1dc Compare March 19, 2024 16:34
@dannyzaken dannyzaken force-pushed the danny-fixes branch 3 times, most recently from 9869af0 to 48504c0 Compare April 3, 2024 12:58
@dannyzaken dannyzaken marked this pull request as ready for review April 3, 2024 14:32
@dannyzaken dannyzaken requested a review from jackyalbo April 3, 2024 14:32
* The init container was used to workaround an issue with hugepages which seems to be solved.
* After removing it, there is no need for privileged container and for DB scc

Signed-off-by: Danny Zaken <[email protected]>
Copy link
Contributor

@liranmauda liranmauda left a comment

Choose a reason for hiding this comment

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

LGTM

@dannyzaken dannyzaken merged commit 3cf9fff into noobaa:master Apr 4, 2024
14 checks passed
},
)
// remove the init conatainer. It was used to workaround a hugepages issue, which was resolved in Postgres
podSpec.InitContainers = nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants