Closed
Conversation
Cilium looks if CILIUM_FEATURE_METRICS_WITH_DEFAULTS is set in the local environment to determine if it should include default metric values, which is useful for testing and generating documentation. The was introduced in commit [0] and is not intended to be used in production scenarios. The metrics package also includes host-specific version information, such as Kubernetes and Linux kernel version information. This info should not appear in published documents, and will cuses issues if we want to automatically detect out-of-sync documents in CI. We introduces a similar environment-based mechanism to hide host- specific info such as that noted above. If the new variable CILIUM_FEATURE_METRICS_WITHOUT_HOST_INFO is set in the local env, both the agent and the operator will disable version-specific metrics. The source of these metrics is also updated to only populate them if the metric is enabled. Rationale for a new variable was to avoid overloading of the existing variable, while following the existing precedent for modifying the behaviour of metrics for development purposes. This also means existing test mechanisms are unaffected. [0] 18fcd45 ("pkg/metrics: do not enable all metric defaults") Signed-off-by: Alasdair McWilliam <alasdair.mcwilliam@isovalent.com>
This commit updates existing logic that tests the handling of Kubernetes version in the operator, and also adds the same tests for the Linux kernel version in the agent. Signed-off-by: Alasdair McWilliam <alasdair.mcwilliam@isovalent.com>
Fix the smoke test workflow to fail correctly if feature metric docs are out of sync. This has required the workflow to set the new environment variable CILIUM_FEATURE_METRICS_WITHOUT_HOST_INFO when installing, to avoid CI runner version information being added to the generated documentation that is then used to compare diffs with. Otherwise this will always cause failures. The variable is passed in extraEnv[3] to avoid conflicts with other environment variables passed in actions/set-env-variables. Fixes: eabba03 ("docs: document feature metrics and add rst generator") Signed-off-by: Alasdair McWilliam <alasdair.mcwilliam@isovalent.com>
Re-generate metrics documentation to synchronise with the current metrics expressed by Cilium, which look to have been out of date for a while. Signed-off-by: Alasdair McWilliam <alasdair.mcwilliam@isovalent.com>
d87be48 to
a530ba5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Testing CI only - see #44114