Skip to content

[VC-43403] Add Local File output path mode#692

Merged
wallrj-cyberark merged 1 commit intomasterfrom
VC-43403-fix-output-path-mode
Aug 22, 2025
Merged

[VC-43403] Add Local File output path mode#692
wallrj-cyberark merged 1 commit intomasterfrom
VC-43403-fix-output-path-mode

Conversation

@wallrj-cyberark
Copy link
Member

@wallrj-cyberark wallrj-cyberark commented Aug 20, 2025

Changes:

  • Refactored TLSPKMode to a more general OutputMode.
  • Added a new Local File output mode.

Next I'd like to add a MachineHub mode:

Later I'll try and figure how we can allow multiple output modes.

Testing

$ go run . agent    --agent-config-file examples/one-shot-secret.yaml    --one-shot    --output-path output.json
I0822 12:06:42.354685  284845 run.go:58] "Starting" logger="Run" version="development" commit=""
I0822 12:06:42.355219  284845 run.go:116] "Healthz endpoints enabled" logger="Run.APIServer" addr=":8081" path="/healthz"
I0822 12:06:42.355273  284845 run.go:120] "Readyz endpoints enabled" logger="Run.APIServer" addr=":8081" path="/readyz"
I0822 12:06:42.355300  284845 run.go:269] "Pod event recorder disabled" logger="Run" reason="The agent does not appear to be running in a Kubernetes cluster." detail="When running in a Kubernetes cluster the following environment variables must be set: POD_NAME, POD_NODE, POD_UID, POD_NAMESPACE"
I0822 12:06:42.558945  284845 client_file.go:35] "Data saved to local file" logger="Run.gatherAndOutputData.postData" outputPath="output.json"
I0822 12:06:42.558992  284845 run.go:417] "Data sent successfully" logger="Run.gatherAndOutputData.postData"

$ jq  -r '.[] | .data.items[] | .resource.metadata | "\(.namespace)/\(.name)"' < output.json
gmp-system/collection
gmp-system/rules
gmp-system/webhook-tls
team-1/app-0
venafi/cert-manager-approver-policy-tls
venafi/cert-manager-webhook-ca
default/venafi-kubernetes-agent-e2e.a2074131-f85a-48c0-88be-fb1a1d871a3b
gmp-system/alertmanager

@wallrj-cyberark wallrj-cyberark force-pushed the VC-43403-fix-output-path-mode branch from 1c1dbc5 to 03c1459 Compare August 20, 2025 16:57
@wallrj-cyberark wallrj-cyberark marked this pull request as ready for review August 20, 2025 17:03
@wallrj-cyberark wallrj-cyberark force-pushed the VC-43403-fix-output-path-mode branch 2 times, most recently from 8a48f9e to 58f1c9c Compare August 21, 2025 14:50
@wallrj-cyberark wallrj-cyberark changed the base branch from master to revert-some-machinehub-mode August 21, 2025 14:50
@wallrj-cyberark wallrj-cyberark changed the title [VC-43403] Fix output path mode [VC-43403] Add Local FIle output path mode Aug 21, 2025
@wallrj-cyberark wallrj-cyberark marked this pull request as draft August 21, 2025 20:43
Base automatically changed from revert-some-machinehub-mode to master August 22, 2025 08:07
@wallrj-cyberark wallrj-cyberark force-pushed the VC-43403-fix-output-path-mode branch 3 times, most recently from 5306b24 to bcb07ec Compare August 22, 2025 10:40
@wallrj-cyberark wallrj-cyberark marked this pull request as ready for review August 22, 2025 10:43
Signed-off-by: Richard Wall <richard.wall@cyberark.com>
@wallrj-cyberark wallrj-cyberark force-pushed the VC-43403-fix-output-path-mode branch from bcb07ec to 4e5623d Compare August 22, 2025 11:11
@wallrj-cyberark wallrj-cyberark requested a review from inteon August 22, 2025 11:17
@wallrj-cyberark wallrj-cyberark merged commit 57d3435 into master Aug 22, 2025
2 checks passed
@wallrj-cyberark wallrj-cyberark deleted the VC-43403-fix-output-path-mode branch August 22, 2025 12:05
@inteon inteon changed the title [VC-43403] Add Local FIle output path mode [VC-43403] Add Local File output path mode Aug 22, 2025
"agent",
"--one-shot",
// TODO(wallrj): This should not be required when an `--input-file` has been supplied.
"--api-token=should-not-be-required",
Copy link
Member Author

Choose a reason for hiding this comment

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

The JIRA issue for this bug: https://venafi.atlassian.net/browse/VC-37133

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