tall-library-51128
05/18/2023, 6:41 PMspec.strategy
is RollingUpdate
. I want to conditionally change the it to Recreate
on some resources. If I try to run it I get: spec.strategy.rollingUpdate: Forbidden: may not be specified when strategy type is 'Recreate'
I tried (using Python):
• using `replace_on_changes=['spec.strategy']`with no luck.
• to create an extra label mapped to the strategy value, in this case replace_on_changes=['metadata.labels.strategy']
works if spec.strategy.type='Recreate'
is not set. If I set it, I go back to the same error.
• I've tried to use a Patch resource but ran into the same issue.
Has anyone ran into this ?
Thanks!curved-kitchen-24115
05/18/2023, 11:50 PMstrategy.rollingUpdate
to null / None.tall-library-51128
05/19/2023, 7:34 AMNone
and ran into the same error, it's odd (and a bit frustrating)spec:
strategy:
$retainKeys:
- type
type: Recreate
Explaining that With this patch, we indicate that we want to retain only the type key of the strategy object. Thus, the rollingUpdate will be removed during the patch operation.
Is there any way we can achieve the same using pulumi_kubernetes
?