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

fix(search-indexer): Disable global auth on dev and staging #16443

Merged
merged 3 commits into from
Oct 17, 2024

Conversation

RunarVestmann
Copy link
Member

@RunarVestmann RunarVestmann commented Oct 17, 2024

Disable global auth on dev and staging

Why

  • Contentful webhooks no longer reach our service, meaning that content doesn't get updated

Summary by CodeRabbit

  • New Features

    • Updated ingress configurations for dev and staging environments to disable global authentication, improving access management.
    • Expanded migration scripts in the search-indexer service for enhanced resource management.
  • Bug Fixes

    • Addressed issues with empty annotations in ingress configurations for specified environments.
    • Updated health check readiness paths for improved service reliability.

@RunarVestmann RunarVestmann requested a review from a team as a code owner October 17, 2024 10:30
Copy link
Contributor

coderabbitai bot commented Oct 17, 2024

Walkthrough

The changes in this pull request focus on the search-indexer-service.ts file, specifically updating the ingress configuration for the dev and staging environments. The extraAnnotations property now includes an annotation that disables global authentication for NGINX ingress, replacing previously empty objects. Additionally, the initContainer section has been expanded to include migration scripts with specified resource limits, and health check paths have been updated for several services.

Changes

File Path Change Summary
apps/services/search-indexer/infra/search-indexer-service.ts - Added annotations to extraAnnotations for dev and staging environments to disable global authentication for NGINX ingress.
- Expanded initContainer with migration scripts and resource limits.
- Updated health check readiness paths for user-notification, user-notification-worker, and web services.
- Changed database user to services_sessions_read in services-sessions.

Possibly related PRs

  • chore(dsl): Remove global auth annotations #16433: This PR is related as it also modifies the ingress configuration for the search-indexer-service, specifically addressing the removal of the annotation for global authentication, which aligns with the changes made in the main PR regarding ingress annotations.

Suggested reviewers

  • busla

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between abaea83 and d9b3bb2.

📒 Files selected for processing (2)
  • charts/islandis/values.dev.yaml (1 hunks)
  • charts/islandis/values.staging.yaml (1 hunks)
🧰 Additional context used
🔇 Additional comments (3)
charts/islandis/values.staging.yaml (2)

1728-1728: Approval: Disabling global authentication for search-indexer-service ingress

This change adds the nginx.ingress.kubernetes.io/enable-global-auth: 'false' annotation to the search-indexer-service ingress configuration. This modification aligns with the PR's objective to disable global authentication for development and staging environments.

By disabling global authentication for this specific ingress, Contentful webhooks should now be able to reach the service without authentication issues. This addresses the problem mentioned in the PR description where content updates were not being processed due to webhook accessibility problems.

While this change solves the immediate issue, it's important to note that disabling authentication may have security implications. Ensure that this configuration is only applied to non-production environments and that appropriate security measures are in place to protect the service from unauthorized access.


Line range hint 1-1728: No other relevant changes found

I've reviewed the rest of the file, and there are no other apparent changes related to the PR objectives or the issue described. The single modification to disable global authentication for the search-indexer-service ingress appears to be the primary change addressing the Contentful webhook issue.

Also applies to: 1729-3686

charts/islandis/values.dev.yaml (1)

1990-1990: LGTM: Global authentication disabled for search-indexer-service ingress

The addition of nginx.ingress.kubernetes.io/enable-global-auth: 'false' to the ingress annotations effectively disables global authentication for the search-indexer-service in the development environment. This change aligns with the PR objective to disable global authentication for development and staging environments, which should allow Contentful webhooks to reach the service.

While disabling authentication can have security implications, it's important to note that this is intentional for non-production environments to facilitate easier testing and development.

To ensure this change is consistent across environments, let's check if similar changes have been made in the staging configuration:

✅ Verification successful

Verified: Global authentication disabled for search-indexer-service ingress across environments

The annotation nginx.ingress.kubernetes.io/enable-global-auth: 'false' is correctly applied in both development and staging configurations, ensuring consistent behavior across these environments. This aligns with the intention to disable global authentication for non-production environments to facilitate testing and development.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if the same annotation is present in the staging configuration
grep -n "nginx.ingress.kubernetes.io/enable-global-auth: 'false'" charts/islandis/values.staging.yaml

Length of output: 178


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@RunarVestmann RunarVestmann added the automerge Merge this PR as soon as all checks pass label Oct 17, 2024
Copy link

codecov bot commented Oct 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36.75%. Comparing base (18b87eb) to head (001e18a).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #16443   +/-   ##
=======================================
  Coverage   36.75%   36.75%           
=======================================
  Files        6835     6835           
  Lines      141318   141318           
  Branches    40237    40237           
=======================================
  Hits        51936    51936           
  Misses      89382    89382           
Flag Coverage Δ
air-discount-scheme-web 0.00% <ø> (ø)
api 3.37% <ø> (ø)
application-api-files 56.81% <ø> (ø)
application-core 71.64% <ø> (+0.32%) ⬆️
application-system-api 41.37% <ø> (ø)
application-template-api-modules 27.84% <ø> (-0.02%) ⬇️
application-templates-accident-notification 29.27% <ø> (ø)
application-templates-car-recycling 3.12% <ø> (ø)
application-templates-criminal-record 26.34% <ø> (ø)
application-templates-driving-license 18.32% <ø> (ø)
application-templates-estate 12.32% <ø> (ø)
application-templates-example-payment 25.14% <ø> (ø)
application-templates-financial-aid 15.50% <ø> (ø)
application-templates-general-petition 23.44% <ø> (ø)
application-templates-inheritance-report 6.49% <ø> (ø)
application-templates-marriage-conditions 15.17% <ø> (ø)
application-templates-mortgage-certificate 43.82% <ø> (ø)
application-templates-parental-leave 29.96% <ø> (+0.12%) ⬆️
application-types 6.63% <ø> (ø)
application-ui-components 1.28% <ø> (ø)
application-ui-shell 21.37% <ø> (ø)
clients-charge-fjs-v2 24.11% <ø> (ø)
financial-aid-backend 56.37% <ø> (ø)
financial-aid-shared 18.94% <ø> (ø)
services-auth-personal-representative 45.15% <ø> (ø)
shared-components 27.65% <ø> (ø)
shared-form-fields 31.59% <ø> (ø)
web 1.82% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 18b87eb...001e18a. Read the comment docs.

@datadog-island-is
Copy link

Datadog Report

All test runs 40250e5 🔗

27 Total Test Services: 0 Failed, 25 Passed
⬆️ Test Sessions change in coverage: 3 increased, 108 no change

Test Services
This report shows up to 10 services
Service Name Failed Known Flaky New Flaky Passed Skipped Total Time Code Coverage Change Test Service View
air-discount-scheme-web 0 0 0 2 0 8.85s 1 no change Link
api 0 0 0 4 0 2.71s 1 no change Link
application-api-files 0 0 0 12 0 5.84s 1 no change Link
application-core 0 0 0 92 0 18.58s 1 increased (+0.2%) Link
application-system-api 0 0 0 120 2 3m 21.78s 1 increased (+0.01%) Link
application-template-api-modules 0 0 0 123 0 2m 23.31s 1 no change Link
application-templates-accident-notification 0 0 0 148 0 18.95s 1 no change Link
application-templates-criminal-record 0 0 0 2 0 11.31s 1 no change Link
application-templates-driving-license 0 0 0 13 0 16.57s 1 no change Link
application-templates-example-payment 0 0 0 2 0 12.13s 1 no change Link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge this PR as soon as all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants