updated cli with async/await
- [x] Added package.json as version for
runcommand and added it to the docker run command (take a look if you want this) - [x]
transformK8sConfigsto Promise - [x]
promptInput,promptConfirmto async await - [x] If statement wrapped in async function
- [x] removed unused vars
absoluteAppPath,targetCPUUtilization,deploymentYAMLRegexandmaxPodsPerService - [x] significally improved
promptSecret,promptK8sTLSCredentials,promptDockerAuthDetailswith async await - [x] Removed prompt and handle callback functions
- [x] Username
toLowerCasefor docker registry - [x] Test create
- [x] Test run
- [x] Test restart
- [x] Test list
- [x] Test stop
- [x] Test logs
- [x] Test deploy (without TLS!)
- [x] Test deploy-update
- [x] Test undeploy
- [ ] Test add-secret
- [ ] Test remove-secret
Most changes are made within the deploy command. I've tested it and it's working inside my minikube. However I didn't test the TLS encryption.
@maarteNNNN Thanks for this contribution! I've been meaning to refactor that logic so it's great that you've taken the incentive. I'll try to make some time to review sometime this week.
@jondubois I implemented cli-builder, but it's not tested thoroughly. Do not merge yet.
Testing
- [x] Create (getting a bug code
243but it has to do with my npm permissions) - [x] Run
- [x] Restart
- [x] Stop
- [x] List
- [x] Logs
- [x] Argument
-f
- [x] Argument
- [x] Undeploy
- [x] Deploy
- [x] Creating
socketcluster-k8s.json - [ ] Creating with certificates
- [x] Docker username (added string
.toLowerCase()) - [x] Docker password
- [x] Docker image name
- [x] Docker tag
- [x] Creating
- [x] Deploy Update
- [ ] Add secret
- [ ] Remove secret
I didn't test the secret parts because I have no clue how.
I bumped cli-builder and checked all functions
See this link on how to install minikube for deploying and testing on a tiny k8s cluster.
Same functions are tested as the checked above. I didn't check TLS though.
Merged manually with some fixes. Thanks :)