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

Update egress network policy of some charts #116

Merged
merged 2 commits into from
May 1, 2024
Merged

Update egress network policy of some charts #116

merged 2 commits into from
May 1, 2024

Conversation

mpgxvii
Copy link
Member

@mpgxvii mpgxvii commented Feb 26, 2024

Description of the change

  • An error occurs when the network policy pod selector host name is > 63 characters, this will truncate that value
  • Truncate postgres podselector so that it is within 63 character limit (update MP, appserver, upload-backend, and rest-sources-backend network policy egress)

Benefits

Possible drawbacks

Applicable issues

  • fixes #

Additional information

Checklist

  • Chart version bumped in Chart.yaml according to semver.
  • Variables are documented in the README.md
  • Title of the PR starts with chart name (e.g. [<name_of_the_chart>])

- Truncate postgres podselector so that it is within 63 character limit
Copy link

github-actions bot commented Feb 26, 2024

Great PR! Please pay attention to the following items before merging:

Files matching charts/*/values.yaml:

  • Is the PR adding a new container? Please reviewer, add it to the models (internal process)
  • Is the PR adding a new parameter? Please, ensure it’s documented in the README.md

This is an automatically generated QA checklist based on modified files.

@mpgxvii
Copy link
Member Author

mpgxvii commented Feb 26, 2024

@yatharthranjan @keyvaann This issue comes up because we are using AWS RDS so the hostname is greater than 63 characters. But I think this egress is only applicable if the postgres is hosted in the cluster? This solution is truncating that host name. Is this fine? Or is it better to check if postgres is installed instead? I feel that manually replacing the network policies would be too much duplication for each chart (for example if we replace this in production.yaml).

@mpgxvii mpgxvii requested a review from baixiac February 28, 2024 11:41
Copy link
Member

@baixiac baixiac left a comment

Choose a reason for hiding this comment

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

Is k8s permitting the use of a trailing wildcard following the truncated to match the entire value?

@keyvaann
Copy link
Collaborator

keyvaann commented May 1, 2024

Thanks @mpgxvii!
Yes truncating the host names is fine in order to prevent Kuberentes from complaining and this egress is indeed only applicable when the postgres is hosted on the cluster. It probably won't be needed to check if the Postgres is installed or not.
Do you know if the RDS address on the AWS is a private IP address or a public one?

@keyvaann
Copy link
Collaborator

keyvaann commented May 1, 2024

Is k8s permitting the use of a trailing wildcard following the truncated to match the entire value?

I don't think so, especially when we're using matchLabels to select the pods.

@mpgxvii
Copy link
Member Author

mpgxvii commented May 1, 2024

Thanks @mpgxvii! Yes truncating the host names is fine in order to prevent Kuberentes from complaining and this egress is indeed only applicable when the postgres is hosted on the cluster. It probably won't be needed to check if the Postgres is installed or not. Do you know if the RDS address on the AWS is a private IP address or a public one?

@keyvaann Oh ok I see. Thanks! Yes it is private for our installation.

@mpgxvii mpgxvii requested a review from keyvaann May 1, 2024 09:56
@keyvaann
Copy link
Collaborator

keyvaann commented May 1, 2024

Thanks @mpgxvii! Yes truncating the host names is fine in order to prevent Kuberentes from complaining and this egress is indeed only applicable when the postgres is hosted on the cluster. It probably won't be needed to check if the Postgres is installed or not. Do you know if the RDS address on the AWS is a private IP address or a public one?

@keyvaann Oh ok I see. Thanks! Yes it is private for our installation.

In that case we might need to remove the section that blocks the connection to local network. Would you be able to test if it works on your installation?

Copy link
Collaborator

@keyvaann keyvaann left a comment

Choose a reason for hiding this comment

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

LGTM

@mpgxvii
Copy link
Member Author

mpgxvii commented May 1, 2024

In that case we might need to remove the section that blocks the connection to local network. Would you be able to test if it works on your installation?

Oh ok I see. Yeah it seems to be working without removing the block.

@keyvaann
Copy link
Collaborator

keyvaann commented May 1, 2024

In that case we might need to remove the section that blocks the connection to local network. Would you be able to test if it works on your installation?

Oh ok I see. Yeah it seems to be working without removing the block.

That's good. I'll try to investigate this at some point.

@mpgxvii mpgxvii merged commit 5059389 into main May 1, 2024
4 checks passed
@mpgxvii mpgxvii deleted the update-mp branch May 1, 2024 12:55
@mpgxvii mpgxvii restored the update-mp branch May 15, 2024 20:25
@Bdegraaf1234 Bdegraaf1234 deleted the update-mp branch July 8, 2024 10:34
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.

3 participants