Skip to content

Commit 455b343

Browse files
author
Oleg Sucharevich
authored
add --in-cluster to venona delete cmd (#26)
1 parent becaf14 commit 455b343

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "venona",
3-
"version": "0.14.1",
3+
"version": "0.15.0",
44
"description": "Codefresh agent to run on Codefresh's runtime environment and execute pipeline",
55
"main": "index.js",
66
"scripts": {

venonactl/cmd/delete.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ var deleteCmd = &cobra.Command{
5656
if kubeContextFlag != nil {
5757
contextName = kubeContextFlag.Value.String()
5858
}
59+
s.KubernetesAPI.InCluster = inCluster
5960
for _, name := range args {
6061
re, err := s.CodefreshAPI.Client.RuntimeEnvironments().Get(name)
6162
errors = collectError(errors, err, name, "Get Runtime-Environment from Codefresh")
@@ -114,6 +115,7 @@ func init() {
114115
rootCmd.AddCommand(deleteCmd)
115116
deleteCmd.Flags().String("kube-context-name", "", "Set name to overwrite the context name saved in Codefresh")
116117
deleteCmd.Flags().StringVar(&revertTo, "revert-to", "", "Set to the name of the runtime-environment to set as default")
118+
deleteCmd.Flags().BoolVar(&inCluster, "in-cluster", false, "Set flag if venona is been installed from inside a cluster")
117119
}
118120

119121
func collectError(errors []DeletionError, err error, reName string, op string) []DeletionError {

0 commit comments

Comments
 (0)