Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
Resolve #50
Approach
The
watch
functions that we had previously for NATS, listening to changes in NATS clusters. If NATS was not available in the cluster it will give an error as below.But watching changes in NATS is an unnecessary task for the operator. So we simply remove those watchers.
User stories
According to this issue, the operator now has two deployment types.
Before deploying the Siddhi operator user has to decide either of above deployment types. Before deploying an operator we have to specify which types of resources that the operator has to handle. If NATS was not there when you deploy the operator, the operator simply ignores watching NATS. So this will lead to two questions as below.
How to deploy default Siddhi apps with the distributed mode(with NATS) of the Siddhi operator?
How to deploy distributed Siddhi apps with the default mode(without NATS) of the Siddhi operator?
Related PRs
Test environment
Learning
Before deploying an operator, you have to specify all the CRDs that operator going to look at. And those resources should be in the k8s cluster when deploying the operator. The dynamic CRD registration does not support currently in operator sdk level according to this operator-framework/operator-sdk#139 issue.