Closed pre closed 2 years ago
Skaffold Control API documentation tells us we can curl :
curl
Running skaffold dev --auto-build=false --auto-deploy=false --rpc-http-port=1234 with the linked example skaffold/examples/getting-started.
skaffold dev --auto-build=false --auto-deploy=false --rpc-http-port=1234
skaffold/examples/getting-started
The Control API documentation says:
We can make Skaffold start noticing file changes automatically again by issuing the requests: curl -X PUT http://localhost:50052/v1/build/auto_execute -d '{"enabled": true}' curl -X PUT http://localhost:50052/v1/deploy/auto_execute -d '{"enabled": true}'
We can make Skaffold start noticing file changes automatically again by issuing the requests:
curl -X PUT http://localhost:50052/v1/build/auto_execute -d '{"enabled": true}' curl -X PUT http://localhost:50052/v1/deploy/auto_execute -d '{"enabled": true}'
❯ curl -X POST http://localhost:1234/v1/state -d '{"build": true}' {"buildState":{"artifacts":{"skaffold-example":"Not Started"}, "autoTrigger":false, "statusCode":"OK"}, "deployState":{"status":"Complete", "autoTrigger":false, "statusCode":"DEPLOY_SUCCESS"}, "forwardedPorts":{}, "statusCheckState":{"status":"Succeeded", "resources":{"pods":"Succeeded", "transdolan:pod/getting-started":"In Progress"}, "statusCode":"STATUSCHECK_SUCCESS"}, "fileSyncState":{"status":"Not Started", "autoTrigger":true}, "debuggingContainers":[], "metadata":{"build":{"numberOfArtifacts":1, "builders":[{"type":"DOCKER", "count":1}], "type":"LOCAL", "additional":{}}, "deploy":{"deployers":[{"type":"KUBECTL", "count":1}], "cluster":"OTHER"}, "test":null, "additional":{}}, "testState":{"status":"Not Started", "statusCode":"OK"}}%
❯ curl -X POST http://localhost:1234/v1/state -d '{"deploy": true}' {"buildState":{"artifacts":{"skaffold-example":"Not Started"}, "autoTrigger":false, "statusCode":"OK"}, "deployState":{"status":"Complete", "autoTrigger":false, "statusCode":"DEPLOY_SUCCESS"}, "forwardedPorts":{}, "statusCheckState":{"status":"Succeeded", "resources":{"pods":"Succeeded", "transdolan:pod/getting-started":"In Progress"}, "statusCode":"STATUSCHECK_SUCCESS"}, "fileSyncState":{"status":"Not Started", "autoTrigger":true}, "debuggingContainers":[], "metadata":{"build":{"numberOfArtifacts":1, "builders":[{"type":"DOCKER", "count":1}], "type":"LOCAL", "additional":{}}, "deploy":{"deployers":[{"type":"KUBECTL", "count":1}], "cluster":"OTHER"}, "test":null, "additional":{}}, "testState":{"status":"Not Started", "statusCode":"OK"}}%
❯ curl -X POST http://localhost:1234/v1/build/auto_execute -d '{"enabled": true}' {"code":3, "message":"missing required boolean parameter 'enabled'", "details":[]}%
❯ curl -X POST http://localhost:1234/v1/deploy/auto_execute -d '{"enabled": true}' {"code":3, "message":"missing required boolean parameter 'enabled'", "details":[]}%
Using the Getting Started example as-is:
apiVersion: skaffold/v2beta28 kind: Config build: artifacts: - image: skaffold-example deploy: kubectl: manifests: - k8s-*
Ok, found it .. Thanks for rubber ducking ... the /v1/deploy/auto_execute requires PUT instead of POST.
/v1/deploy/auto_execute
PUT
POST
❯ curl -X PUT http://localhost:1234/v1/deploy/auto_execute -d '{"enabled": true}' {} # it works
Skaffold Control API documentation tells us we can
curl
:Running
skaffold dev --auto-build=false --auto-deploy=false --rpc-http-port=1234
with the linked exampleskaffold/examples/getting-started
.The Control API documentation says:
Expected behavior
Ask status
Enable build watcher
Enable deploy watcher
Actual behavior
Information
Using the Getting Started example as-is:
Steps to reproduce the behavior