Merge pull request #1409 from lexcao/feat/image/registry

Support custom registry on pushing image
This commit is contained in:
Kubernetes Prow Robot
2021-08-11 08:26:47 -07:00
committed by GitHub
13 changed files with 421 additions and 65 deletions
+3
View File
@@ -47,6 +47,7 @@ var (
ConvertReplicas int
ConvertController string
ConvertPushImage bool
ConvertPushImageRegistry string
ConvertOpt kobject.ConvertOptions
ConvertYAMLIndent int
@@ -88,6 +89,7 @@ var convertCmd = &cobra.Command{
BuildRepo: ConvertBuildRepo,
BuildBranch: ConvertBuildBranch,
PushImage: ConvertPushImage,
PushImageRegistry: ConvertPushImageRegistry,
CreateDeploymentConfig: ConvertDeploymentConfig,
EmptyVols: ConvertEmptyVols,
Volumes: ConvertVolumes,
@@ -147,6 +149,7 @@ func init() {
// Standard between the two
convertCmd.Flags().StringVar(&ConvertBuild, "build", "none", `Set the type of build ("local"|"build-config"(OpenShift only)|"none")`)
convertCmd.Flags().BoolVar(&ConvertPushImage, "push-image", false, "If we should push the docker image we built")
convertCmd.Flags().StringVar(&ConvertPushImageRegistry, "push-image-registry", "", "Specify registry for pushing image, which will override registry from image name.")
convertCmd.Flags().BoolVarP(&ConvertYaml, "yaml", "y", false, "Generate resource files into YAML format")
convertCmd.Flags().MarkDeprecated("yaml", "YAML is the default format now.")
convertCmd.Flags().MarkShorthandDeprecated("y", "YAML is the default format now.")