From b64ceaf8becc41e358a4b21501dbe8bd09be6a30 Mon Sep 17 00:00:00 2001 From: Martin Maly Date: Tue, 26 Apr 2022 11:43:48 -0700 Subject: [PATCH] Include repository address in the table rendering (#3061) --- e2e/testdata/porch/repo-register/config.yaml | 4 ++-- e2e/testdata/porch/rpkg-init-deploy/config.yaml | 4 ++-- .../v1alpha1/config.porch.kpt.dev_repositories.yaml | 3 +++ porch/api/porchconfig/v1alpha1/types.go | 1 + 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/e2e/testdata/porch/repo-register/config.yaml b/e2e/testdata/porch/repo-register/config.yaml index 0c2d10151f..9884cb6d6c 100644 --- a/e2e/testdata/porch/repo-register/config.yaml +++ b/e2e/testdata/porch/repo-register/config.yaml @@ -31,8 +31,8 @@ commands: - get - --namespace=repo-register stdout: | - NAME TYPE CONTENT DEPLOYMENT READY - test-blueprints git Package True + NAME TYPE CONTENT DEPLOYMENT READY ADDRESS + test-blueprints git Package True https://github.com/platkrm/test-blueprints.git - args: - alpha - repo diff --git a/e2e/testdata/porch/rpkg-init-deploy/config.yaml b/e2e/testdata/porch/rpkg-init-deploy/config.yaml index 2209dc20d9..630a926607 100644 --- a/e2e/testdata/porch/rpkg-init-deploy/config.yaml +++ b/e2e/testdata/porch/rpkg-init-deploy/config.yaml @@ -75,5 +75,5 @@ commands: - get - --namespace=rpkg-init-deploy stdout: | - NAME TYPE CONTENT DEPLOYMENT READY - git git Package true True + NAME TYPE CONTENT DEPLOYMENT READY ADDRESS + git git Package true True http://git-server.test-git-namespace.svc.cluster.local:8080 diff --git a/porch/api/porchconfig/v1alpha1/config.porch.kpt.dev_repositories.yaml b/porch/api/porchconfig/v1alpha1/config.porch.kpt.dev_repositories.yaml index 983ae84e4a..1100c2c1a9 100644 --- a/porch/api/porchconfig/v1alpha1/config.porch.kpt.dev_repositories.yaml +++ b/porch/api/porchconfig/v1alpha1/config.porch.kpt.dev_repositories.yaml @@ -42,6 +42,9 @@ spec: - jsonPath: .status.conditions[?(@.type=='Ready')].status name: Ready type: string + - jsonPath: .spec['git','oci']['repo','registry'] + name: Address + type: string name: v1alpha1 schema: openAPIV3Schema: diff --git a/porch/api/porchconfig/v1alpha1/types.go b/porch/api/porchconfig/v1alpha1/types.go index 3566dae8c9..bf4c97f03d 100644 --- a/porch/api/porchconfig/v1alpha1/types.go +++ b/porch/api/porchconfig/v1alpha1/types.go @@ -25,6 +25,7 @@ import ( //+kubebuilder:printcolumn:name="Content",type=string,JSONPath=`.spec.content` //+kubebuilder:printcolumn:name="Deployment",type=boolean,JSONPath=`.spec.deployment` //+kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type=='Ready')].status` +//+kubebuilder:printcolumn:name="Address",type=string,JSONPath=`.spec['git','oci']['repo','registry']` // Repository type Repository struct {