trivy

This commit is contained in:
auricom
2022-12-29 22:04:32 +01:00
parent f246f501be
commit d23fa3a027
8 changed files with 96 additions and 0 deletions

View File

@@ -11,4 +11,5 @@ resources:
- ./monitoring - ./monitoring
- ./networking - ./networking
- ./rook-ceph - ./rook-ceph
- ./trivy-system
- ./volsync - ./volsync

View File

@@ -0,0 +1,9 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
# Pre Flux-Kustomizations
- ./namespace.yaml
# Flux-Kustomizations
- ./trivy-operator/ks.yaml

View File

@@ -0,0 +1,7 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: trivy-system
labels:
kustomize.toolkit.fluxcd.io/prune: disabled

View File

@@ -0,0 +1,38 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.devbu.io/helmrelease_v2beta1.json
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: trivy-operator
namespace: trivy-system
spec:
interval: 15m
chart:
spec:
chart: trivy-operator
version: 0.9.1
sourceRef:
kind: HelmRepository
name: aqua
namespace: flux-system
maxHistory: 3
install:
createNamespace: true
crds: CreateReplace
remediation:
retries: 3
upgrade:
crds: CreateReplace
remediation:
retries: 3
values:
excludeNamespaces: "{{ .Release.Namespace }}"
operator:
replicas: 3
scanJobsConcurrentLimit: 3
vulnerabilityScannerScanOnlyCurrentRevisions: true
configAuditScannerScanOnlyCurrentRevisions: true
trivy:
ignoreUnfixed: true
serviceMonitor:
enabled: true

View File

@@ -0,0 +1,7 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: trivy-system
resources:
- ./helmrelease.yaml

View File

@@ -0,0 +1,23 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.devbu.io/kustomization_v1beta2.json
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
kind: Kustomization
metadata:
name: cluster-apps-trivy-operator
namespace: flux-system
labels:
substitution.flux.home.arpa/enabled: "true"
spec:
path: ./kubernetes/apps/trivy-system/trivy-operator/app
prune: true
sourceRef:
kind: GitRepository
name: home-ops-kubernetes
healthChecks:
- apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
name: trivy-operator
namespace: trivy-system
interval: 30m
retryInterval: 1m
timeout: 3m

View File

@@ -0,0 +1,10 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.devbu.io/helmrepository_v1beta2.json
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: aqua
namespace: flux-system
spec:
interval: 2h
url: https://aquasecurity.github.io/helm-charts/

View File

@@ -3,6 +3,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- ./aqua.yaml
- ./backube.yaml - ./backube.yaml
- ./bitnami.yaml - ./bitnami.yaml
- ./bjw-s.yaml - ./bjw-s.yaml