Skip to content
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

Merged
merged 1 commit into from
Aug 17, 2023

Conversation

wenchajun
Copy link
Member

Users can fill in regular expressions in the parameters to perform regular matching

// 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"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

regexValues => regexValue

Copy link
Member

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"
Copy link
Member

@benjaminhuo benjaminhuo Aug 17, 2023

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.

Copy link
Member Author

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge this for now

LabelSelectorOpMatch LabelSelectorOperator = "Match"
)

func (ls *LabelSelector) Match(label map[string]string) (bool, error) {
Copy link
Member

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

@wenchajun wenchajun force-pushed the regex branch 3 times, most recently from d9e1798 to 6571a33 Compare August 17, 2023 03:13
Signed-off-by: dehaocheng <[email protected]>
@benjaminhuo benjaminhuo merged commit 51ea82e into kubesphere:master Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants