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

introduce MatchIntFields to match fields having int values #112

Open
AmitKumarDas opened this issue Mar 19, 2020 · 0 comments
Open

introduce MatchIntFields to match fields having int values #112

AmitKumarDas opened this issue Mar 19, 2020 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed select

Comments

@AmitKumarDas
Copy link
Owner

AmitKumarDas commented Mar 19, 2020

Problem Statement: When MatchFields is applied against following resource, it results into error.

&unstructured.Unstructured{
	Object: map[string]interface{}{
		"kind": "StatefulSet",
		"spec": map[string]interface{}{
			"replicas": 3,
		},
	},
},

This is the error:

.spec.replicas accessor error: 3 is of the type int, expected string
            Field expressions match for key spec.replicas failed
            openebs.io/metac/controller/common/selector.(*Evaluation).isFieldMatch

Solution: Introduce MatchIntFields that caters to nested fields with int as their value.

@AmitKumarDas AmitKumarDas added enhancement New feature or request select good first issue Good for newcomers help wanted Extra attention is needed labels Mar 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed select
Projects
None yet
Development

No branches or pull requests

1 participant