Skip to content

Adds Kubernetes certificate updater#22

Merged
LDLDL merged 4 commits intomainfrom
dev/k8s-client
Apr 29, 2026
Merged

Adds Kubernetes certificate updater#22
LDLDL merged 4 commits intomainfrom
dev/k8s-client

Conversation

@ExerciseBook
Copy link
Copy Markdown
Contributor

No description provided.

@LDLDL

This comment was marked as resolved.

- Fix nil-deref panic when secret list fails (return err instead of
  logging and continuing into raw.Items)
- Replace Fatal+dead-return pattern with proper error propagation;
  per-secret failures no longer kill the whole process
- Fix race between daemon start and certificate fetch by adopting the
  txcCertificateUpdater callback pattern (AddCertToWatchOpt +
  WithCertificateHandlerOption) so the Kubernetes secret is written
  only after the daemon actually delivers a cert, not via polling
- One-shot semantics: WaitGroup per registered secret with 10-minute
  deadline; daemon stopped via defer after all updates complete
- Remove unused appengine.MultiError fields; use errors.Join instead
- Wrap secret Update in retry.RetryOnConflict to handle 409 conflicts
- Skip Update when tls.crt/tls.key bytes are already identical to
  avoid unnecessary pod restarts
- Log Warn (with secret name) when domains are skipped due to allowlist
  mismatch instead of silently continuing
- areDomainsAllowed returns bool instead of error
- parseDomainsAnnotation: lowercase, trim and deduplicate domains
- Use namespace/name as the watch label for clarity
- Fix 'tencent cloud' copy-paste error in KubernetesReplaceCertificate
- CLI: drop bogus nil-checks on pflag pointers, remove pointless
  &emptyStr reassignment, fix StringP with empty short flag
- Add defensive len(os.Args) guard in initCmd
- model.go: use string fields instead of *string; add waitDeadline const
- Add required RBAC comment
@LDLDL LDLDL merged commit 7726a26 into main Apr 29, 2026
@LDLDL LDLDL deleted the dev/k8s-client branch April 30, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants