Skip to content

Commit

Permalink
handling insecure connections
Browse files Browse the repository at this point in the history
  • Loading branch information
surya9839 committed Sep 4, 2024
1 parent 2bf42db commit 36caeb6
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 3 deletions.
4 changes: 4 additions & 0 deletions cis-k8s-job/templates/cis-corn-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ spec:
value: {{ .Values.accuknox.tenantId | quote}}
- name: URL
value: {{ .Values.accuknox.url }}
- name: CERT_BUNDLE_URL
value: {{ .Values.accuknox.certBundleURL }}
- name: USE_INSECURE_CONNECTION
value: {{ .Values.accuknox.useInsecureConnection | quote }}
volumeMounts:
- mountPath: /data
name: datapath
Expand Down
1 change: 1 addition & 0 deletions k8s-risk-assessment-job/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ accuknox:
clusterID: 0
label: ""
secretName: ""

6 changes: 5 additions & 1 deletion k8tls-job/templates/k8tls-cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
containers:
- image: accuknox/accuknox-job:latest
command: ["/bin/sh", "-c"]
args: ['curl --location --request POST "https://${URL}/api/v1/artifact/?tenant_id=${TENANT_ID}&data_type=K8TLS&save_to_s3=false" --header "Tenant-Id: ${TENANT_ID}" --header "Authorization: Bearer ${AUTH_TOKEN}" --form "file=@\"/data/report.json\"" && cat /data/report.json']
args: ['./curl_command.sh']
name: k8tls-job
resources: {}
env:
Expand All @@ -56,6 +56,10 @@ spec:
value: {{ if ne .Values.accuknox.clusterName "" }}{{ .Values.accuknox.clusterName }}{{ else }}{{ "default" }}{{ end }}
- name: LABEL_NAME
value: {{ if ne .Values.accuknox.label "" }}{{ .Values.accuknox.label }}{{ else }}{{ "default" }}{{ end }}
- name: CERT_BUNDLE_URL
value: {{ .Values.accuknox.certBundleURL }}
- name: USE_INSECURE_CONNECTION
value: {{ .Values.accuknox.useInsecureConnection | quote }}
volumeMounts:
- mountPath: /data
name: datapath
Expand Down
6 changes: 5 additions & 1 deletion k8tls-job/templates/k8tls-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
containers:
- image: accuknox/accuknox-job:latest
command: ["/bin/sh", "-c"]
args: ['curl --location --request POST "https://${URL}/api/v1/artifact/?tenant_id=${TENANT_ID}&data_type=K8TLS&save_to_s3=false" --header "Tenant-Id: ${TENANT_ID}" --header "Authorization: Bearer ${AUTH_TOKEN}" --form "file=@\"/data/report.json\"" && cat /data/report.json']
args: ['./curl_command.sh']
name: k8tls-job
resources: {}
env:
Expand All @@ -26,6 +26,10 @@ spec:
value: {{ if ne .Values.accuknox.clusterName "" }}{{ .Values.accuknox.clusterName }}{{ else }}{{ "default" }}{{ end }}
- name: LABEL_NAME
value: {{ if ne .Values.accuknox.label "" }}{{ .Values.accuknox.label }}{{ else }}{{ "default" }}{{ end }}
- name: CERT_BUNDLE_URL
value: {{ .Values.accuknox.certBundleURL }}
- name: USE_INSECURE_CONNECTION
value: {{ .Values.accuknox.useInsecureConnection | quote }}
volumeMounts:
- mountPath: /data
name: datapath
Expand Down
2 changes: 2 additions & 0 deletions k8tls-job/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ accuknox:
clusterName: ""
label: ""
URL: "cspm.demo.accuknox.com"
certBundleURL: "" # Set this for cert URL if needed
useInsecureConnection: false # Set to true if insecure connection is needed
7 changes: 6 additions & 1 deletion kiem-job/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ spec:
mountPath: /data
containers:
- image: accuknox/accuknox-job:latest
command: ['sh', '-c', 'curl --location --request POST "https://${URL}/api/v1/artifact/?tenant_id=${TENANT_ID}&data_type=KIEM&save_to_s3=false&label_id=${LABEL_NAME}" --header "Tenant-Id: ${TENANT_ID}" --header "Authorization: Bearer ${AUTH_TOKEN}" --form "file=@\"/data/report.json\""']
command: ["/bin/sh", "-c"]
args: ['./curl_command.sh']
name: accuknox-kiem-job
resources: {}
env:
Expand All @@ -35,6 +36,10 @@ spec:
value: {{ .Values.accuknox.clusterName }}
- name: LABEL_NAME
value: {{ .Values.accuknox.label | quote}}
- name: CERT_BUNDLE_URL
value: {{ .Values.accuknox.certBundleURL }}
- name: USE_INSECURE_CONNECTION
value: {{ .Values.accuknox.useInsecureConnection | quote }}
volumeMounts:
- mountPath: /data
name: datapath
Expand Down
2 changes: 2 additions & 0 deletions kiem-job/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ accuknox:
cronTab: "30 9 * * *"
clusterName: ""
label: ""
certBundleURL: "" # Set this for cert URL if needed
useInsecureConnection: false # Set to true if insecure connection is needed

0 comments on commit 36caeb6

Please sign in to comment.