SAP / cap-operator

CAP Operator manages and automates the lifecycle of multi-tenant SAP Cloud Application Programming Model (CAP) based applications on Kubernetes.
https://sap.github.io/cap-operator/
Apache License 2.0
18 stars 6 forks source link

BUG: Deployment not updated after update in kind: CAPApplicationVersion #55

Closed yemramirezca closed 8 months ago

yemramirezca commented 8 months ago

The kind: CAPApplicationVersion defines different Workloads which in the case of a workload "deploymentDefinition" creates a k8s Resource deployment.

However, when the environment variables or dockerIamge version in the CAPApplicationVersion is updated, the correspondent K8s Deployment is not updated.

Pavan-SAP commented 8 months ago

Hi, The CAPApplicationVersion (CAV) resource is actually immutable and any changes to the spec is prevented by our webhook, which was disabled in your scenario causing the update to go through. We have now also explicitly documented this with PR #57 to ensure this is clear to all consumers.

The only way to modify the env., dockerImage, tag etc.. is to create a new CAV instance with the desired spec and bump up the version field to a higher semver version. This will inform the CAP Operator to trigger an upgrade and use the new version for all relevant tenants as mentioned here: https://sap.github.io/cap-operator/docs/usage/version-upgrade/

Thanks & Regards, Pavan