SAP-samples / btp-create-api-integrations

Create your own digital experiences with SAP Build and SAP Integration Suite to operationalize access requests, federate APIs from disparate gateways, and monetize their use.
https://blogs.sap.com/2022/12/01/monetize-your-api-with-sap-btp-and-stripe/
Apache License 2.0
10 stars 11 forks source link

Error: unable to build kubernetes objects from release manifest: resource mapping not found for name: "btp-invoicing-srv" namespace: "" from "": no matches for kind "PodDisruptionBudget" in version "policy/v1beta1" #10

Closed ferrymul7 closed 1 week ago

ferrymul7 commented 1 week ago

Hi Team, i run the build-deploy:kyma script, and it ended up with below error. Please advise. Thank you,


ferrymul@909c4acf1983 btp-invoicing % npm run build-deploy:kyma --image_name=ferrymul/btp-invoicing --namespace=default

btp-invoicing@1.0.0 build-deploy:kyma cross-var npm run build:docker --image_name=$npm_config_image_name && cross-var npm run push:docker --image_name=$npm_config_image_name && cross-var npm run deploy:kyma --namespace=$npm_config_namespace

btp-invoicing@1.0.0 build:docker cross-var npm run build && cross-var npm run pack --image_name=$npm_config_image_name

btp-invoicing@1.0.0 build npm run build:cds && npm run cleanup:ts && npm run build:ts

btp-invoicing@1.0.0 build:cds cds build --production

building project [/Users/ferrymul/Downloads/WIP/github/btp-create-api-integrations/btp-invoicing], clean [true] cds-dk [7.9.8], cds [7.9.5], compiler [4.9.8], home [/Users/ferrymul/Downloads/WIP/github/btp-create-api-integrations/btp-invoicing/node_modules/@sap/cds]

{ build: { target: 'gen', tasks: [ { for: 'nodejs', src: 'srv', options: { model: ['srv', 'srv/external/APIPortal_Developer_CF'] }} ] } }

done > wrote output to: gen/srv/.cdsrc.json gen/srv/package-lock.json gen/srv/package.json gen/srv/srv/csn.json gen/srv/srv/external/APIPortal_Developer_CF.edmx gen/srv/srv/external/Billing_APIs_CF.yml gen/srv/srv/external/Billing_APIs_CF/download-bill-api.ts gen/srv/srv/external/Billing_APIs_CF/download-bill-using-bill-id-api.ts gen/srv/srv/external/Billing_APIs_CF/index.ts gen/srv/srv/external/Billing_APIs_CF/schema/bad-request.ts gen/srv/srv/external/Billing_APIs_CF/schema/bill-response.ts gen/srv/srv/external/Billing_APIs_CF/schema/billingerror.ts gen/srv/srv/external/Billing_APIs_CF/schema/error.ts gen/srv/srv/external/Billing_APIs_CF/schema/index.ts gen/srv/srv/external/Billing_APIs_CF/view-bill-api.ts gen/srv/srv/invoicing-service.ts gen/srv/srv/models/bill.ts gen/srv/srv/models/entities.ts gen/srv/srv/odata/v4/APIPortal_Developer_CF.xml gen/srv/srv/odata/v4/InvoicingService.xml gen/srv/srv/odata/v4/apiportal.xml gen/srv/srv/services/bill-service.ts gen/srv/srv/services/index.ts gen/srv/srv/services/stripe-service.ts

build completed in 2603 ms

btp-invoicing@1.0.0 cleanup:ts npx rimraf gen/srv/srv/*/.ts

btp-invoicing@1.0.0 build:ts tsc

btp-invoicing@1.0.0 pack cross-var pack build $npm_config_image_name --path gen/srv --buildpack gcr.io/paketo-buildpacks/nodejs --builder paketobuildpacks/builder-jammy-base --env BP_NODE_RUN_SCRIPTS=""

latest: Pulling from paketobuildpacks/builder-jammy-base 4f4fb700ef54: Pulling fs layer 290e4056b295: Pulling fs layer d18cf7b4e5f7: Pulling fs layer 4b9dc32eda4c: Pulling fs layer 73eb64de7d75: Pulling fs layer 8446adea4bea: Pulling fs layer 467a67704441: Pulling fs layer 120f0257bb09: Pulling fs layer 37d04cb8bc51: Pulling fs layer b22d019d60aa: Pulling fs layer 95594c47491a: Pulling fs layer b78b7d37c9b9: Pulling fs layer 711dc54c2a51: Pulling fs layer b9301e55c53d: Pulling fs layer b70e1eaa11e7: Pulling fs layer 1b2ec1bd37c7: Pulling fs layer 0f89305d12b2: Pulling fs layer eee1955593d7: Pulling fs layer 822c3bd88b05: Pulling fs layer e8934202970d: Pulling fs layer d37a9c5b84db: Pulling fs layer 3ede0d52aadc: Pulling fs layer 185d829803af: Pulling fs layer 462750244376: Pulling fs layer e9e0dba3199d: Pulling fs layer c30c226514a6: Pulling fs layer b221151ae1d7: Pulling fs layer 235b8c2c9bc5: Pulling fs layer 550bacfb388e: Pulling fs layer 1ebdbf629f72: Pulling fs layer 94067c820859: Pulling fs layer b72c6909028d: Pulling fs layer f1d2e8e36b5a: Pulling fs layer 22beca3f4fb9: Pulling fs layer 7286b2e02aaa: Pulling fs layer f00d4c1d4550: Pulling fs layer 4d39cad1c252: Pulling fs layer bf15c0a82ce4: Pulling fs layer 63dc221d05cd: Pulling fs layer 018b45470d28: Pulling fs layer 079b6ca6ec00: Pulling fs layer 4e48aeaad56c: Pulling fs layer 9404b6072a7e: Pulling fs layer 09faabbbffd9: Pulling fs layer dc6a3317133d: Pulling fs layer 0c9792bfcf88: Pulling fs layer cdca6b8aca10: Pulling fs layer cb825a0cc46e: Pulling fs layer fd502485eb5a: Pulling fs layer ebaa54c0e8a1: Pulling fs layer 67c85e60d410: Pulling fs layer 44de89a4970e: Pulling fs layer c5e12a4c28ab: Pulling fs layer 730b2ef6ad52: Pulling fs layer d1ede0e712a9: Pulling fs layer efbeafa4d94d: Pulling fs layer 0a3df5278d6e: Pulling fs layer 916cec4c066b: Pulling fs layer 4f9a28f722ac: Pulling fs layer 3d599a805cfb: Pulling fs layer 6e57bb72a873: Pulling fs layer 1cabf22413b5: Pulling fs layer ebee9e78e48a: Pulling fs layer cb20f596b25b: Pulling fs layer 9ed2ec693118: Pulling fs layer e1c5eda3746a: Pulling fs layer 6aa5833e8c6c: Pulling fs layer 9381ce43653e: Pulling fs layer ad1dd2ff3479: Pulling fs layer 519ff22c9ecd: Pulling fs layer 9ac8734afc81: Pulling fs layer d14dd32b53d7: Pulling fs layer 290e4056b295: Download complete e09b2bbd199e: Already exists 07b45d9086a9: Already exists d866f1e98ad0: Already exists 3243e05dcc13: Already exists e931efe2086d: Already exists fe7dae13781a: Already exists 0fed10e34b2c: Already exists 6603a561bd80: Already exists 74afa5104fc7: Already exists 79589c2487f7: Already exists 3a4bfa1388b1: Already exists 21e70a77a67f: Already exists 47131d69f1dc: Already exists 19daf424e5d8: Already exists 5322aec81e23: Already exists 16a26c18dedd: Already exists ac80ca087bb3: Already exists 8096f15a3408: Already exists Digest: sha256:9aa6cf2dc5b4a85230b3f224077cb627b974f9d9dc82a5b16473e2158976f9fe Status: Downloaded newer image for paketobuildpacks/builder-jammy-base:latest latest: Pulling from paketobuildpacks/run-jammy-base Digest: sha256:8239d931b73e87afc5c9f446d89f6cc225bc0c4d0aed80c98312636e90254b28 Status: Image is up to date for paketobuildpacks/run-jammy-base:latest latest: Pulling from paketo-buildpacks/nodejs Digest: sha256:06611429123d91aa5fd893bd03f301b6fdb4ab64b38cab7cafd1cdffe22addbc Status: Image is up to date for gcr.io/paketo-buildpacks/nodejs:latest Warning: Builder is trusted but additional modules were added; using the untrusted (5 phases) build flow 0.20.4: Pulling from buildpacksio/lifecycle 9555f2225fa1: Download complete 3214acf345c0: Download complete 5664b15f108b: Already exists da7816fa955e: Already exists 0bab15eea81d: Already exists 4aa0ea1413d3: Already exists 8ffb3c3cf71a: Already exists 0baecf37abee: Download complete 9aee425378d2: Already exists bfb59b82a9b6: Already exists a62778643d56: Already exists 7c12895b777b: Already exists Digest: sha256:49e5b2a1078b9fb3acaa0a341aa69e527d11b2dbd977809636b224b5264149f5 Status: Downloaded newer image for buildpacksio/lifecycle:0.20.4 ===> ANALYZING [analyzer] Restoring data for SBOM from previous image ===> DETECTING [detector] target distro name/version labels not found, reading /etc/os-release file [detector] target distro name/version labels not found, reading /etc/os-release file [detector] ======== Output: paketo-buildpacks/node-start@2.1.7 ======== [detector] could not find app in /workspace: expected one of server.js | server.cjs | server.mjs | app.js | app.cjs | app.mjs | main.js | main.cjs | main.mjs | index.js | index.cjs | index.mjs [detector] err: paketo-buildpacks/node-start@2.1.7 (1) [detector] ======== Output: paketo-buildpacks/node-start@2.1.7 ======== [detector] could not find app in /workspace: expected one of server.js | server.cjs | server.mjs | app.js | app.cjs | app.mjs | main.js | main.cjs | main.mjs | index.js | index.cjs | index.mjs [detector] err: paketo-buildpacks/node-start@2.1.7 (1) [detector] 4 of 10 buildpacks participating [detector] paketo-buildpacks/ca-certificates 3.8.6 [detector] paketo-buildpacks/node-engine 4.1.15 [detector] paketo-buildpacks/npm-install 1.6.1 [detector] paketo-buildpacks/npm-start 2.0.17 ===> RESTORING [restorer] Restoring metadata for "paketo-buildpacks/ca-certificates:helper" from app image [restorer] Restoring metadata for "paketo-buildpacks/node-engine:node" from app image [restorer] Restoring metadata for "paketo-buildpacks/npm-install:launch-modules" from app image [restorer] Restoring metadata for "paketo-buildpacks/npm-install:npm-cache" from cache [restorer] Restoring data for "paketo-buildpacks/node-engine:node" from cache [restorer] Restoring data for "paketo-buildpacks/npm-install:npm-cache" from cache [restorer] Restoring data for SBOM from cache ===> BUILDING [builder] target distro name/version labels not found, reading /etc/os-release file [builder] [builder] Paketo Buildpack for CA Certificates 3.8.6 [builder] https://github.com/paketo-buildpacks/ca-certificates [builder] Build Configuration: [builder] $BP_EMBED_CERTS false Embed certificates into the image [builder] $BP_ENABLE_RUNTIME_CERT_BINDING true Deprecated: Enable/disable certificate helper layer to add certs at runtime [builder] $BP_RUNTIME_CERT_BINDING_DISABLED false Disable certificate helper layer to add certs at runtime [builder] Launch Helper: Reusing cached layer [builder] Paketo Buildpack for Node Engine 4.1.15 [builder] Resolving Node Engine version [builder] Candidate version sources (in priority order): [builder] -> "" [builder] -> "" [builder] [builder] Selected Node Engine version (using ): 20.15.0 [builder] [builder] Reusing cached layer /layers/paketo-buildpacks_node-engine/node [builder] [builder] Paketo Buildpack for NPM Install 1.6.1 [builder] Resolving installation process [builder] Process inputs: [builder] node_modules -> "Not found" [builder] npm-cache -> "Not found" [builder] package-lock.json -> "Found" [builder] [builder] Selected NPM build process: 'npm ci' [builder] [builder] Executing launch environment install process [builder] Running 'npm ci --unsafe-perm --cache /layers/paketo-buildpacks_npm-install/npm-cache' [builder]
[builder] added 396 packages, and audited 397 packages in 15s [builder]
[builder] 52 packages are looking for funding [builder] run npm fund for details [builder]
[builder] 5 moderate severity vulnerabilities [builder]
[builder] To address all issues (including breaking changes), run: [builder] npm audit fix --force [builder]
[builder] Run npm audit for details. [builder] Completed in 15.709s [builder] [builder] Configuring launch environment [builder] NODE_PROJECT_PATH -> "/workspace" [builder] NPM_CONFIG_LOGLEVEL -> "error" [builder] PATH -> "/layers/paketo-buildpacks_npm-install/launch-modules/node_modules/.bin_local:$PATH:/layers/paketo-buildpacks_npm-install/launch-modules/node_modules/.bin" [builder] [builder] Generating SBOM for /layers/paketo-buildpacks_npm-install/launch-modules [builder] Completed in 938ms [builder] [builder] [builder] Paketo Buildpack for NPM Start 2.0.17 [builder] Assigning launch processes: [builder] web (default): sh /workspace/start.sh [builder] ===> EXPORTING [exporter] Reusing layer 'paketo-buildpacks/ca-certificates:helper' [exporter] Reusing layer 'paketo-buildpacks/node-engine:node' [exporter] Adding layer 'paketo-buildpacks/npm-install:launch-modules' [exporter] Adding layer 'buildpacksio/lifecycle:launch.sbom' [exporter] Added 1/1 app layer(s) [exporter] Adding layer 'buildpacksio/lifecycle:launcher' [exporter] Reusing layer 'buildpacksio/lifecycle:config' [exporter] Reusing layer 'buildpacksio/lifecycle:process-types' [exporter] Adding label 'io.buildpacks.lifecycle.metadata' [exporter] Adding label 'io.buildpacks.build.metadata' [exporter] Adding label 'io.buildpacks.project.metadata' [exporter] Setting default process type 'web' [exporter] Saving ferrymul/btp-invoicing... [exporter] *** Images (2701d6372716): [exporter] ferrymul/btp-invoicing [exporter] Reusing cache layer 'paketo-buildpacks/node-engine:node' [exporter] Adding cache layer 'paketo-buildpacks/node-engine:node' [exporter] Adding cache layer 'paketo-buildpacks/npm-install:npm-cache' [exporter] Reusing cache layer 'buildpacksio/lifecycle:cache.sbom' [exporter] Adding cache layer 'buildpacksio/lifecycle:cache.sbom' Successfully built image ferrymul/btp-invoicing

btp-invoicing@1.0.0 push:docker cross-var docker push $npm_config_image_name

Using default tag: latest The push refers to repository [docker.io/ferrymul/btp-invoicing] 83d85471d9f8: Layer already exists 8e827bce1aa6: Layer already exists aa2652d0431c: Layer already exists 4387013eb05e: Layer already exists a76fa9095040: Layer already exists b49e841d55e3: Pushed 03214f74937d: Layer already exists 9b593b855e76: Pushed f7cf50b553e2: Pushed 3d80b447c871: Layer already exists 579a55e1e1bd: Layer already exists e151f26c9e1b: Pushed latest: digest: sha256:2701d6372716a38a8073093190385c6a3b00114917ab462d797ee98cf04a8f6b size: 2182

btp-invoicing@1.0.0 deploy:kyma cross-var helm upgrade --install btp-invoicing ./chart --namespace=$npm_config_namespace

WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /Users/ferrymul/.kube/kubeconfig--garden-kyma--c035588-external.yaml WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /Users/ferrymul/.kube/kubeconfig--garden-kyma--c035588-external.yaml Release "btp-invoicing" does not exist. Installing it now. Error: unable to build kubernetes objects from release manifest: resource mapping not found for name: "btp-invoicing-srv" namespace: "" from "": no matches for kind "PodDisruptionBudget" in version "policy/v1beta1" ensure CRDs are installed first

jmsrpp commented 1 week ago

Hi Ferry,

Please check that docker is running:

Cannot connect to the Docker daemon

Seems to be an error with reaching docker, which is required for the build.

Jim Rapp @.***

On Nov 13, 2024, at 6:59 AM, Ferry Mulyadi @.***> wrote:

Cannot connect to the Docker daemon

ferrymul7 commented 1 week ago

@jmsrpp , thank you for the prompt response. The Docker issue is already resolved, i restarted it, and then repeat the same command, and the build was successful, but now with error below. Pls advise.

Release "btp-invoicing" does not exist. Installing it now. Error: unable to build kubernetes objects from release manifest: resource mapping not found for name: "btp-invoicing-srv" namespace: "" from "": no matches for kind "PodDisruptionBudget" in version "policy/v1beta1" ensure CRDs are installed first

jmsrpp commented 1 week ago

Hi,Looks like there’s a change needed in:https://github.com/SAP-samples/btp-create-api-integrations/blob/stripe/btp-invoicing/chart/charts/web-application/templates/pod-disruption-budget.yamlPlease change policy/v1beta to policy/v1 as per:Fixing error: no matches for kind "PodDisruptionBudget" in version "policy/v1beta1"hunj.devLet me know if it works and feel free to submit a PR for the fix. Jim @. Nov 13, 2024, at 10:25 AM, Ferry Mulyadi @.> wrote: @jmsrpp , thank you for the prompt response. The Docker issue is already resolved, i restarted it, and then repeat the same command, and the build coming through, but now with error below. Pls advise. Release "btp-invoicing" does not exist. Installing it now. Error: unable to build kubernetes objects from release manifest: resource mapping not found for name: "btp-invoicing-srv" namespace: "" from "": no matches for kind "PodDisruptionBudget" in version "policy/v1beta1" ensure CRDs are installed first

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

jmsrpp commented 1 week ago

Reference is:

https://hunj.dev/no-matches-for-kind-poddisruptionbudget-in-version-policy-v1beta1/