Revision 2fc54dd6dd9edb507cb3111e175071000189b81c authored by Daneyon Hansen on 04 March 2024, 23:58:46 UTC, committed by christarazi on 17 June 2024, 14:16:33 UTC
- `operator/option/config.go`: Adds an option for enabling AWS IPv6 prefix delegation (PD). - `*_test.go`: Updates IPAM implementation unit tests to call `NewNodeManager()` with IPv6 PD config option. - `pkg/ipam/node.go`: Adds `ipv6Alloc` field to `Node` type to represent IPv6-specific allocation node attributes. - `pkg/ipam/node_manager.go`: Adds IPv6 PD field to the `NodeManager` type and associated `NewNodeManager()`. Supports: #30684 Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
1 parent 51ff384
check-logging-subsys-field.sh
#!/usr/bin/env bash
# check-logging-subsys-field.sh checks whether all logging entry instancs
# created from DefaultLogger contain the LogSubsys field. This is required for
# proper labeling of error/warning Prometheus metric and helpful for debugging.
# If any entry which writes any message doesn't contaion the 'subsys' field,
# Prometheus metric logging hook (`pkg/metrics/logging_hook.go`) is going to
# fail.
# Directories:
# - pkg/debugdetection
# - test/
# - vendor/
# - _build/
# are excluded, because instances of DefaultLogger in those modules have their
# specific usage which doesn't break the Prometheus logging hook.
set -eu
if grep -IPRns '(?!.*LogSubsys)log[ ]*= logging\.DefaultLogger.*' \
--exclude-dir={.git,_build,vendor,test,pkg/debugdetection} \
--include=*.go .; then
echo "Logging entry instances have to contain the LogSubsys field. Example of"
echo "properly configured entry instance:"
echo
echo -e "\timport ("
echo -e "\t\t\"github.com/cilium/cilium/pkg/logging\""
echo -e "\t\t\"github.com/cilium/cilium/pkg/logging/logfields\""
echo -e "\t)"
echo
echo -e "\tvar log = logging.DefaultLogger.WithField(logfields.LogSubsys, \"my-subsystem\")"
echo
exit 1
fi
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...