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

Write deployment context in init container #2905

Merged

Conversation

kate-osborn
Copy link
Contributor

Write deployment context in init container (#2871)

Problems:

  • When running with N+, the first usage report does not contain the deployment context. The deployment context is needed in order to associate the instance with NGF.
  • When collecting the info for the deployment context, it is possible to fail. In this case we send a report to N1 without the deployment context.
  • The installation ID is the deployment ID, but it should be the Pod ID.

Solutions:

  • When running with N+, write the deployment context to the shared volume mount in the init container.
  • Use the Pod UID instead of the deployment UID as the installation ID
  • Always set the static values of the deployment context in the nginx config. Static values include the integration and installation IDs.

Problems:
* When running with N+, the first usage report does not contain the deployment context.
The deployment context is needed in order to associate the instance with NGF.
* When collecting the info for the deployment context, it is possible to fail.
In this case we send a report to N1 without the deployment context.
* The installation ID is the deployment ID, but it should be the Pod ID.

Solutions:
* When running with N+, write the deployment context to the shared volume mount in the init container.
* Use the Pod UID instead of the deployment UID as the installation ID
* Always set the static values of the deployment context in the nginx config.
Static values include the integration and installation IDs.
@kate-osborn kate-osborn requested a review from a team as a code owner December 13, 2024 18:08
@github-actions github-actions bot added bug Something isn't working helm-chart Relates to helm chart labels Dec 13, 2024
Copy link

codecov bot commented Dec 13, 2024

Codecov Report

Attention: Patch coverage is 60.39604% with 80 lines in your changes missing coverage. Please review.

Project coverage is 89.71%. Comparing base (1ebaa55) to head (64f4214).
Report is 1 commits behind head on release-1.5.

Files with missing lines Patch % Lines
cmd/gateway/commands.go 50.57% 43 Missing ⚠️
internal/mode/static/manager.go 0.00% 19 Missing ⚠️
cmd/gateway/initialize.go 86.66% 4 Missing and 2 partials ⚠️
internal/mode/static/handler.go 50.00% 2 Missing and 2 partials ⚠️
internal/mode/static/nginx/file/os_filemanager.go 0.00% 4 Missing ⚠️
internal/mode/static/nginx/config/generator.go 75.00% 2 Missing and 1 partial ⚠️
cmd/gateway/main.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           release-1.5    #2905      +/-   ##
===============================================
- Coverage        89.86%   89.71%   -0.16%     
===============================================
  Files              107      109       +2     
  Lines            10997    11091      +94     
  Branches            50       50              
===============================================
+ Hits              9883     9950      +67     
- Misses            1054     1082      +28     
+ Partials            60       59       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kate-osborn kate-osborn enabled auto-merge (squash) December 13, 2024 18:12
@kate-osborn kate-osborn merged commit a5e94c2 into nginxinc:release-1.5 Dec 13, 2024
21 of 25 checks passed
@kate-osborn kate-osborn changed the title Cherry-pick N+ deployment context fix to release-1.5 Write deployment context in init container Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working helm-chart Relates to helm chart
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants