-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #307 from ropable/master
Add def save_tracertrak_feed function, mgmt command, Kustomize cronjob, bump dependency minor versions
- Loading branch information
Showing
20 changed files
with
623 additions
and
394 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,15 +77,18 @@ jobs: | |
# Run vulnerability scan on built image | ||
#---------------------------------------------- | ||
- name: Run Trivy vulnerability scanner | ||
uses: aquasecurity/trivy-action@master | ||
uses: aquasecurity/[email protected] | ||
env: | ||
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db | ||
with: | ||
scan-type: 'image' | ||
scan-type: "image" | ||
scanners: "vuln" | ||
image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
vuln-type: 'os,library' | ||
severity: 'HIGH,CRITICAL' | ||
format: 'sarif' | ||
output: 'trivy-results.sarif' | ||
vuln-type: "os,library" | ||
severity: "HIGH,CRITICAL" | ||
format: "sarif" | ||
output: "trivy-results.sarif" | ||
- name: Upload Trivy scan results to GitHub Security tab | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: 'trivy-results.sarif' | ||
sarif_file: "trivy-results.sarif" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
kustomize/overlays/prod/cronjobs/harvest-tracertrak/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ../../../../template | ||
nameSuffix: -harvest-tracertrak | ||
patches: | ||
- target: | ||
kind: CronJob | ||
name: resourcetracking-cronjob | ||
path: patch.yaml | ||
- target: | ||
kind: CronJob | ||
name: resourcetracking-cronjob | ||
options: | ||
allowNameChange: true | ||
patch: |- | ||
- op: replace | ||
path: /spec/jobTemplate/spec/template/spec/containers/0/name | ||
value: resourcetracking-cronjob-harvest-tracertrak |
37 changes: 37 additions & 0 deletions
37
kustomize/overlays/prod/cronjobs/harvest-tracertrak/patch.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
apiVersion: batch/v1 | ||
kind: CronJob | ||
metadata: | ||
name: resourcetracking-cronjob | ||
spec: | ||
schedule: "*/2 * * * *" | ||
jobTemplate: | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: resourcetracking-cronjob | ||
imagePullPolicy: IfNotPresent | ||
args: ["manage.py", "harvest_tracertrak_feed"] | ||
env: | ||
- name: DATABASE_URL | ||
valueFrom: | ||
secretKeyRef: | ||
name: resourcetracking-env-prod | ||
key: DATABASE_URL | ||
- name: TRACERTRAK_URL | ||
valueFrom: | ||
secretKeyRef: | ||
name: resourcetracking-env-prod | ||
key: TRACERTRAK_URL | ||
- name: TRACERTRAK_AUTH_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
name: resourcetracking-env-prod | ||
key: TRACERTRAK_AUTH_TOKEN | ||
- name: SENTRY_DSN | ||
valueFrom: | ||
secretKeyRef: | ||
name: resourcetracking-env-prod | ||
key: SENTRY_DSN | ||
- name: SENTRY_ENVIRONMENT | ||
value: "prod" |
Oops, something went wrong.