feat: add tailscale network ingress provisioner - #5924
Conversation
|
|
Running ultrareview automatically — Adds a 1,500-line Kubernetes lifecycle provisioner with Tailscale integration, handling credentials, NetworkPolicies, and ownership-sensitive apply/delete ordering — a subtle bug could orphan resources or break network security.. I'll post findings when complete. |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Ultrareview completed in 12m 49s
All reported issues were addressed across 6 files
Linked issue analysis
Linked issue: AIS-605: Tailscale Kubernetes resource provisioner
| Status | Acceptance criteria | Notes |
|---|---|---|
| ✅ | Provide a provider-neutral NetworkIngressProvisioner with Apply, Observe, and Delete, plus provider registry dispatch. | The shared interface, desired state, persisted resource identities, registry, and Tailscale adapter are implemented. |
| ✅ | Generate stable resource names solely from the ingress UUID and persist/validate all resource identities. | Names are deterministically derived from the UUID, contain no organization/customer data, and are round-tripped through JSON persistence. |
| ✅ | Use typed Kubernetes clients for core resources and a dynamic client with pinned tailscale.com/v1alpha1 resources for Tailnet, ProxyGroup, and ProxyGroupPolicy. | The adapter uses typed clients for the listed Kubernetes resources and pinned dynamic GVRs without vendor Go types. |
| Apply resources in the specified dependency order: OAuth Secret, Tailnet, ProxyGroup, attestor workload/Service, policies, then Ingress. | The implementation applies the OAuth Secret after namespace and NetworkPolicies, so it does not follow the issue's stated ordering exactly, although the remaining major dependencies and final Ingress ordering are implemented. | |
| ✅ | Observe Tailnet, ProxyGroup, attestor, and Ingress readiness and report the final HTTPS hostname. | Observe checks Tailnet and ProxyGroup conditions, Deployment availability, Ingress hostname, and expected-host convergence before reporting online. |
| ✅ | Delete using persisted names in reverse dependency order, tolerate absent resources, and protect against unowned resources. | Deletion uses NetworkIngressResourceNames verbatim, ignores not-found responses, continues after individual failures, and verifies ownership before cleanup. |
| ✅ | Handle immutable ProxyGroup replacement, partial apply, redacted errors, and the required fake-client test coverage. | Immutable replacement is retryable, partial failures return bounded status codes, credentials are parsed only by the adapter, and tests cover idempotency, partial failure, observe, replacement, deletion, absent resources, and redaction. |
| ✅ | Enforce cross-namespace policy and per-ProxyGroup isolation consistent with the Phase 0 contract. | NetworkPolicies constrain attestor ingress to the selected ProxyGroup and isolate proxy egress to the corresponding attestor and allowed destinations; tests verify the key selectors. |
Tip: instead of fixing issues one by one fix them all with cubic
Re-trigger cubic
|
Addressed all 15 actionable findings from @cubic-dev-ai’s review in commit |
30dbba9 to
bc195c6
Compare
bc195c6 to
60dbbeb
Compare
60dbbeb to
60d5743
Compare
Why
Private ingress needs a provider-neutral Kubernetes lifecycle contract before Temporal orchestration can safely create or tear down Tailscale resources. This checkpoint implements that resource boundary without adding customer APIs or workflows.
Stacked on #5923.
What changed
NetworkIngressProvisionerApply/Observe/Delete contracts, UUID-derived persisted resource identities, provider registry dispatch, and bounded lifecycle telemetry.tailscale.com/v1alpha1Tailnet, ProxyGroup, and ProxyGroupPolicy resources.Review notes
Validation
mise run test:server ./internal/k8s(36 tests)mise lint:servermise build:servergit diff --checkcubic review -jcould not complete because local Cubic authentication is expired (cubic auth loginrequired)Summary by cubic
Adds the provider-neutral
NetworkIngressProvisionercontract from AIS-605 with a working Tailscale adapter, so Temporal orchestration can safely create and tear down private ingress resources. No customer-facing APIs or workflows are added yet.Provisioner contract
Tailscale adapter
Temporal orchestration, health, rotation, and tombstones remain in AIS-611.
Written for commit 60d5743. Summary will update on new commits.