splunk / splunk-operator

Splunk Operator for Kubernetes
Other
206 stars 114 forks source link

App Framework: How do I change addon filename after it is already deployed so that it can upgrade without a problem?? #1105

Open chipzzz opened 1 year ago

chipzzz commented 1 year ago

Please select the type of request

Bug

Tell us more

Splunk Operator Version: 2.1.1 Splunk Version: 9.0.2

Describe the request I have appframework referencing addon .tgz packages with their suffixed _$version. This of course becomes problematic when trying to upgrade the addon. I made a mistake of using the file names with the new _$version suffixed. I would like to have the operator reference a new file addon .tgz package without the suffxed _$version . I have tried everything:

What are the non-invasive steps to have the operator use the new file package without suffixed versions, so that it checks against the new file rather than trying to check against old artifact files? This way I can go back to each addon having the same file name and I can then easily upgrade the addons. Otherwise addons cannot be upgraded as the operator I believe doesn't recognize them as upgradable.

Expected behavior The operator refrences new non suffixed file name and is able to upgrade the existing addon deployed on various splunk components.

Splunk setup on K8S Splunk is set up on-prem k8's cluster

Reproduction/Testing steps Install addon through appframework with version suffixed. Install the same addon with a newer version suffixed. Point appfrmework to a newer version. The addon will not upgrade!

Now try to fix this by removing suffixed version and simply use non suffix version in hopes of fixing the problem for future upgrades when the same name should be used instead of suffixed name. It doesn't work!

sgontla commented 1 year ago

HI @chipzzz, Can you confirm, if the underlying directory structure also has the _version? OR it is just the package tar ball, that has the version extension?

chipzzz commented 1 year ago

@sgontla just the package tar ball.

chipzzz commented 1 year ago

@sgontla and actually at least for now the operator only is having problems with the standalone, for every single app .

2023-03-07T20:44:19.975645488Z  INFO    transitionWorkerPhase   Installation was already in progress for replica members        {"controller": "standalone", "controllerGroup": "enterprise.splunk.com", "controllerKind": "Standalone", "Standalone": {"name":"security","namespace":"splunk"}, "namespace": "splunk", "name": "security", "reconcileID": "7fa081a4-20ce-462a-92b2-8d5516b58482", "name": "security", "namespace": "splunk", "App name": "wiz-add-on-for-splunk_108.tgz", "digest": "5f396a0622432b55467b9499414ac43f", "pod name": "splunk-security-standalone-0", "current Phase": "download", "next phase": "podCopy"}