From 50b9f6ad3d8eab2e4f39f7f7ba18ac914400909d Mon Sep 17 00:00:00 2001 From: Leo Christy Jesuraj Date: Thu, 30 Nov 2023 22:19:56 -0500 Subject: [PATCH 1/3] update go-restful library Signed-off-by: Leo Christy Jesuraj --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 879881d7f..6146512b3 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( github.com/blendle/zapdriver v1.3.1 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect diff --git a/go.sum b/go.sum index ac5657ed5..7c425cc43 100644 --- a/go.sum +++ b/go.sum @@ -88,8 +88,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= -github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= From 830b2567e8eff27c4fc003113317b6ce8da002e1 Mon Sep 17 00:00:00 2001 From: Leo Christy Jesuraj Date: Thu, 30 Nov 2023 22:29:19 -0500 Subject: [PATCH 2/3] update sample app Signed-off-by: Leo Christy Jesuraj --- .gitignore | 2 +- .../runtime-component.clusterserviceversion.yaml | 10 +++++----- config/manager/manager.yaml | 2 +- config/samples/rc.app.stacks_v1_runtimecomponent.yaml | 2 +- .../rc.app.stacks_v1beta2_runtimecomponent.yaml | 2 +- .../deploy/kubectl/runtime-component-operator.yaml | 2 +- .../daily/base/runtime-component-operator.yaml | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 3c6d80d0c..c9b84122a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ build/_output build/_test bin/controller-gen bin/kustomize -bundle/tests/scorecard/kuttl/kubeconfig +bundle/tests operators vendor # Created by https://www.gitignore.io/api/go,vim,emacs,visualstudiocode diff --git a/bundle/manifests/runtime-component.clusterserviceversion.yaml b/bundle/manifests/runtime-component.clusterserviceversion.yaml index cb93e11a9..43a709e6a 100644 --- a/bundle/manifests/runtime-component.clusterserviceversion.yaml +++ b/bundle/manifests/runtime-component.clusterserviceversion.yaml @@ -11,7 +11,7 @@ metadata: "name": "runtimecomponent-sample" }, "spec": { - "applicationImage": "icr.io/appcafe/open-liberty/samples/getting-started@sha256:bd489232ab238c3d5b484108aa4e48dd296a5022119c251f31238c4f65a2469f", + "applicationImage": "icr.io/appcafe/open-liberty/samples/getting-started@sha256:b295be1aeefeae9f36b991a70dfd8ef615e3f4a849d6d6091cf51f55221e3c0d", "expose": true, "manageTLS": true, "replicas": 1, @@ -44,7 +44,7 @@ metadata: "name": "runtimecomponent-sample" }, "spec": { - "applicationImage": "icr.io/appcafe/open-liberty/samples/getting-started@sha256:bd489232ab238c3d5b484108aa4e48dd296a5022119c251f31238c4f65a2469f", + "applicationImage": "icr.io/appcafe/open-liberty/samples/getting-started@sha256:b295be1aeefeae9f36b991a70dfd8ef615e3f4a849d6d6091cf51f55221e3c0d", "expose": true, "replicas": 1, "service": { @@ -71,7 +71,7 @@ metadata: categories: Application Runtime certified: "true" containerImage: icr.io/appcafe/runtime-component-operator:daily - createdAt: "2023-11-03T22:14:54Z" + createdAt: "2023-12-01T03:25:43Z" description: Deploys any runtime component with dynamic and auto-tuning configuration olm.skipRange: '>=0.8.0 <1.3.0' operators.openshift.io/infrastructure-features: '["disconnected"]' @@ -1006,7 +1006,7 @@ spec: fieldRef: fieldPath: metadata.annotations['olm.targetNamespaces'] - name: RELATED_IMAGE_LIBERTY_SAMPLE_APP - value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:bd489232ab238c3d5b484108aa4e48dd296a5022119c251f31238c4f65a2469f + value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:b295be1aeefeae9f36b991a70dfd8ef615e3f4a849d6d6091cf51f55221e3c0d - name: RELATED_IMAGE_RUNTIME_COMPONENT_OPERATOR value: icr.io/appcafe/runtime-component-operator:daily image: icr.io/appcafe/runtime-component-operator:daily @@ -1289,7 +1289,7 @@ spec: provider: name: Community relatedImages: - - image: icr.io/appcafe/open-liberty/samples/getting-started@sha256:bd489232ab238c3d5b484108aa4e48dd296a5022119c251f31238c4f65a2469f + - image: icr.io/appcafe/open-liberty/samples/getting-started@sha256:b295be1aeefeae9f36b991a70dfd8ef615e3f4a849d6d6091cf51f55221e3c0d name: liberty-sample-app - image: icr.io/appcafe/runtime-component-operator:daily name: runtime-component-operator diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 08e8c2265..9b23bd728 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -67,7 +67,7 @@ spec: fieldRef: fieldPath: metadata.annotations['olm.targetNamespaces'] - name: RELATED_IMAGE_LIBERTY_SAMPLE_APP - value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:bd489232ab238c3d5b484108aa4e48dd296a5022119c251f31238c4f65a2469f + value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:b295be1aeefeae9f36b991a70dfd8ef615e3f4a849d6d6091cf51f55221e3c0d - name: RELATED_IMAGE_RUNTIME_COMPONENT_OPERATOR value: OPERATOR_IMAGE securityContext: diff --git a/config/samples/rc.app.stacks_v1_runtimecomponent.yaml b/config/samples/rc.app.stacks_v1_runtimecomponent.yaml index 061a51f25..cdaafa314 100644 --- a/config/samples/rc.app.stacks_v1_runtimecomponent.yaml +++ b/config/samples/rc.app.stacks_v1_runtimecomponent.yaml @@ -3,7 +3,7 @@ kind: RuntimeComponent metadata: name: runtimecomponent-sample spec: - applicationImage: icr.io/appcafe/open-liberty/samples/getting-started@sha256:bd489232ab238c3d5b484108aa4e48dd296a5022119c251f31238c4f65a2469f + applicationImage: icr.io/appcafe/open-liberty/samples/getting-started@sha256:b295be1aeefeae9f36b991a70dfd8ef615e3f4a849d6d6091cf51f55221e3c0d expose: true manageTLS: true replicas: 1 diff --git a/config/samples/rc.app.stacks_v1beta2_runtimecomponent.yaml b/config/samples/rc.app.stacks_v1beta2_runtimecomponent.yaml index c26cec0cf..34440f6a1 100644 --- a/config/samples/rc.app.stacks_v1beta2_runtimecomponent.yaml +++ b/config/samples/rc.app.stacks_v1beta2_runtimecomponent.yaml @@ -4,7 +4,7 @@ metadata: name: runtimecomponent-sample spec: # Add fields here - applicationImage: icr.io/appcafe/open-liberty/samples/getting-started@sha256:bd489232ab238c3d5b484108aa4e48dd296a5022119c251f31238c4f65a2469f + applicationImage: icr.io/appcafe/open-liberty/samples/getting-started@sha256:b295be1aeefeae9f36b991a70dfd8ef615e3f4a849d6d6091cf51f55221e3c0d expose: true replicas: 1 service: diff --git a/internal/deploy/kubectl/runtime-component-operator.yaml b/internal/deploy/kubectl/runtime-component-operator.yaml index b0d657c3b..aa9f10f20 100644 --- a/internal/deploy/kubectl/runtime-component-operator.yaml +++ b/internal/deploy/kubectl/runtime-component-operator.yaml @@ -303,7 +303,7 @@ spec: - name: WATCH_NAMESPACE value: RUNTIME_COMPONENT_WATCH_NAMESPACE - name: RELATED_IMAGE_LIBERTY_SAMPLE_APP - value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:bd489232ab238c3d5b484108aa4e48dd296a5022119c251f31238c4f65a2469f + value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:b295be1aeefeae9f36b991a70dfd8ef615e3f4a849d6d6091cf51f55221e3c0d - name: RELATED_IMAGE_RUNTIME_COMPONENT_OPERATOR value: icr.io/appcafe/runtime-component-operator:daily image: icr.io/appcafe/runtime-component-operator:daily diff --git a/internal/deploy/kustomize/daily/base/runtime-component-operator.yaml b/internal/deploy/kustomize/daily/base/runtime-component-operator.yaml index 792944393..a3bcd6a6c 100644 --- a/internal/deploy/kustomize/daily/base/runtime-component-operator.yaml +++ b/internal/deploy/kustomize/daily/base/runtime-component-operator.yaml @@ -50,7 +50,7 @@ spec: fieldRef: fieldPath: metadata.namespace - name: RELATED_IMAGE_LIBERTY_SAMPLE_APP - value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:bd489232ab238c3d5b484108aa4e48dd296a5022119c251f31238c4f65a2469f + value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:b295be1aeefeae9f36b991a70dfd8ef615e3f4a849d6d6091cf51f55221e3c0d - name: RELATED_IMAGE_RUNTIME_COMPONENT_OPERATOR value: icr.io/appcafe/runtime-component-operator:daily image: icr.io/appcafe/runtime-component-operator:daily From d451cfeea4f72193c1e9788818d23a1f39446c41 Mon Sep 17 00:00:00 2001 From: Leo Christy Jesuraj Date: Thu, 30 Nov 2023 22:42:37 -0500 Subject: [PATCH 3/3] Exclude sample app image from CD publishing process Signed-off-by: Leo Christy Jesuraj --- .one-pipeline-cd.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.one-pipeline-cd.yaml b/.one-pipeline-cd.yaml index 8e61bcfd7..167f09f6c 100644 --- a/.one-pipeline-cd.yaml +++ b/.one-pipeline-cd.yaml @@ -23,6 +23,11 @@ setup: echo "${DIGEST}" echo "${APP}" | jq '.' + if [[ "${ARTIFACT}" == *"icr.io/appcafe/open-liberty/samples/"* ]];then + echo "Exclude samples from digest validation: ${ARTIFACT}" + continue + fi + SAVED_DIGEST="$(skopeo inspect docker://$ARTIFACT | jq '.Digest'| sed -e 's/"//g')" if [[ ${DIGEST} == ${SAVED_DIGEST} ]]; then echo "Image, $ARTIFACT, passes validation" @@ -64,12 +69,19 @@ deploy: for INVENTORY_ENTRY in $(echo "${INVENTORY_ENTRIES}" | jq -r '.[] '); do APP=$(cat "${INVENTORY_PATH}/${INVENTORY_ENTRY}") ARTIFACT=$(echo "${APP}" | jq -r '.artifact') + echo "${ARTIFACT}" + + if [[ "${ARTIFACT}" == *"icr.io/appcafe/open-liberty/samples/"* ]];then + echo "Exclude samples from publishing: ${ARTIFACT}" + continue + fi + NAME=$(echo "${APP}" | jq -r '.name') DIGEST=$(echo "${APP}" | jq -r '.sha256' ) TYPE=$(echo "${APP}" | jq -r '.type' ) REPO=$(echo "${APP}" | jq -r '.repository_url' ).git COMMIT=$(echo "${APP}" | jq -r '.commit_sha' ) - echo "${ARTIFACT}" + #echo "${ARTIFACT##*/}" IMAGE_NAME="${ARTIFACT##*/}" echo "Image name: $IMAGE_NAME"