Skip to content

Commit df72fd9

Browse files
committed
Upgrade trivy operator since the old version has compatability issues with k8s 1.31 in AWS EKS
1 parent f1f901d commit df72fd9

File tree

2 files changed

+45
-27
lines changed

2 files changed

+45
-27
lines changed

modules/trivy-operator/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ spec:
2323
sources:
2424
- repoURL: 'https://aquasecurity.github.io/helm-charts/'
2525
chart: trivy-operator
26-
targetRevision: 0.24.1
26+
targetRevision: 0.26.1
2727
helm:
2828
releaseName: trivy-operator
2929
valueFiles:

modules/trivy-operator/templates/values-trivy-operator.yaml

Lines changed: 44 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,21 @@ targetNamespaces: ""
2020
# mode, i.e. when the targetNamespaces values is a blank string.
2121
excludeNamespaces: ""
2222

23+
# -- extraEnv is a list of extra environment variables for the trivy-operator.
24+
extraEnv: []
25+
26+
# -- hostAliases for `deployment` (TrivyOperator) and `statefulset` (TrivyServer)
27+
28+
hostAliases: []
29+
# - ip: "127.0.0.1"
30+
# hostnames:
31+
# - "foo.local"
32+
# - "bar.local"
33+
# - ip: "10.1.2.3"
34+
# hostnames:
35+
# - "foo.remote"
36+
# - "bar.remote"
37+
2338
# -- targetWorkloads is a comma seperated list of Kubernetes workload resources
2439
# to be included in the vulnerability and config-audit scans
2540
# if left blank, all workload resources will be scanned
@@ -185,8 +200,8 @@ operator:
185200
valuesFromSecret: ""
186201

187202
image:
188-
registry: "ghcr.io"
189-
repository: "aquasecurity/trivy-operator"
203+
registry: "mirror.gcr.io"
204+
repository: "aquasec/trivy-operator"
190205
# -- tag is an override of the image tag, which is by default set by the
191206
# appVersion field in Chart.yaml.
192207
tag: ""
@@ -336,11 +351,11 @@ trivy:
336351
createConfig: true
337352
image:
338353
# -- registry of the Trivy image
339-
registry: ghcr.io
354+
registry: mirror.gcr.io
340355
# -- repository of the Trivy image
341-
repository: aquasecurity/trivy
356+
repository: aquasec/trivy
342357
# -- tag version of the Trivy image
343-
tag: 0.53.0
358+
tag: 0.59.1
344359
# -- imagePullSecret is the secret name to be used when pulling trivy image from private registries example : reg-secret
345360
# It is the user responsibility to create the secret for the private registry in `trivy-operator` namespace
346361
imagePullSecret: ~
@@ -517,8 +532,8 @@ trivy:
517532
serverCustomHeaders: ~
518533
# serverCustomHeaders: "foo=bar"
519534

520-
dbRegistry: "ghcr.io"
521-
dbRepository: "aquasecurity/trivy-db"
535+
dbRegistry: "mirror.gcr.io"
536+
dbRepository: "aquasec/trivy-db"
522537

523538
# -- The username for dbRepository authentication
524539
#
@@ -529,22 +544,22 @@ trivy:
529544
dbRepositoryPassword: ~
530545

531546
# -- javaDbRegistry is the registry for the Java vulnerability database.
532-
javaDbRegistry: "ghcr.io"
533-
javaDbRepository: "aquasecurity/trivy-java-db"
547+
javaDbRegistry: "mirror.gcr.io"
548+
javaDbRepository: "aquasec/trivy-java-db"
534549

535550
# -- The Flag to enable insecure connection for downloading trivy-db via proxy (air-gaped env)
536551
#
537552
dbRepositoryInsecure: "false"
538553

539-
# -- The Flag to enable the usage of builtin rego policies by default, these policies are downloaded by default from ghcr.io/aquasecurity/trivy-checks
554+
# -- The Flag to enable the usage of builtin rego policies by default, these policies are downloaded by default from mirror.gcr.io/aquasec/trivy-checks
540555
#
541556
useBuiltinRegoPolicies: "true"
542557
# -- The Flag to enable the usage of external rego policies config-map, this should be used when the user wants to use their own rego policies
543558
#
544559
externalRegoPoliciesEnabled: false
545560
# -- To enable the usage of embedded rego policies, set the flag useEmbeddedRegoPolicies. This should serve as a fallback for air-gapped environments.
546561
# When useEmbeddedRegoPolicies is set to true, useBuiltinRegoPolicies should be set to false.
547-
useEmbeddedRegoPolicies: "false"
562+
useEmbeddedRegoPolicies: "true"
548563

549564
# -- The Flag is the list of supported kinds separated by comma delimiter to be scanned by the config audit scanner
550565
#
@@ -608,7 +623,6 @@ compliance:
608623
# -- reportType this flag control the type of report generated (summary or all)
609624
reportType: summary
610625
# -- cron this flag control the cron interval for compliance report generation
611-
# At minute 0 past every 6th hour.
612626
cron: 0 */6 * * *
613627
# -- specs is a list of compliance specs to be used by the cluster compliance scanner
614628
# - k8s-cis-1.23
@@ -637,7 +651,7 @@ serviceAccount:
637651
podAnnotations: {}
638652

639653
podSecurityContext: {}
640-
# fsGroup: 2000
654+
# fsGroup: 2000
641655

642656
# -- securityContext security context
643657
securityContext:
@@ -659,13 +673,18 @@ volumes:
659673
- name: cache-policies
660674
emptyDir: {}
661675

662-
resources:
663-
limits:
664-
cpu: 1
665-
memory: 1Gi
666-
requests:
667-
cpu: 100m
668-
memory: 128Mi
676+
resources: {}
677+
# -- We usually recommend not to specify default resources and to leave this as a conscious
678+
# choice for the user. This also increases chances charts run on environments with little
679+
# resources, such as Minikube. If you do want to specify resources, uncomment the following
680+
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
681+
# limits:
682+
# cpu: 100m
683+
# memory: 128Mi
684+
# requests:
685+
# cpu: 100m
686+
# memory: 128Mi
687+
669688
# -- nodeSelector set the operator nodeSelector
670689
nodeSelector: {}
671690

@@ -678,17 +697,17 @@ affinity: {}
678697
# -- priorityClassName set the operator priorityClassName
679698
priorityClassName: ""
680699

681-
# -- automountServiceAccountToken the flag to enable automount for service account token
700+
# -- automountServiceAccountToken the flag to enable automount for service account token
682701
automountServiceAccountToken: true
683702

684703
policiesBundle:
685704
# -- registry of the policies bundle
686-
registry: ghcr.io
705+
registry: mirror.gcr.io
687706
# -- repository of the policies bundle
688-
repository: aquasecurity/trivy-checks
707+
repository: aquasec/trivy-checks
689708
# -- tag version of the policies bundle
690-
tag: 0
691-
# -- registryUser is the user for the registry
709+
tag: 1
710+
# -- registryUser is the user for the registry
692711
registryUser: ~
693712
# -- registryPassword is the password for the registry
694713
registryPassword: ~
@@ -700,7 +719,6 @@ policiesBundle:
700719
# -- insecure is the flag to enable insecure connection to the policy bundle registry
701720
insecure: false
702721

703-
704722
nodeCollector:
705723
# -- useNodeSelector determine if to use nodeSelector (by auto detecting node name) with node-collector scan job
706724
useNodeSelector: true

0 commit comments

Comments
 (0)