ibm-cloud-architecture / devops-demo-pipelines

1 stars 5 forks source link

Unable to patch the kabanero instance #19

Closed oiricaud closed 4 years ago

oiricaud commented 4 years ago

The current issue is that we are deleting the kabanero custom resource.

oc delete kabanero kabanero -o json

hollisc commented 4 years ago

Issue: When a new tar is generated containing new and/or updates to existing Tekton Pipelines / Tasks resources, the Kabanero instance running in the cluster (by default it is created in the "kabanero" namespace) will need to be updated to reference the new tar file. The way to update the existing Kabanero instance should be to patch the resource to ref the new tar.

For example, the following yaml snippet is from the kabanero instance by default.

` stacks: pipelines:

To resolve this, we need to figure out the kubectl patch cmd required to update the existing resource in the pipeline.

oiricaud commented 4 years ago

Resolved this issue with @andrew-suh by running the following command.

oc patch Kabanero/kabanero -p '{"spec":{"stacks":{"pipelines":['$(cat ./json/add_pipeline_modified_template_2.json)']}}}' --type=merge --loglevel=9

oiricaud commented 4 years ago

You can view the pull request here. Also moved the artifactory-package-release-update-pl from experimental to incubator https://github.com/ibm-cloud-architecture/devops-demo-kabanero-pipelines/pull/21