Repository navigation
Addition of Cluster DevMesh Analize - #200
Conversation
While the api side is based on replica sets and hence seems to sidestep the issue, at the CLI level it looks to me like we may need to take into account https://github.com/signadot/signadot/issues/6019. Namely, a rollout with Might be worth looking at how https://argo-rollouts.readthedocs.io/en/stable/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_restart/ or https://argo-rollouts.readthedocs.io/en/stable/features/restart/ handle rollouts with workloadRef |
Ok, yes.. even thought that's not a case we would support, here is another way to do it, that seems nicer to me: $ signadot cluster devmesh analyze --cluster test --namespace e2e-multi-devmesh
KIND NAMESPACE NAME UPDATED STATUS REASON
Deployment e2e-multi-devmesh e2e-multi 0/1 MISSING 1 pods with missing sidecar
Deployment e2e-multi-devmesh e2e-multi-httpconnect 1/1 OK
Deployment e2e-multi-devmesh e2e-multi-noservice 1/1 OK
Rollout e2e-multi-devmesh e2e-multi-rollout 0/1 MISSING 1 pods with missing sidecar
Deployment e2e-multi-devmesh e2e-multi-ws 0/0 OK
$ signadot cluster devmesh analyze --cluster test --namespace=e2e-multi-devmesh --status=NEEDS_UPDATE,MISSING -o json \
| jq -r '
.[] |
if .workload.kind == "Rollout" then
"kubectl argo rollouts restart " + .workload.name + " -n " + .workload.namespace
else
"kubectl rollout restart " + .workload.kind + "/" + .workload.name + " -n " + .workload.namespace
end
' \
| bash
deployment.apps/e2e-multi restarted
rollout 'e2e-multi-rollout' restarts in 0s
$ signadot cluster devmesh analyze --cluster test --namespace e2e-multi-devmesh
KIND NAMESPACE NAME UPDATED STATUS REASON
Deployment e2e-multi-devmesh e2e-multi 1/1 OK
Deployment e2e-multi-devmesh e2e-multi-httpconnect 1/1 OK
Deployment e2e-multi-devmesh e2e-multi-noservice 1/1 OK
Rollout e2e-multi-devmesh e2e-multi-rollout 1/1 OK
Deployment e2e-multi-devmesh e2e-multi-ws 0/0 OK
|
|
my kubectl rollout states and my |
Never mind, despite the above |
|
Regarding the |
But... what's wrong with the way it is right now? E.g.: $ kubectl apply -f - <<EOF
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
name: location
namespace: hotrod-devmesh
labels:
app: hotrod
component: location
spec:
replicas: 1
workloadRef:
apiVersion: apps/v1
kind: Deployment
name: location
strategy:
canary:
steps:
- setWeight: 20
- pause: {duration: 10s}
EOF
$ k get ro,deploy,po -o wide -n hotrod-devmesh -l component=location
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
rollout.argoproj.io/location 1 1 1 1 4m4s
NAME READY UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR
deployment.apps/location 1/1 1 1 539d hotrod signadot/hotrod:e2e-v2.9 app=hotrod,component=location
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
pod/location-6657fffd7b-fbvcn 2/2 Running 0 45m 10.244.70.135 test <none> <none>
pod/location-d95dcb577-g9x4c 2/2 Running 0 4m4s 10.244.70.149 test <none> <none>
$ signadot cluster devmesh analyze --cluster test --namespace hotrod-devmesh
KIND NAMESPACE NAME UPDATED STATUS REASON
Deployment hotrod-devmesh location 1/1 OK
Rollout hotrod-devmesh location 1/1 OK |
The rollout is not ok (it can't be sandboxed anyway) nor can it be updated if it were reported as out of date or missing. I think if the api returned an "invalid" status for that, then this interface would work fine. But as is, this reporting seems incorrect to me. |
Well... but this is about the devmesh status, not really about baseline status (can it be sandboxed/is it supported or not), and from a devmesh perspective, the above response seems correct to me.
Why you think so? E.g.: $ k scale deployment.apps/signadot-controller-manager -n signadot --replicas 0
$ k argo rollouts restart location -n hotrod-devmesh
$ k get ro,deploy,po -o wide -n hotrod-devmesh -l component=location
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
rollout.argoproj.io/location 1 1 1 1 27m
NAME READY UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR
deployment.apps/location 1/1 1 1 539d hotrod signadot/hotrod:e2e-v2.9 app=hotrod,component=location
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
pod/location-6657fffd7b-fbvcn 2/2 Running 0 68m 10.244.70.135 test <none> <none>
pod/location-d95dcb577-ghvsz 1/1 Running 0 49s 10.244.70.150 test <none> <none>
$ signadot cluster devmesh analyze --cluster test --namespace hotrod-devmesh
KIND NAMESPACE NAME UPDATED STATUS REASON
Deployment hotrod-devmesh location 1/1 OK
Rollout hotrod-devmesh location 0/1 MISSING 1 pods with missing sidecar
$ k scale deployment.apps/signadot-controller-manager -n signadot --replicas 1
$ k argo rollouts restart location -n hotrod-devmesh
$ signadot cluster devmesh analyze --cluster test --namespace hotrod-devmesh
KIND NAMESPACE NAME UPDATED STATUS REASON
Deployment hotrod-devmesh location 1/1 OK
Rollout hotrod-devmesh location 1/1 OK |
I don't feel they can be separated, because in a sense having a devmesh on that unsupported rollout cannot serve any purpose, so it can't be ok.
What I mean is that one cannot for example add an annotation to the rollout to inject the sidecar or change how it is injected. Maybe a quick sync up will help? |
|
@daniel-de-vera I was focused to much on the fork case. Since local/virtual still work, now this LGTM |
Examples:
When it comes to Rollouts, they can't be restarted by
kubectl rollout restart, therefore the solution is to use patches, e.g.:Global view:
$ signadot cluster devmesh analyze --cluster test KIND NAMESPACE NAME UPDATED STATUS REASON Deployment e2e-multi-devmesh e2e-multi 1/1 OK Deployment e2e-multi-devmesh e2e-multi-httpconnect 1/1 OK Deployment e2e-multi-devmesh e2e-multi-noservice 1/1 OK Rollout e2e-multi-devmesh e2e-multi-rollout 1/1 OK Deployment e2e-multi-devmesh e2e-multi-ws 0/0 OK Deployment e2e-multi-linkerd e2e-multi 0/1 NEEDS_UPDATE 1 pods without expected version Deployment e2e-multi-linkerd e2e-multi-httpconnect 0/1 NEEDS_UPDATE 1 pods without expected version Deployment e2e-multi-linkerd e2e-multi-noservice 0/1 NEEDS_UPDATE 1 pods without expected version Rollout e2e-multi-linkerd e2e-multi-rollout 0/1 NEEDS_UPDATE 1 pods without expected version Deployment e2e-multi-linkerd e2e-multi-ws 0/1 NEEDS_UPDATE 1 pods without expected version Deployment echo-env svc1 0/1 NEEDS_UPDATE 1 pods without expected version Deployment hotrod-devmesh driver 1/1 OK Deployment hotrod-devmesh frontend 2/2 OK Deployment hotrod-devmesh location 1/1 OK Deployment hotrod-devmesh route 2/2 OK Deployment hotrod-linkerd driver 0/1 NEEDS_UPDATE 1 pods without expected version Deployment hotrod-linkerd frontend 0/1 NEEDS_UPDATE 1 pods without expected version Deployment hotrod-linkerd location 0/1 NEEDS_UPDATE 1 pods without expected version Deployment hotrod-linkerd route 0/1 NEEDS_UPDATE 1 pods without expected version Deployment sandbox-tests-devmesh sandbox-tests-demo 0/1 NEEDS_UPDATE 1 pods without expected version