-
Notifications
You must be signed in to change notification settings - Fork 152
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
LOG-6532: fix validation rule for Loki Tuning to allow it to be empty without failing validation #2956
base: release-6.1
Are you sure you want to change the base?
Conversation
@vparfonov: This pull request references LOG-6532 which is a valid jira issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
/retest |
api/observability/v1/output_types.go
Outdated
@@ -739,6 +739,7 @@ type LokiTuningSpec struct { | |||
// Compression causes data to be compressed before sending over the network. | |||
// | |||
// +kubebuilder:validation:Enum:=none;gzip;snappy | |||
// +kubebuilder:default=none |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per our larger API discussions, @xperimental has recommended not setting any defaults because of the element of "surprise" when a CR is different from that spec'd by the user once fetched from storage. Doing this means you will do nothing but the return will be set to none.
I believe the only way to resolve this is via an initializer that evaluates and modifies the CLF based upon the type and datamodel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revised code again and think problem was in validation rule, added checking !has(self.tuning.compression)
/hold |
… without failing validation Signed-off-by: Vitalii Parfonov <vparfonov@redhat.com>
/approve |
/test unit |
/test functional-target |
@vparfonov: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
/hold |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jcantrill, vparfonov The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
/cc @cahartma
/assign @jcantrill
/cherry-pick
Links