forked from LaconicNetwork/kompose
Go mod (#1305)
* 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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user