Closed isindir closed 3 years ago
Is there a sort of upgrade guide associated with this set of changes? Are both api versions still served or will updating break everything and/or delete existing sopssecrets?
In short, what are the recommended series of steps to upgrade?
@travisghansen , that is distruptive change - depending on your setup it could be more or less involved. In short:
That means - upgrade is a 2 phase disruptive operation - uninstall + remove crd (this should drop all existing managed secrets and sops secrets) and then installation.
I think operationally this is a lot easier when using gitops (not tested). Perhaps I need to think about better upgrade plan in future and introduce managing multiple API versions via conversion webhooks.
@travisghansen just had another thought - may be I can improve following if
:
by applying raw text value if it is not base64 encoded value like it was in the past, just printing our warning - but not having damaging effect on the status of the resource, wdyt ? I need to try it via upgrade as well - if that will work, I'll cook new PR shortly. This way it will potentially be possible to upgrade helm chart over and then gradually fix all the sopssecret objects.
That strategy I mentioned unlikely to work. I have tried following now:
I guess the only nondistruptive way is via scaling down original version of operator and then modifying all managed secrets to become non managed and then upgradeing all re-applying new version of sops objects and removing (now) not managed secrets, so that operator can recreate these.
However I think applying raw value of the not encoded data
field may be still usefull in certain cases.
I’ll do a bit more research/testing myself as well and report back any findings.
I don’t understand the relevance of your last sentence in this case. The new format mimics 100% secret syntax right? data should be pre-encoded and stringData is not pre-endcoded right?
don’t understand the relevance of your last sentence in this case. The new format mimics 100% secret syntax right? data should be pre-encoded and stringData is not pre-endcoded right?
Correct
However I think applying raw value of the not encoded
data
field may be still usefull in certain cases.
sops
object in error state.So with the new release data
can be either base64 or not base64?
So with the new release
data
can be either base64 or not base64?
In case I change if
statement mentioned above, it would have that behaviour, atm it is not.
What this PR does / why we need it:
This PR introduces #63 - data and stringData
, but instead of mapping:
sops:data -> secret:stringData
sops:binaryData -> secret:data
it does 1-to-1 mapping:
sops:data -> secret:data
sops:stringData -> secret:stringData
in
sops
definition both can be combined.Suspend feature
Introduces
sops:spec.suspend
boolean flag to disable given sops object reconciliation (by example from FluxV2 types)