Skip to content

NGTS: Various further updates and fixes#790

Open
SgtCoDFish wants to merge 9 commits intomasterfrom
helm-chart-updates
Open

NGTS: Various further updates and fixes#790
SgtCoDFish wants to merge 9 commits intomasterfrom
helm-chart-updates

Conversation

@SgtCoDFish
Copy link
Copy Markdown
Contributor

@SgtCoDFish SgtCoDFish commented Apr 16, 2026

This PR mostly fixes up comments, errors and test setup. Each individual commit should be self-descriptive.

This also adds the discovery-agent to the release process.

IMPORTANT: This fixes the ngts-e2e test and adds the possibility to run it in CI but restricts it via a label - it seems the dev API endpoints are blocked from github actions runners currently and the test just hangs and dies for that reason.

I have run the e2e test locally and had success - but I don't think we can enable the test on every PR until we have a stable test tenant which is publicly accessible.

The comments for the helper function were incorrect, so fix them
so it doesn't seem like this repo is part of the cert-manager org.

Also removes image.registry - no point supporting a deprecated field
on a brand new chart

Signed-off-by: Ashley Davis <ashley.davis@cyberark.com>
also moves the config block to the top

Signed-off-by: Ashley Davis <ashley.davis@cyberark.com>
Signed-off-by: Ashley Davis <ashley.davis@cyberark.com>
Signed-off-by: Ashley Davis <ashley.davis@cyberark.com>
Signed-off-by: Ashley Davis <ashley.davis@cyberark.com>
This fails in GHA currently, likely due to IP restrictions. As such,
it's opt-in

Signed-off-by: Ashley Davis <ashley.davis@cyberark.com>
Signed-off-by: Ashley Davis <ashley.davis@cyberark.com>
Signed-off-by: Ashley Davis <ashley.davis@cyberark.com>
Copy link
Copy Markdown
Contributor Author

@SgtCoDFish SgtCoDFish left a comment

Choose a reason for hiding this comment

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

self-review comments!

# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
# Configuration for the Discovery Agent
config:
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

note: this config section is just moved from below; it makes sense to have it at the top of the file since these are the most important options. The only other changes are to comments and to the type of tsgID

data-gatherers:
- kind: k8s-discovery
name: ngts/discovery
name: k8s/discovery
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

note: this fixes something claude introduced. The disco-agent uses the ark prefix because it collects fundamentally different data to the venafi-kubernetes-agent.

Claude copied the idea of a different prefix, but it doesn't really gain us anything so I reverted here. This file should be very similar to the venafi-kubernetes-agent configmap

Comment on lines +65 to +66
Util function for generating an image reference based on the provided options.
This function is derived from similar functions used in the cert-manager GitHub organization
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

note: replacing a copy-paste comment with one for this repo specifically!

Comment on lines -88 to -93
{{- /*
Backwards compatibility: if image.registry is set, additionally prefix the repository with this registry.
*/ -}}
{{- if $image.registry -}}
{{- $repository = printf "%s/%s" $image.registry $repository -}}
{{- end -}}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

note: I see no reason to have this backwards compat shim in a brand new chart, so I removed it for simplicity.

ARK_USERNAME: ${{ secrets.ARK_USERNAME }}
ARK_SECRET: ${{ secrets.ARK_SECRET }}

ngts-test-e2e:
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

note: it makes sense to me to add this here gated behind a label.

I added the required variables to this repo already (NGTS_CLIENT_ID, etc) - but this test doesn't pass. I think it's because the relevant dev environment has IP address restrictions which github actions runners are falling foul of.

I don't think we should block this PR on the test passing - I've confirmed locally that the test can pass, I just don't think for now it will pass.

Ideally in the future when we have a stable prod environment for testing, we'll be able to point this test there.

run: |
# Generate a timestamp in the format YYMMDD-HHMMSS.
# Extracting from PR name would require sanitization due to GKE cluster naming constraints
# Extracting from PR name would require sanitization due to GKE cluster naming constraints
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

note: simply removing trailing whitespace

Comment thread hack/ngts/test-e2e.sh
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

note: this script was never run before it originally merged, so the state it was in before this PR was filled with guesses

This gets around corporate MitM

Signed-off-by: Ashley Davis <ashley.davis@cyberark.com>
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.

1 participant