Skip to content

Commit edf0192

Browse files
CyberArk(helm): add cyberark-disco-agent Helm chart, build scripts, and E2E test
- introduce cyberark-disco-agent Helm chart with templates, docs, schema, and values - add build and release Makefile modules for ark agent and chart publishing - implement E2E test script for agent deployment and verification - update main.go for ark agent entrypoint - integrate chart build and test targets into main Makefiles - Add image.digest field to values.yaml, schema, and documentation - Update deployment.yaml to use image digest if provided - Pass digest in e2e test and chart upgrade scripts - Output digest variables in release Makefile targets - Add values.linter.exceptions file for chart validation - Add ark-verify target to Makefile for chart verification - Introduce e2e job that runs only for PRs from trusted contributors - Configure job to require secrets and set appropriate permissions - Add steps for repo access, Go setup, caching, and running e2e tests Signed-off-by: Richard Wall <[email protected]>
1 parent 4d53d77 commit edf0192

File tree

21 files changed

+1792
-2
lines changed

21 files changed

+1792
-2
lines changed

.github/workflows/tests.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,48 @@ jobs:
6363
key: downloaded-${{ runner.os }}-${{ hashFiles('klone.yaml') }}-test-unit
6464

6565
- run: make -j test-unit test-helm
66+
env:
67+
ARK_DISCOVERY_API: ${{ vars.ARK_DISCOVERY_API }}
68+
ARK_SUBDOMAIN: ${{ vars.ARK_SUBDOMAIN }}
69+
ARK_USERNAME: ${{ secrets.ARK_USERNAME }}
70+
ARK_SECRET: ${{ secrets.ARK_SECRET }}
71+
72+
# These tests require access to secrets so are only run on PRs from trusted contributors
73+
# (i.e. not from forks)
74+
e2e:
75+
runs-on: ubuntu-latest
76+
timeout-minutes: 15
77+
78+
permissions:
79+
contents: read # needed for checkout
80+
id-token: write # needed for google auth
81+
82+
steps:
83+
- uses: actions/checkout@v4
84+
with:
85+
fetch-depth: 0
86+
87+
- uses: ./.github/actions/repo_access
88+
with:
89+
DEPLOY_KEY_READ_VENAFI_CONNECTION_LIB: ${{ secrets.DEPLOY_KEY_READ_VENAFI_CONNECTION_LIB }}
90+
91+
- id: go-version
92+
run: |
93+
make print-go-version >> "$GITHUB_OUTPUT"
94+
95+
- uses: actions/setup-go@v5
96+
with:
97+
go-version: ${{ steps.go-version.outputs.result }}
98+
99+
- uses: actions/cache@v4
100+
with:
101+
path: _bin/downloaded
102+
key: downloaded-${{ runner.os }}-${{ hashFiles('klone.yaml') }}-test-unit
103+
104+
- run: make -j ark-test-e2e
105+
env:
106+
OCI_BASE: ${{ secrets.OCI_BASE }}
107+
ARK_DISCOVERY_API: ${{ vars.ARK_DISCOVERY_API }}
108+
ARK_SUBDOMAIN: ${{ vars.ARK_SUBDOMAIN }}
109+
ARK_USERNAME: ${{ secrets.ARK_USERNAME }}
110+
ARK_SECRET: ${{ secrets.ARK_SECRET }}

cmd/ark/main.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package main
2+
3+
import "github.com/jetstack/preflight/cmd"
4+
5+
func main() {
6+
cmd.Execute()
7+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: v2
2+
name: cyberark-disco-agent
3+
description: |-
4+
The cyberark-disco-agent connects your Kubernetes or Openshift cluster to CyberArk Discovery and Context.
5+
6+
maintainers:
7+
- name: CyberArk
8+
9+
url: https://cyberark.com
10+
11+
sources:
12+
- https://github.com/jetstack/jetstack-secure
13+
14+
# These versions are meant to be overridden by `make helm-chart`. No `v` prefix
15+
# for the `version` because Helm doesn't support auto-determining the latest
16+
# version for OCI Helm charts that use a `v` prefix.
17+
version: 0.0.0
18+
appVersion: "v0.0.0"

0 commit comments

Comments
 (0)