Comments (2)
@MichalGuzieniuk Thanks for the continued testing!
While defining custom data in ConfigMap it is possible to define JSON path operation (add, remove, replace, copy, move). Those operation are not taken into account by NRI.
For instance for ConfigMap
apiVersion: v1 kind: ConfigMap metadata: name: nri-user-defined-injections namespace: kube-system data: "customInjection": '{"op": "remove", "path": "/metadata/annotations", "value": {"k8s.v1.cni.cncf.io/networks": "foo-network"}}'
Original POD specification is not modified
apiVersion: v1 kind: Pod metadata: name: testpod labels: customInjection: "true" annotations: k8s.v1.cni.cncf.io/networks: foo-network spec: containers: - name: app image: alpine command: [ "/bin/sh", "-c", "sleep INF" ]
Expected to remove foo-network from POD specification.
I only added add
operation in the initial implemention as that was the use-case I'd like to use.
I think we can take this as a feature enhancement for future release.
Second use case, for ConfigMap, operation add
apiVersion: v1 kind: ConfigMap metadata: name: nri-user-defined-injections namespace: kube-system data: "customInjection": '{"op": "add", "path": "/metadata/annotations", "value": {"k8s.v1.cni.cncf.io/networks": "sriov-net-attach-def"}}'
and above POD definition, I would expect for operation add to have after modification two networks
k8s.v1.cni.cncf.io/networks: foo-network, sriov-net-attach-def
instead for given key, values are replaced. Current state:
k8s.v1.cni.cncf.io/networks: sriov-net-attach-def
Another good catch!
I didn't think of such case, but it sounds reasonable to expect the networks be appended to existing list.
I will consider implementing this along with the first use case.
from network-resources-injector.
@zshi-redhat Thank you for comment, sound good for me.
from network-resources-injector.
Related Issues (20)
- resource not injected in a large K8s cluster HOT 7
- Certificates v1beta1 will no longer be support on k8s release 1.22 HOT 4
- Add stable tag for network resource injector container
- Release network-resources-injector v1.3 HOT 5
- Create a Deployment yaml for network-resource-injector
- Add Helm Chart
- NRI pod restart not handled HOT 3
- Health check for webhook server
- Release of Network resources injector HOT 3
- Too wide permissions given to service accounts
- CI lane is not able to finish the kind deployment HOT 2
- Help understanding webhook client certificates
- 'User Defined Injections' feature is missing access rights to configmap HOT 2
- 'User defined injections' feature does not react on ConfigMap remove HOT 1
- 'User defined injections' feature removes defined network annotations HOT 2
- create new release HOT 4
- User Defined Injections - injects only one property
- Can Network-Resources-Injector(NRI) to be deployed as a deployment HOT 2
- Resources limit and requests are added only to first container inside POD HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from network-resources-injector.