Skip to content

Application templates command to support Podman and Openshift#320

Open
mayuka-c wants to merge 4 commits intoIBM:mainfrom
mayuka-c:app-templates-commadn
Open

Application templates command to support Podman and Openshift#320
mayuka-c wants to merge 4 commits intoIBM:mainfrom
mayuka-c:app-templates-commadn

Conversation

@mayuka-c
Copy link
Member

@mayuka-c mayuka-c commented Feb 13, 2026

image

Signed-off-by: mayuka-c <Mayuka.C@ibm.com>
Signed-off-by: mayuka-c <Mayuka.C@ibm.com>
Signed-off-by: mayuka-c <Mayuka.C@ibm.com>
@mayuka-c mayuka-c force-pushed the app-templates-commadn branch from 6a1e914 to 60d2370 Compare February 13, 2026 10:06
@mayuka-c mayuka-c marked this pull request as ready for review February 13, 2026 10:07
Comment on lines -31 to -45
// NewFactoryFromEnv creates a factory using environment variable or default.
func NewFactoryFromEnv() *RuntimeFactory {
runtimeType := types.RuntimeTypePodman // default
if envRuntime := os.Getenv(EnvRuntimeType); envRuntime != "" {
rt := types.RuntimeType(strings.ToLower(envRuntime))
if rt.Valid() {
runtimeType = rt
} else {
logger.Warningf("Invalid runtime type in %s: %s, using default: %s\n",
EnvRuntimeType, envRuntime, types.RuntimeTypePodman)
}
}

return NewRuntimeFactory(runtimeType)
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this as this is no where used and we support only runtime as flag

for k, v := range appTemplatesParametersWithDescription {
logger.Infoln("\t" + k + ": " + v)
}
fmt.Println()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this?

@@ -1,5 +1,3 @@
imagePullPolicy: IfNotPresent
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember we were using this somewhere? don't we need this variable?

Use: "templates",
Short: "Lists the offered application templates and their supported parameters",
Long: `Retrieves information about the offered application templates and their supported parameters`,
PreRunE: func(cmd *cobra.Command, args []string) error {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason for removing this and exposing the usage message always?

return fmt.Errorf("failed to list application template values: %w", err)
logger.Errorf("failed to list application template values: %v", err)

continue
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason for continuing even after the failure?

return fmt.Errorf("failed to load application metadata: %w", err)
logger.Errorf("failed to load application metadata: %v", err)

continue
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason for continuing even after the failure?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants