Skip to content

Add Persys Go SDK scaffold - #24

Closed
miladhzzzz wants to merge 4 commits into
mainfrom
codex/implement-persys-go-sdk
Closed

miladhzzzz wants to merge 4 commits into
mainfrom
codex/implement-persys-go-sdk

Conversation

@miladhzzzz

Copy link
Copy Markdown
Member

Motivation

  • Provide a single reusable Go SDK for Persys Cloud so persysctl can become a thin CLI and client logic is centralized.
  • Support both gRPC and HTTP transports and integrate with the existing pkg/certmanager TLS flow to match current persysctl behavior.
  • Include manifest ingestion and GitOps watch helpers to enable stack/git-based workflows and future features (metrics, drain/taint, etc.).

Description

  • Add a new sdk Go module with public entry points (sdk.New, sdk.DefaultOptions) and packages: client, options, types, ingestion, and gitops (core scaffolding and README).
  • Implement a core client.Client with gRPC and lazy HTTP transport selection, context-aware wrappers for existing controlv1 APIs, Close(), and %w-style error wrapping (sdk/client/client.go).
  • Integrate TLS using the shared pkg/certmanager behavior in LoadTLSConfig, supporting insecure mode, certmanager validation, client cert loading, and CA pool setup (sdk/client/certs.go).
  • Add ingestion helpers for YAML/JSON/Docker Compose and Git URL detection (sdk/ingestion), and a GitOps watcher for local fs events (fsnotify) and remote repo polling via git pull (sdk/gitops/watcher.go).
  • Add lightweight SDK-only types (sdk/types) and unit tests for New() and LoadTLSConfig behavior (sdk/client/client_test.go).

Testing

  • Ran go test ./... in the new module, which passed (client tests executed; other packages had no test files).
  • Built the module with go build ./..., which completed successfully.

Codex Task

@miladhzzzz miladhzzzz added the enhancement New feature or request label Jun 25, 2026
@miladhzzzz miladhzzzz self-assigned this Jun 25, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9d3915a7dd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread sdk/client/client.go Outdated
Comment thread sdk/options/options.go Outdated
@miladhzzzz
miladhzzzz requested a review from parmisk80 June 25, 2026 13:12

@parmisk80 parmisk80 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/LGTM

@miladhzzzz

Copy link
Copy Markdown
Member Author

Documentation needs updating before merge can happen

@miladhzzzz miladhzzzz closed this Jun 29, 2026
@miladhzzzz
miladhzzzz deleted the codex/implement-persys-go-sdk branch June 30, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants