Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional replace flag #108

Merged
merged 1 commit into from
Aug 1, 2018
Merged

Add optional replace flag #108

merged 1 commit into from
Aug 1, 2018

Conversation

lewismarshall
Copy link
Contributor

@lewismarshall lewismarshall commented Jul 31, 2018

Tested from clean (uses create):

~/go/src/github.com/UKHomeOffice/kd add_replace[+]> ./bin/kd -n default --replace -f ./test/deployment.yaml 
[INFO] 2018/07/31 11:41:00 main.go:462: deploying deployment/nginx-deployment
[INFO] 2018/07/31 11:41:01 main.go:469: deployment "nginx-deployment" created
[INFO] 2018/07/31 11:41:06 main.go:589: Deployment "nginx-deployment" update in progress. Waiting for 3 objects.
[INFO] 2018/07/31 11:41:07 main.go:589: Deployment "nginx-deployment" update in progress. Waiting for 3 objects.
[INFO] 2018/07/31 11:41:08 main.go:589: Deployment "nginx-deployment" update in progress. Waiting for 3 objects.
[INFO] 2018/07/31 11:41:09 main.go:589: Deployment "nginx-deployment" update in progress. Waiting for 3 objects.
[INFO] 2018/07/31 11:41:10 main.go:589: Deployment "nginx-deployment" update in progress. Waiting for 3 objects.
[INFO] 2018/07/31 11:41:11 main.go:589: Deployment "nginx-deployment" update in progress. Waiting for 3 objects.
[INFO] 2018/07/31 11:41:12 main.go:589: Deployment "nginx-deployment" update in progress. Waiting for 3 objects.
[INFO] 2018/07/31 11:41:13 main.go:589: Deployment "nginx-deployment" update in progress. Waiting for 3 objects.
[INFO] 2018/07/31 11:41:14 main.go:589: Deployment "nginx-deployment" update in progress. Waiting for 3 objects.
[INFO] 2018/07/31 11:41:15 main.go:589: Deployment "nginx-deployment" update in progress. Waiting for 3 objects.
[INFO] 2018/07/31 11:41:16 main.go:589: Deployment "nginx-deployment" update in progress. Waiting for 3 objects.
[INFO] 2018/07/31 11:41:17 main.go:589: Deployment "nginx-deployment" update in progress. Waiting for 3 objects.
[INFO] 2018/07/31 11:41:18 main.go:589: Deployment "nginx-deployment" update in progress. Waiting for 3 objects.
[INFO] 2018/07/31 11:41:19 main.go:589: Deployment "nginx-deployment" update in progress. Waiting for 2 objects.
[INFO] 2018/07/31 11:41:20 main.go:589: Deployment "nginx-deployment" update in progress. Waiting for 1 objects.
[INFO] 2018/07/31 11:41:21 main.go:589: Deployment "nginx-deployment" update in progress. Waiting for 1 objects.
[INFO] 2018/07/31 11:41:22 main.go:586: Deployment "nginx-deployment" is complete. Available objects: 3

With existing object (uses replace):

~/go/src/github.com/UKHomeOffice/kd add_replace[+]> ./bin/kd -n default --replace -f ./test/deployment.yaml 
[INFO] 2018/07/31 11:41:45 main.go:462: deploying deployment/nginx-deployment
[INFO] 2018/07/31 11:41:45 main.go:469: deployment "nginx-deployment" replaced
[INFO] 2018/07/31 11:41:50 main.go:586: Deployment "nginx-deployment" is complete. Available objects: 3
~/go/src/github.com/UKHomeOffice/kd add_replace[+]> kubectl -n default get po

Copy link
Contributor

@KashifSaadat KashifSaadat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good, thanks for the addition!

As @Joseph-Irving suggested, the readme should be extended with some use-cases for this flag as to when it may be needed.

Copy link
Contributor

@KashifSaadat KashifSaadat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG, thanks!

@lewismarshall lewismarshall merged commit a149a21 into master Aug 1, 2018
KashifSaadat pushed a commit that referenced this pull request Aug 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants