-
Notifications
You must be signed in to change notification settings - Fork 24
NGTS: Various further updates and fixes #790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
6cc3e85
83eff39
5d8045e
5dcef20
8826723
812abd5
1bf9682
ffaecaa
9e4e533
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -109,6 +109,41 @@ jobs: | |
| ARK_USERNAME: ${{ secrets.ARK_USERNAME }} | ||
| ARK_SECRET: ${{ secrets.ARK_SECRET }} | ||
|
|
||
| ngts-test-e2e: | ||
| # TEMPORARY: require an explicit label to test NGTS until we have a stable test environment | ||
| if: contains(github.event.pull_request.labels.*.name, 'test-ngts') | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | ||
| # Adding `fetch-depth: 0` makes sure tags are also fetched. We need | ||
| # the tags so `git describe` returns a valid version. | ||
| # see https://github.com/actions/checkout/issues/701 for extra info about this option | ||
| with: { fetch-depth: 0 } | ||
|
|
||
| - uses: ./.github/actions/repo_access | ||
| with: | ||
| DEPLOY_KEY_READ_VENAFI_CONNECTION_LIB: ${{ secrets.DEPLOY_KEY_READ_VENAFI_CONNECTION_LIB }} | ||
|
|
||
| - id: go-version | ||
| run: | | ||
| make print-go-version >> "$GITHUB_OUTPUT" | ||
|
|
||
| - uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 | ||
| with: | ||
| go-version: ${{ steps.go-version.outputs.result }} | ||
|
|
||
| - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | ||
| with: | ||
| path: _bin/downloaded | ||
| key: downloaded-${{ runner.os }}-${{ hashFiles('klone.yaml') }}-test-unit | ||
|
|
||
| - run: make -j ngts-test-e2e | ||
| env: | ||
| OCI_BASE: ${{ secrets.NGTS_OCI_BASE }} | ||
| NGTS_CLIENT_ID: ${{ secrets.NGTS_CLIENT_ID }} | ||
| NGTS_PRIVATE_KEY: ${{ secrets.NGTS_PRIVATE_KEY }} | ||
| NGTS_TSG_ID: ${{ secrets.NGTS_TSG_ID }} | ||
|
|
||
| test-e2e: | ||
| if: contains(github.event.pull_request.labels.*.name, 'test-e2e') | ||
| runs-on: ubuntu-latest | ||
|
|
@@ -149,7 +184,7 @@ jobs: | |
| id: timestamp # Give the step an ID to reference its output | ||
| 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 | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. note: simply removing trailing whitespace |
||
| TIMESTAMP=$(date +'%y%m%d-%H%M%S') | ||
| CLUSTER_NAME="test-secretless-${TIMESTAMP}" | ||
| echo "Generated cluster name: ${CLUSTER_NAME}" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,10 +62,8 @@ Create the name of the service account to use | |
| {{- end }} | ||
|
|
||
| {{/* | ||
| Util function for generating the image URL based on the provided options. | ||
| IMPORTANT: This function is standardized across all charts in the cert-manager GH organization. | ||
| Any changes to this function should also be made in cert-manager, trust-manager, approver-policy, ... | ||
| See https://github.com/cert-manager/cert-manager/issues/6329 for a list of linked PRs. | ||
| 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 | ||
|
Comment on lines
+65
to
+66
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. note: replacing a copy-paste comment with one for this repo specifically! |
||
| */}} | ||
| {{- define "image" -}} | ||
| {{- /* | ||
|
|
@@ -85,12 +83,6 @@ usage through tuple/variable indirection. | |
| {{- $repository := "" -}} | ||
| {{- if $image.repository -}} | ||
| {{- $repository = $image.repository -}} | ||
| {{- /* | ||
| 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 -}} | ||
|
Comment on lines
-88
to
-93
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
| {{- else -}} | ||
| {{- $name := required "ERROR: image.name must be set when image.repository is empty" $image.name -}} | ||
| {{- $repository = $name -}} | ||
|
|
@@ -100,12 +92,6 @@ usage through tuple/variable indirection. | |
| {{- if $imageRegistry -}} | ||
| {{- $repository = printf "%s/%s" $imageRegistry $repository -}} | ||
| {{- end -}} | ||
| {{- /* | ||
| 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 -}} | ||
| {{- end -}} | ||
| {{- $repository -}} | ||
| {{- if and $image.tag $image.digest -}} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,9 +20,9 @@ data: | |
| {{- end }} | ||
| data-gatherers: | ||
| - kind: k8s-discovery | ||
| name: ngts/discovery | ||
| name: k8s/discovery | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| - kind: k8s-dynamic | ||
| name: ngts/secrets | ||
| name: k8s/secrets | ||
| config: | ||
| resource-type: | ||
| version: v1 | ||
|
|
@@ -33,42 +33,42 @@ data: | |
| - type!=bootstrap.kubernetes.io/token | ||
| - type!=helm.sh/release.v1 | ||
| - kind: k8s-dynamic | ||
| name: ngts/jobs | ||
| name: k8s/jobs | ||
| config: | ||
| resource-type: | ||
| version: v1 | ||
| group: batch | ||
| resource: jobs | ||
| - kind: k8s-dynamic | ||
| name: ngts/cronjobs | ||
| name: k8s/cronjobs | ||
| config: | ||
| resource-type: | ||
| version: v1 | ||
| group: batch | ||
| resource: cronjobs | ||
| - kind: k8s-dynamic | ||
| name: ngts/deployments | ||
| name: k8s/deployments | ||
| config: | ||
| resource-type: | ||
| version: v1 | ||
| group: apps | ||
| resource: deployments | ||
| - kind: k8s-dynamic | ||
| name: ngts/statefulsets | ||
| name: k8s/statefulsets | ||
| config: | ||
| resource-type: | ||
| version: v1 | ||
| group: apps | ||
| resource: statefulsets | ||
| - kind: k8s-dynamic | ||
| name: ngts/daemonsets | ||
| name: k8s/daemonsets | ||
| config: | ||
| resource-type: | ||
| version: v1 | ||
| group: apps | ||
| resource: daemonsets | ||
| - kind: k8s-dynamic | ||
| name: ngts/pods | ||
| name: k8s/pods | ||
| config: | ||
| resource-type: | ||
| version: v1 | ||
|
|
||
There was a problem hiding this comment.
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.