Create and update a k8s service for each processing with expose model
This commit is contained in:
34
README.md
34
README.md
@@ -15,3 +15,37 @@ imagePullPolicy: Never
|
||||
|
||||
Not doing so will end up in the pod having a `ErrorImagePull`
|
||||
|
||||
## Allow argo to create services
|
||||
|
||||
In order for monitord to expose **open cloud services** on the node, we need to give him permission to create **k8s services**.
|
||||
|
||||
For that we can update the RBAC configuration for a role already created by argo :
|
||||
|
||||
### Manually edit the rbac authorization
|
||||
|
||||
> kubectl edit roles.rbac.authorization.k8s.io -n argo argo-role
|
||||
|
||||
In rules add a new entry :
|
||||
|
||||
```
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services
|
||||
verbs:
|
||||
- get
|
||||
- create
|
||||
```
|
||||
|
||||
### Patch the rbac authorization with a one liner
|
||||
|
||||
> kubectl patch role argo-role -n argo --type='json' -p='[{"op": "add", "path": "/rules/-", "value": {"apiGroups": [""], "resources": ["services"], "verbs": ["get","create"]}}]'
|
||||
|
||||
### Check wether the modification is effective
|
||||
|
||||
> kubectl auth can-i create services --as=system:serviceaccount:argo:argo -n argo
|
||||
|
||||
This command **must return "yes"**
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user