-
Notifications
You must be signed in to change notification settings - Fork 69
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
Users can fill in regular expressions in the parameter #215
Conversation
pkg/apis/v2beta2/common.go
Outdated
// merge patch. | ||
// +optional | ||
Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"` | ||
RegexValue string `json:"regexValues,omitempty" protobuf:"bytes,3,rep,name=regexValues"` |
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.
regexValues => regexValue
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.
regexValues => regexValue
Yes, should be regexValue
"github.com/go-kit/kit/log" | ||
"github.com/go-kit/kit/log/level" | ||
"github.com/kubesphere/notification-manager/pkg/apis/v2beta2" |
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.
Can we change like this to avoid prefix a API call with a version number @wenchajun @wanjunlei :
nm "github.com/kubesphere/notification-manager/pkg/apis/v2beta2"
or
nmv2beta2 "github.com/kubesphere/notification-manager/pkg/apis/v2beta2"
I prefer the first because we'll needn't change anything when there is a version change.
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.
The versions of the api are divided into v1beta1
and v2beta2
, wouldn't it be confusing to use nm
instead of v2beta2
?
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.
Merge this for now
pkg/apis/v2beta2/common.go
Outdated
LabelSelectorOpMatch LabelSelectorOperator = "Match" | ||
) | ||
|
||
func (ls *LabelSelector) Match(label map[string]string) (bool, error) { |
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.
Should we change Match to Matches to keep consistent with metav1? @wenchajun @wanjunlei
d9e1798
to
6571a33
Compare
Signed-off-by: dehaocheng <[email protected]>
Users can fill in regular expressions in the parameters to perform regular matching