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

feat(main): add broker config #36

Merged
merged 1 commit into from
Oct 13, 2024
Merged

feat(main): add broker config #36

merged 1 commit into from
Oct 13, 2024

Conversation

cuisongliu
Copy link
Owner

@cuisongliu cuisongliu commented Oct 13, 2024

This pull request introduces several changes to enhance the configuration and functionality of the AutoMQ operator. The key changes include adding a new NodePort field, integrating a new API endpoint to fetch node IPs, and updating the Kafka monitor script to use the new API endpoint.

Configuration Enhancements:

  • api/v1beta1/automq_types.go: Added a new NodePort field to the AutoMQSpec struct. ([api/v1beta1/automq_types.goR160-R161](https://github.com/cuisongliu/automq-operator/pull/36/files#diff-8fb9499d797e9e6073eb594990a409c444112ce192f26acc4cb88e16bbc8c537R160-R161))
  • config/crd/bases/infra.cuisongliu.github.com_automqs.yaml: Updated the CRD to include the new NodePort field. ([config/crd/bases/infra.cuisongliu.github.com_automqs.yamlR600-R603](https://github.com/cuisongliu/automq-operator/pull/36/files#diff-e3ffe2350b5eeb12838983f35561eb4882fe76f83687a6f0781f7f64b230f21fR600-R603))

API Integration:

  • cmd/main.go:
    • Imported necessary packages for the new API endpoint. ([cmd/main.goR21-R31](https://github.com/cuisongliu/automq-operator/pull/36/files#diff-c444f711e9191b53952edb65bfd8c644419fc7695c62611dc0fb304b4fb197d6R21-R31))
    • Added environment variable checks and set up a new API endpoint using Gin to fetch node IPs. ([cmd/main.goR117-R159](https://github.com/cuisongliu/automq-operator/pull/36/files#diff-c444f711e9191b53952edb65bfd8c644419fc7695c62611dc0fb304b4fb197d6R117-R159))
    • Modified the manager start function to use the new context. ([cmd/main.goL126-R170](https://github.com/cuisongliu/automq-operator/pull/36/files#diff-c444f711e9191b53952edb65bfd8c644419fc7695c62611dc0fb304b4fb197d6L126-R170))

Script Updates:

  • defaults/up.sh: Updated the kafka_monitor_ip function to use the new API endpoint to retrieve node IPs and set the advertised.listeners property accordingly. ([defaults/up.shL189-R208](https://github.com/cuisongliu/automq-operator/pull/36/files#diff-347cf2881e546936a79b979408aa53592a1abc1d110cabd2ac6ddde58232e4d8L189-R208))

@cuisongliu cuisongliu force-pushed the add_broker branch 6 times, most recently from 082214e to 8ecaf97 Compare October 13, 2024 15:06
Signed-off-by: cuisongliu <cuisongliu@qq.com>
@cuisongliu cuisongliu merged commit 3d2eec9 into main Oct 13, 2024
6 checks passed
@cuisongliu cuisongliu deleted the add_broker branch October 13, 2024 15:18
@github-actions github-actions bot mentioned this pull request Oct 13, 2024
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.

1 participant