mayadata-io / mayadata-io/d-operators
proposal: ResourcePipe as a kubernetes custom resource
Open
@amitbhatt818 is already working on this.
Since Apr 28, 2020.
recipe
resource builder
resource pipe
- Dominant language
- Go
- Stars
- 10
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
ProblemStatement: ResourcePipe is a custom resource that extracts values from one or more k8s resources and manages to build a new k8s resource from these extracted values & apply this new resource in the k8s cluster.
kind: ResourcePipe
spec:
input:
- apiVersion:
resource:
name:
namespace:
get:
- key: # should unique across all gets
# json path that uses https://github.com/tidwall/gjson
path:
# string, int64, []string, []int64, []map[string]interface{}, map[string]string
datatype: # defaults to string
value: # optional
default: # default value if path does not have any value
prefix: # if set final value will have this prefix
suffix: # if set final value will have this suffix
output:
# default resource
template:
# no of replicas of this template that get applied against
# k8s cluster; is optional & defaults to 1; 0 is invalid
replicas:
# above template is updated with these set options
set:
# use the value extracted from source path & set it against
# the destination path mapped by the key
- key: # should match against one present in input[*].get[*].key
path:
# multiple keys can be used against a single path if these keys' values
# belong to same data type
# When multiple keys are used their corresponding values are merged
# and set against the destination path
- key:
path:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.