* Use go mod instead of glide
* Add `--with-kompose-annotation` flag to allow us to switch it off for tests
* Remove hostpid support (since the newest sdk does not support it)
* Create new test script and fixtures
* Remove replicationcontroller support
This commit is contained in:
Hang Yan
2020-08-07 17:25:52 +08:00
committed by GitHub
parent d780067bf9
commit 525b68f027
2680 changed files with 457661 additions and 730294 deletions
+7
View File
@@ -50,6 +50,10 @@ var (
ConvertYAMLIndent int
UpBuild string
// WithKomposeAnnotation decides if we will add metadata about this convert to resource's annotation.
// default is true.
WithKomposeAnnotation bool
)
var convertCmd = &cobra.Command{
@@ -90,6 +94,7 @@ var convertCmd = &cobra.Command{
IsReplicaSetFlag: cmd.Flags().Lookup("replicas").Changed,
IsDeploymentConfigFlag: cmd.Flags().Lookup("deployment-config").Changed,
YAMLIndent: ConvertYAMLIndent,
WithKomposeAnnotation: WithKomposeAnnotation,
}
// Validate before doing anything else. Use "bundle" if passed in.
@@ -144,6 +149,8 @@ func init() {
convertCmd.Flags().IntVar(&ConvertReplicas, "replicas", 1, "Specify the number of replicas in the generated resource spec")
convertCmd.Flags().StringVar(&ConvertVolumes, "volumes", "persistentVolumeClaim", `Volumes to be generated ("persistentVolumeClaim"|"emptyDir"|"hostPath" | "configMap")`)
convertCmd.Flags().BoolVar(&WithKomposeAnnotation, "with-kompose-annotation", true, "Add kompose annotations to generated resource")
// Deprecated commands
convertCmd.Flags().BoolVar(&ConvertEmptyVols, "emptyvols", false, "Use Empty Volumes. Do not generate PVCs")
convertCmd.Flags().MarkDeprecated("emptyvols", "emptyvols has been marked as deprecated. Use --volumes empty")