This repository has been archived by the owner on Mar 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[KOGITO-148] - Implementation of deploy command to CLI (#35)
- Loading branch information
1 parent
0d93829
commit 1b00925
Showing
26 changed files
with
670 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package main | ||
|
||
import ( | ||
"github.com/kiegroup/kogito-cloud-operator/pkg/apis/app/v1alpha1" | ||
"github.com/kiegroup/kogito-cloud-operator/pkg/util" | ||
) | ||
|
||
// fromStringArrayToControllerEnvs converts a string array in the format of key=value pairs to the kogitoapp controller required type | ||
func fromStringArrayToControllerEnvs(strings []string) []v1alpha1.Env { | ||
if strings == nil { | ||
return nil | ||
} | ||
envs := []v1alpha1.Env{} | ||
mapstr := util.FromStringsKeyPairToMap(strings) | ||
for k, v := range mapstr { | ||
envs = append(envs, v1alpha1.Env{Name: k, Value: v}) | ||
} | ||
return envs | ||
} | ||
|
||
func fromStringArrayToControllerResourceMap(strings []string) []v1alpha1.ResourceMap { | ||
if strings == nil { | ||
return nil | ||
} | ||
res := []v1alpha1.ResourceMap{} | ||
mapstr := util.FromStringsKeyPairToMap(strings) | ||
for k, v := range mapstr { | ||
res = append(res, v1alpha1.ResourceMap{Resource: v1alpha1.ResourceKind(k), Value: v}) | ||
} | ||
return res | ||
} |
Oops, something went wrong.