-
Notifications
You must be signed in to change notification settings - Fork 39
add delete working cert strategy #807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: remote-agent
Are you sure you want to change the base?
add delete working cert strategy #807
Conversation
fix go mod redis queue delete contains get & fix cert manager bug add cert manager add nil check for log add double check for cert manager
4692f2c to
7d2a41a
Compare
| err = c.waitForCertificateReady(ctx, id, namespace, secretName) | ||
| if err != nil { | ||
| tLog.ErrorfCtx(ctx, "V (Targets) : onGetCert failed waiting for certificate - %s", err.Error()) | ||
| _, getErr := c.TargetsManager.StateProvider.Get(ctx, getRequest) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we have cert manager now, we should use cert manager also in targets-vendor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, Yes, we should use cert manager in target vendor too. I fix it now
fix fix function
596e871 to
bb93566
Compare
|
|
||
| type CertManager struct { | ||
| managers.Manager | ||
| StateProvider states.IStateProvider |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should use IStateProvider and ISecretProvider here. It is better you need to define ICertProvider interface, it has some functions such as CreateCert, DeleteCert, RotateCert.
And for OSSCertManager implementation, let's call it OSSCMCertProvider, it should hold a kubeclient, instead of using IStateProvider and ISecretProvider.
If you want to switch to another way to manage cert, it is impossible you just change IStateProvider and ISecretProvider.
And let solution-manager to expose certprovider to vendor.
Delete redis queue log
{"caller":"github.com/eclipse-symphony/symphony/api/pkg/apis/v1alpha1/managers/solution.(*SolutionManager).cleanupRemoteTargetResourcesAfterDeletion:324","diagnostics":{"correlationId":"","resourceId":"","traceContext":{"spanId":"39cb97f9f8b1ef58","traceId":"82c8d633331402da3eb3e8a3f33272c0"}},"instance":"symphony-api-86d764ffc-m6m9l","level":"info","msg":" M (Solution): successfully deleted Redis queue test-mqtt-schedule-windows-target-default for deleted target test-mqtt-schedule-windows-target","scope":"coa.runtime","time":"2025-09-05T09:31:25.076090323Z","type":"log","ver":"0.48.34"}
Unsubscribe topic log
{"caller":"github.com/eclipse-symphony/symphony/api/pkg/apis/v1alpha1/managers/solution.(*SolutionManager).cleanupRemoteTargetResourcesAfterDeletion:314","diagnostics":{"correlationId":"","resourceId":"","traceContext":{"spanId":"39cb97f9f8b1ef58","traceId":"82c8d633331402da3eb3e8a3f33272c0"}},"instance":"symphony-api-86d764ffc-m6m9l","level":"info","msg":" M (Solution): successfully unsubscribed from MQTT topic symphony/request/test-mqtt-schedule-windows-target for deleted target test-mqtt-schedule-windows-target","scope":"coa.runtime","time":"2025-09-05T09:31:25.069574951Z","type":"log","ver":"0.48.34"}
delete working cert log
{"caller":"github.com/eclipse-symphony/symphony/api/pkg/apis/v1alpha1/managers/cert.(*CertManager).DeleteWorkingCert:189","diagnostics":{"correlationId":"f84c5a3d-d18b-4805-b783-2d10ad670f45","resourceId":"","traceContext":{"spanId":"5c29b5dfc7145ae6","traceId":"95e10eecb525eb0cef3707320447f98c"}},"instance":"symphony-api-86d764ffc-m6m9l","level":"info","msg":"Deleting working cert for target test-mqtt-schedule-windows-target in namespace default","scope":"coa.runtime","time":"2025-09-05T09:31:05.146110303Z","type":"log","ver":"0.48.34"}
{"caller":"github.com/eclipse-symphony/symphony/api/pkg/apis/v1alpha1/providers/states/k8s.(*K8sStateProvider).Delete:463","diagnostics":{"correlationId":"f84c5a3d-d18b-4805-b783-2d10ad670f45","resourceId":"","traceContext":{"spanId":"76b76c42b6650d99","traceId":"95e10eecb525eb0cef3707320447f98c"}},"instance":"symphony-api-86d764ffc-m6m9l","level":"info","msg":" P (K8s State): delete state test-mqtt-schedule-windows-target in namespace default","scope":"coa.runtime","time":"2025-09-05T09:31:05.14614496Z","type":"log","ver":"0.48.34"}