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 gateway usage #4264

Merged
merged 5 commits into from
Nov 21, 2023
Merged

Update gateway usage #4264

merged 5 commits into from
Nov 21, 2023

Conversation

zzjin
Copy link
Collaborator

@zzjin zzjin commented Nov 6, 2023

  1. Update NGINX ingress annotations.
  2. Remove usage references to APISIX.
  3. Add higress anntations.

🤖 Generated by Copilot at 523a9f5

Summary

🚫🚀🐛

Removed APISIX support from the Adminer and Terminal controllers and their related resources. Simplified the ingress configuration and code for these controllers and the registry service. Updated the documentation and CRDs accordingly.

Sing, O Muse, of the mighty pull request
That purged the apisix option from the code
And made the nginx ingress controller reign
Over the Adminer and Terminal modes

Walkthrough

  • Remove support for APISIX ingress controller and use only NGINX ingress controller for adminer and terminal services (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)
  • Add support for higress annotations to control the response headers for security purposes in the createNginxIngress function in controllers/db/adminer/controllers/ingress.go (link, link, link)
  • Change the path field from /()(.*) to / in the ingress.yaml sections in docs/4.0/docs/quick-start/app-deployments/use-terminal.md and docs/4.0/i18n/zh-Hans/quick-start/app-deployments/use-terminal.md to fix a redirection issue with the terminal service (link, link)
  • Remove the rewrite-target annotation from the ingress.yaml files in controllers/db/adminer/controllers/ingress.go, controllers/terminal/controllers/ingress.go, and deploy/registry/manifests/ingress.yaml, as it is not needed for the adminer, terminal, and registry services ( link, link)
  • Remove the configuration-snippet and AuthType constants from the ingress.go files in controllers/db/adminer/controllers/ingress.go and controllers/terminal/controllers/ingress.go, as they are not used by the adminer and terminal controllers (link, link, link, link)
  • Remove the time package import from the ingress.go files in controllers/db/adminer/controllers/ingress.go and controllers/terminal/controllers/ingress.go, as it is no longer needed (link, link)
  • Change the defaultNginxConfigurationSnippet to use fmt.Sprintf instead of string concatenation in controllers/db/adminer/controllers/ingress.go for readability and maintainability (link)
  • Move the constants for the response headers and the default configuration domain to the top of the ingress.go file in controllers/db/adminer/controllers/ingress.go (link)

@sealos-ci-robot
Copy link
Member

sealos-ci-robot commented Nov 6, 2023

🤖 Generated by lychee action

Summary

Status Count
🔍 Total 993
✅ Successful 321
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 671
❓ Unknown 0
🚫 Errors 0

Full action output

Full Github Actions output

Copy link

sweep-ai bot commented Nov 6, 2023

Apply Sweep Rules to your PR?

  • Apply: All new business logic should have corresponding unit tests.
  • Apply: Refactor large functions to be more modular.

Copy link

codecov bot commented Nov 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fc0c3f6) 65.45% compared to head (523a9f5) 65.45%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4264   +/-   ##
=======================================
  Coverage   65.45%   65.45%           
=======================================
  Files           8        8           
  Lines         660      660           
=======================================
  Hits          432      432           
  Misses        180      180           
  Partials       48       48           

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

@sealos-ci-robot
Copy link
Member

sealos-ci-robot commented Nov 8, 2023

📘 Preview documentation website

👀 Visit Preview

Copy link

Whoa! Easy there, Partner!

This PR is too big. Please break it up into smaller PRs.

1. Update NGINX ingress annotations.
2. Remove usage references to APISIX.

Signed-off-by: zzjin <tczzjin@gmail.com>
Moved from ingress gateway annotation to backend server decide.

Signed-off-by: zzjin <tczzjin@gmail.com>
Signed-off-by: zzjin <tczzjin@gmail.com>
Remove static-cdn image.
Remove adminer zalando support.

Signed-off-by: zzjin <tczzjin@gmail.com>
Signed-off-by: zzjin <tczzjin@gmail.com>
@zzjin zzjin marked this pull request as ready for review November 16, 2023 14:50
@lingdie
Copy link
Collaborator

lingdie commented Nov 17, 2023

applaunchpad等ingress变了,sealos cloud部署脚本中是不是需要使用higress作为网关? 有影响吗?

@sealos-ci-robot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Applaunchpad and other ingress have changed. Is it necessary to use higress as the gateway in the sealos cloud deployment script? Is there any impact?

@zzjin
Copy link
Collaborator Author

zzjin commented Nov 17, 2023

applaunchpad等ingress变了,sealos cloud部署脚本中是不是需要使用higress作为网关? 有影响吗?

不需要改应用代码,安装 higress的时候会改写参数,让 higress 监听所有 class=nginx 的资源,但是需要 run 一下 higress 的集群镜像(todo)

@sealos-ci-robot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Ingress such as applaunchpad has changed. Is it necessary to use higress as the gateway in the sealos cloud deployment script? Is there any impact?

No, when installing higress, the parameters will be rewritten to allow higress to monitor all resources with class=nginx

@zzjin zzjin merged commit 9095a2e into labring:main Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants