feat(main): add hash from configmap #32
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 thesyncControllerSTS
method.Context Handling Enhancements:
ctxKey
type to manage context values more effectively ininternal/controller/automq_controller.go
. ([internal/controller/automq_controller.goR54-R55](https://github.com/cuisongliu/automq-operator/pull/32/files#diff-518ef86c8cca5a146f361950294aa1dfdfd9bfad14b9c8250befa4a56f6f8b9dR54-R55)
)hash-configmap
in thescriptConfigmap
method. ([internal/controller/automq_controller.goR236](https://github.com/cuisongliu/automq-operator/pull/32/files#diff-518ef86c8cca5a146f361950294aa1dfdfd9bfad14b9c8250befa4a56f6f8b9dR236)
)Import Statement Updates:
internal/controller/automq_controller.go
to includetime
andhash
, and removed redundanttime
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)
)internal/controller/automq_controller_c.go
to includestrconv
andstrings
, 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)
)strings
import ininternal/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:
syncControllerSTS
method to includeconfigmap/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)
)