miki3421 opened a new pull request, #43: URL: https://github.com/apache/openserverless-cli/pull/43
## Summary - replace the destructive strategic merge patch used by `ops config sso disable` with targeted JSON Patch operations - preserve unrelated `env`, `envFrom`, volumes, volume mounts, and annotations on the admin-api StatefulSet - make disable idempotent and avoid an unnecessary explicit rollout restart - preserve unrecognized local `SSO_*` configuration keys - document the exact Kubernetes resources and values owned by the SSO command ## Root cause The previous disable implementation sent `envFrom: null` for the selected admin-api container. Kubernetes therefore removed the complete `envFrom` list, including ConfigMap and Secret references installed by other components. The enable path also replaced the complete list. The new implementation reads the StatefulSet and adds or removes only exact, prefix-free references to the ConfigMap and Secret managed by `ops config sso`. JSON Patch `test` operations guard removals so a concurrent list change cannot make the command remove the wrong entry. ## Behavior - missing managed ConfigMaps and Secrets remain non-errors through `--ignore-not-found` - a repeated disable does not patch or roll out the StatefulSet - `--no-rollout` skips rollout waiting and does not issue a restart - the pod-template change caused by removing `envFrom` references starts the required Kubernetes rollout without adding a redundant restart annotation ## Validation - `go test -count=1 ./...` - `go test -race ./config` - `go vet ./config` - `go build ./cmd/ops` - `git diff --check` Tests cover unrelated direct environment variables, unrelated ConfigMap and Secret `envFrom` references, unrelated volumes and mounts, repeated disable, and the complete `enable -> disable -> enable` cycle. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
