opensergo-go-sdk icon indicating copy to clipboard operation
opensergo-go-sdk copied to clipboard

[Question] When using go-sdk to subscribe all RouterTraffic CR in current namespace, what 'app' param should be?

Open LaurenceLiZhixin opened this issue 2 years ago • 1 comments

// NewSubscribeKey returns an instance of SubscribeKey which is constructed by parameters.
func NewSubscribeKey(namespace string, app string, configKind configkind.ConfigKind) *SubscribeKey {
	return &SubscribeKey{
		namespace: namespace,
		app:       app,
		kind:      configKind,
	}
}

How I can subscribe all crs in current ns?

LaurenceLiZhixin avatar Feb 04 '23 11:02 LaurenceLiZhixin

In most scenes, RouterTraffic CRs were defined in a certain application scope, so we have a convention that, the label app in CR is required. So in current version you should give both namespace and app to defined your target CR, and you should subscribe all configKind one by one in your framework or application if you want to subscribe all CRs in the given namespace and app.

We also welcome you to append your opinions and your designs in this ISSUE 😃

jnan806 avatar Feb 05 '23 01:02 jnan806