Skip to content

Commit

Permalink
Merge pull request #6 from Shreyas220/kiem_artifact_api
Browse files Browse the repository at this point in the history
adding artifact api to kiem job
  • Loading branch information
nyrahul authored Mar 29, 2024
2 parents b7d0cd3 + aa1a087 commit 6085b50
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
6 changes: 3 additions & 3 deletions accuknox-cis-k8s/templates/cis-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
containers:
- image: accuknox/accuknox-job:latest
command: ["/bin/sh", "-c"]
args: ["curl --location --request POST 'https://$ENV_URL/api/v1/artifact/?tenant_id=$TENANT_ID&data_type=KB&save_to_s3=true'" --header "Authorization: Bearer $AUTH_TOKEN" --form 'file=@"./data/report.json"']
args: ["curl --location --request POST 'https://cspm.$ENV_URL.accuknox.com/api/v1/artifact/?tenant_id=$TENANT_ID&data_type=KB&save_to_s3=true'" --header "Authorization: Bearer $AUTH_TOKEN" --form 'file=@"./data/report.json"']
name: accuknox-cis-cronjob
resources: {}
env:
Expand All @@ -26,9 +26,9 @@ spec:
- name: CLUSTER_ID
value: {{ .Values.accuknox.clusterId }}
- name: TENANT_ID
value: {{ .Values.accuknox.tenantId }}
value: {{ .Values.accuknox.tenantId | quote}}
- name: ENV_URL
value: {{ .Values.accuknox.envURL }}
value: {{ .Values.accuknox.URL }}
volumeMounts:
- mountPath: /data
name: datapath
Expand Down
2 changes: 1 addition & 1 deletion accuknox-cis-k8s/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ accuknox:
label: ""
clusterId: ""
tenantId: ""
envURL: ""
URL: "dev"
3 changes: 2 additions & 1 deletion accuknox-k8tls-job/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ accuknox:
authToken: "NO-TOKEN-SET"
cronTab: "0 */4 * * *"
clusterName: ""
label: ""
label: ""
URL: "dev"
7 changes: 5 additions & 2 deletions accuknox-kiem-job/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@ spec:
mountPath: /data
containers:
- image: accuknox/accuknox-job:latest
command: ["/bin/sh", "-c"]
args: ["curl www.google.com && echo $AUTH_TOKEN"]
command: ['sh', '-c', 'curl --location --request POST "https://cspm.${URL}.accuknox.com/api/v1/artifact/?tenant_id=${TENANT_ID}&data_type=KIEM&save_to_s3=false" --header "Tenant-Id: ${TENANT_ID}" --header "Authorization: Bearer ${AUTH_TOKEN}" --form "file=@\"/data/report.json\""']
name: accuknox-kiem-cronjob
resources: {}
env:
- name: URL
value: {{ .Values.accuknox.URL }}
- name: TENANT_ID
value: {{ .Values.accuknox.tenantID | quote }}
- name: AUTH_TOKEN
value: {{ .Values.accuknox.authToken }}
- name: CLUSTER_NAME
Expand Down
2 changes: 2 additions & 0 deletions accuknox-kiem-job/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ replicaCount: 1

accuknox:
authToken: "NO-TOKEN-SET"
URL: "dev"
tenantID: ""
cronTab: "0 */6 * * *"
clusterName: ""
label: ""
Expand Down

0 comments on commit 6085b50

Please sign in to comment.