You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by GitBox <gi...@apache.org> on 2019/01/09 08:14:20 UTC
[GitHub] nicolaferraro closed pull request #320: chore(ux): show the same
basic info with oc and kamel
nicolaferraro closed pull request #320: chore(ux): show the same basic info with oc and kamel
URL: https://github.com/apache/camel-k/pull/320
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/deploy/crd-integration-context.yaml b/deploy/crd-integration-context.yaml
index f33ad811..7d82cd46 100644
--- a/deploy/crd-integration-context.yaml
+++ b/deploy/crd-integration-context.yaml
@@ -20,3 +20,11 @@ spec:
type: string
description: The IntegrationContext phase
JSONPath: .status.phase
+ - name: Type
+ type: string
+ description: The IntegrationContext type
+ JSONPath: .metadata.labels.camel\.apache\.org\/context\.type
+ - name: Image
+ type: string
+ description: The IntegrationContext image
+ JSONPath: .status.image
diff --git a/deploy/crd-integration.yaml b/deploy/crd-integration.yaml
index af20b4c5..11db52bf 100644
--- a/deploy/crd-integration.yaml
+++ b/deploy/crd-integration.yaml
@@ -20,3 +20,7 @@ spec:
type: string
description: The Integration phase
JSONPath: .status.phase
+ - name: Context
+ type: string
+ description: The IntegrationContext to use
+ JSONPath: .status.context
diff --git a/deploy/resources.go b/deploy/resources.go
index f2561982..c9da6cbb 100644
--- a/deploy/resources.go
+++ b/deploy/resources.go
@@ -2216,6 +2216,14 @@ spec:
type: string
description: The IntegrationContext phase
JSONPath: .status.phase
+ - name: Type
+ type: string
+ description: The IntegrationContext type
+ JSONPath: .metadata.labels.camel\.apache\.org\/context\.type
+ - name: Image
+ type: string
+ description: The IntegrationContext image
+ JSONPath: .status.image
`
Resources["crd-integration-platform.yaml"] =
@@ -2268,6 +2276,10 @@ spec:
type: string
description: The Integration phase
JSONPath: .status.phase
+ - name: Context
+ type: string
+ description: The IntegrationContext to use
+ JSONPath: .status.context
`
Resources["cr-example.yaml"] =
diff --git a/pkg/cmd/context_get.go b/pkg/cmd/context_get.go
index eab23908..3fdab174 100644
--- a/pkg/cmd/context_get.go
+++ b/pkg/cmd/context_get.go
@@ -77,14 +77,14 @@ func (command *contextGetCommand) run() error {
}
w := tabwriter.NewWriter(os.Stdout, 0, 8, 1, '\t', 0)
- fmt.Fprintln(w, "NAME\tTYPE\tSTATUS")
+ fmt.Fprintln(w, "NAME\tPHASE\tTYPE\tIMAGE")
for _, ctx := range ctxList.Items {
t := ctx.Labels["camel.apache.org/context.type"]
u := command.user && t == "user"
p := command.platform && t == v1alpha1.IntegrationContextTypePlatform
if u || p {
- fmt.Fprintf(w, "%s\t%s\t%s\n", ctx.Name, t, string(ctx.Status.Phase))
+ fmt.Fprintf(w, "%s\t%s\t%s\t%s\n", ctx.Name, string(ctx.Status.Phase), t, ctx.Status.Image)
}
}
w.Flush()
diff --git a/pkg/cmd/get.go b/pkg/cmd/get.go
index 619333c1..1f7ab70f 100644
--- a/pkg/cmd/get.go
+++ b/pkg/cmd/get.go
@@ -68,9 +68,9 @@ func (o *getCmdOptions) run(cmd *cobra.Command, args []string) error {
}
w := tabwriter.NewWriter(os.Stdout, 0, 8, 1, '\t', 0)
- fmt.Fprintln(w, "NAME\tCONTEXT\tSTATUS")
+ fmt.Fprintln(w, "NAME\tPHASE\tCONTEXT")
for _, integration := range integrationList.Items {
- fmt.Fprintf(w, "%s\t%s\t%s\n", integration.Name, integration.Status.Context, string(integration.Status.Phase))
+ fmt.Fprintf(w, "%s\t%s\t%s\n", integration.Name, string(integration.Status.Phase), integration.Status.Context)
}
w.Flush()
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services