Skip to content

Send the Vizier ID when requesting Vizier configs from the cloud - #2415

Open
NopeCharon wants to merge 1 commit into
pixie-io:mainfrom
NopeCharon:send-vizier-id-in-config-request
Open

NopeCharon wants to merge 1 commit into
pixie-io:mainfrom
NopeCharon:send-vizier-id-in-config-request

Conversation

@NopeCharon

Copy link
Copy Markdown
Contributor

Summary: Send the Vizier ID when requesting Vizier configs from the cloud

The config manager uses the deploy key in ConfigForVizierRequest to find the Vizier's org and set that org's feature flags in the Vizier YAMLs. Deploy keys are usually deleted once the Vizier is running, so on updates the lookup fails and the feature flags are dropped. The config manager already falls back to finding the org from ConfigForVizierRequest.vizier_id (#1668, #1677), but the operator doesn't send it, because the operator part (#1670) was reverted in #1899.

That revert happened because #1670 waited up to 10 minutes for pl-cluster-secrets to contain the cluster ID. The cloud connector only writes the cluster ID after it registers the Vizier, and the operator deploys the cloud connector, so on a fresh install px deploy hung until the wait timed out.

This PR sends the Vizier ID without waiting. The operator reads cluster-id from pl-cluster-secrets once. If the secret or the key is missing, or the value isn't a valid UUID, it sends no ID, so the initial deploy works the same as before. On updates the ID is available, and the config manager can find the org even after the deploy key is deleted.

generateVizierYAMLsConfig now takes a cloudpb.ConfigServiceClient instead of a gRPC connection, the same way getVizierVersionState takes an ArtifactTrackerClient, so the request can be tested with the generated mock.

Relevant Issues: Fixes #1632

Type of change: /kind bug

Test Plan: Added vizier_controller_test.go to //src/operator/controllers:controllers_test. TestGetVizierID covers a missing secret, a missing cluster-id, an invalid ID and a valid ID. TestGenerateVizierYAMLsConfig_VizierID checks that the request sent to the config service includes the Vizier ID when there is one and leaves it unset on the initial deploy. The update case fails if the VizierID field is not set. go test ./src/operator/controllers/, go vet and golangci-lint v2.3.1 with the repo's .golangci.yaml all pass. I have not run this against a live cluster and cloud.

Changelog Message:

The Vizier operator now sends the Vizier ID to Pixie Cloud when fetching Vizier configs, so per-org feature flags are applied on Vizier updates and not only at deploy time.

The config manager looks up the org of a Vizier from its deploy key to
decide which per-org feature flags to set in the Vizier YAMLs. Deploy
keys are usually deleted once the Vizier is running, so on updates the
lookup fails and the feature flags are silently dropped. The config
manager already falls back to looking up the org from the Vizier ID in
ConfigForVizierRequest, but the operator never sends it.

The operator now reads the Vizier ID from the cluster-id key of the
pl-cluster-secrets secret and includes it in the request. The secret is
populated by the cloud connector after it registers the Vizier, which
happens after the operator deploys the Vizier. The previous attempt at
this (pixie-io#1670) waited for the ID to appear, which blocked initial deploys
for up to 10 minutes and was reverted in pixie-io#1899. This change reads the
secret once and sends no ID when it is missing or invalid, so the
initial deploy behaves exactly as before.

generateVizierYAMLsConfig now takes a ConfigServiceClient instead of a
gRPC connection so that the request can be tested with the generated
mock.

Signed-off-by: NopeCharon <115794254+NopeCharon@users.noreply.github.com>
@NopeCharon
NopeCharon requested a review from a team as a code owner October 27, 2026 07:02

This branch is waiting to be deployed

1 waiting deployment
pr-actions-approval — 43eeba0e Waiting Oct 27, 2026 by NopeCharon via authorize #3147
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.

Vizier feature flags are set only at deploy time

1 participant