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 hash from configmap #32

Merged
merged 1 commit into from
Oct 5, 2024
Merged

feat(main): add hash from configmap #32

merged 1 commit into from
Oct 5, 2024

Conversation

cuisongliu
Copy link
Owner

@cuisongliu cuisongliu commented Oct 5, 2024

This pull request includes several changes to the internal/controller package, focusing on improving the handling of context values, imports, and annotations in Kubernetes resources. The most important changes include adding a new context key type, updating import statements, and modifying annotations in the syncControllerSTS method.

Context Handling Enhancements:

  • Introduced a new ctxKey type to manage context values more effectively in internal/controller/automq_controller.go. ([internal/controller/automq_controller.goR54-R55](https://github.com/cuisongliu/automq-operator/pull/32/files#diff-518ef86c8cca5a146f361950294aa1dfdfd9bfad14b9c8250befa4a56f6f8b9dR54-R55))
  • Added a context value for hash-configmap in the scriptConfigmap method. ([internal/controller/automq_controller.goR236](https://github.com/cuisongliu/automq-operator/pull/32/files#diff-518ef86c8cca5a146f361950294aa1dfdfd9bfad14b9c8250befa4a56f6f8b9dR236))

Import Statement Updates:

  • Updated import statements in internal/controller/automq_controller.go to include time and hash, and removed redundant time import. ([[1]](https://github.com/cuisongliu/automq-operator/pull/32/files#diff-518ef86c8cca5a146f361950294aa1dfdfd9bfad14b9c8250befa4a56f6f8b9dR23-R29), [[2]](https://github.com/cuisongliu/automq-operator/pull/32/files#diff-518ef86c8cca5a146f361950294aa1dfdfd9bfad14b9c8250befa4a56f6f8b9dL40))
  • Updated import statements in internal/controller/automq_controller_c.go to include strconv and strings, and removed redundant imports. ([[1]](https://github.com/cuisongliu/automq-operator/pull/32/files#diff-d245a0c3141d1e204d50f91a2f2453511e1f4a157f48d9df14a0f5452d1415b5R22-R24), [[2]](https://github.com/cuisongliu/automq-operator/pull/32/files#diff-d245a0c3141d1e204d50f91a2f2453511e1f4a157f48d9df14a0f5452d1415b5L33-L34))
  • Added strings import in internal/controller/init_contrainer.go and removed redundant import. ([internal/controller/init_contrainer.goR20-L23](https://github.com/cuisongliu/automq-operator/pull/32/files#diff-58135be650bae09717c90237ebaa393af4377509ef90d671fc42b6937200c7ddR20-L23))

Annotation Modifications:

  • Modified the syncControllerSTS method to include configmap/script-hash annotation and updated Prometheus annotations. ([internal/controller/automq_controller_c.goR302-R317](https://github.com/cuisongliu/automq-operator/pull/32/files#diff-d245a0c3141d1e204d50f91a2f2453511e1f4a157f48d9df14a0f5452d1415b5R302-R317))

@cuisongliu cuisongliu merged commit 14aae4d into main Oct 5, 2024
6 checks passed
@cuisongliu cuisongliu deleted the add-hash branch October 5, 2024 02:46
@github-actions github-actions bot mentioned this pull request Oct 5, 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